SlideShare uma empresa Scribd logo
1 de 12
Scalability and Consistency
The Nitty Gritty
Overview
• The only sane way to scale is to ensure consistency and
automation
• Build things in a way in which you don't care about
individual servers (don't be afraid to rekick a server)
• You should never need to login to an individual box once
it's in production 
How to Accomplish This
• Use an automated provisioning tool (such as
kickstart/cobbler)
•  Use configuration management (such as puppet)
•  Test, test, test
Users and Authentication
• Logging in as root directly is bad
• Keys used for automated processes should be separate
from user keys
• Access to a service on a box and SSH access to the box
should not be linked
Packaging
• Use a local copy of distribution repositories
• Do not use external repositories directly
• Use RPMs (do not use PECL, PEAR, CPAN, gem,
extracting tarballs, compiling from source, etc.)
External repositories are moving targets. Depending on
when a server is provisioned, it could end up with different
package versions.
Non-RPM packaging methods don't have upgrade, uninstall,
and versioning, which is why they should be avoided.
Building RPMs
• It's perfectly fine to build a custom RPM when one is not
readily available
• Don't rebuild just to change file locations (such as
putting stuff under /box)
• Build in a "sterile" environment
• Make sure RPM spec files list all of their direct build and
runtime dependencies
General Puppet Tips
• Write modules/classes in a way that they can be reused
• Be specific...don't assume something will happen a certain
way if you don't define it
• Follow the Puppet Style Guide
• Don't hard-code anything (hostnames in particular)
• Use dependencies
http://docs.puppetlabs.com/guides/style_guide.html
Puppet Tips - Users
Use this:
group { "bob":
  ensure => present,
  gid      => 503,
}
user { "bob":
  ensure => present,
  gid       => 'bob',
  require => Group["bob"],
}
Instead of:
user { "bob":
  ensure => present,
}
• Manage the group and the user
• Specify the UID and GID to ensure consistency across
servers
Puppet Tips - Packages
Use this:
package { "php-pecl-memcache":
  ensure => installed,
}
Instead of:
exec { "install_pecl_memcache":
  command => 'pecl install memcache',
}
• Use a single package manager (RPM) as much as possible
• Specify versions when it makes sense
Puppet Tips - Dependencies
Use this:
package { "nslcd":
  ensure => installed,
}
service { "nslcd":
  ensure => running,
  require => Package["nslcd"],
  subscribe => Package["nslcd"],
}
Instead of:
package { "nslcd":
  ensure => installed,
}
service { "nslcd":
  ensure => running,
}
• Dependencies ensure that puppet performs operations in
a particular order
Puppet Tips - Testing
• Test your changes on a non-production server
• For larger changes in puppet, it's not completely tested
until you can build a server from the ground up and
puppet sets everything up properly without manual
intervention
• If you get errors on the first puppet run and none on the
second, add more dependencies
Puppet Tips - Roles
• Instead of defining everything on a per-node basis,
define roles and put servers into them. It's better to
define 500 roles and have servers fit neatly into them
than to have 1000 node definitions, each of them
differing by only a little bit
• All roles should be defined in the "nodetype" module and
inherit from nodetype::generic
• This will allow us to eventually use an ENC (external node
classifier)

Mais conteúdo relacionado

Mais procurados

Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
Gerald Villorente
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
Amazee Labs
 
Okuyama Summary
Okuyama SummaryOkuyama Summary
Okuyama Summary
skoichi
 

Mais procurados (18)

Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
 
DNN & The CloudOS: Windows Azure on your terms
DNN & The CloudOS: Windows Azure on your termsDNN & The CloudOS: Windows Azure on your terms
DNN & The CloudOS: Windows Azure on your terms
 
Highly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterHighly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi cluster
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOcean
 
Optimizing Your WordPress Site
Optimizing Your WordPress SiteOptimizing Your WordPress Site
Optimizing Your WordPress Site
 
Sergejus Barinovas
Sergejus BarinovasSergejus Barinovas
Sergejus Barinovas
 
Top4top Showcase
Top4top ShowcaseTop4top Showcase
Top4top Showcase
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
Frontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UXFrontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UX
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
 
Postgres Open
Postgres OpenPostgres Open
Postgres Open
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
Something about node basics
Something about node basicsSomething about node basics
Something about node basics
 
Okuyama Summary
Okuyama SummaryOkuyama Summary
Okuyama Summary
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 

Destaque

Destaque (16)

El estudio Nielsen analiza a los nuevos consumidores online | Estrategia Digital
El estudio Nielsen analiza a los nuevos consumidores online | Estrategia DigitalEl estudio Nielsen analiza a los nuevos consumidores online | Estrategia Digital
El estudio Nielsen analiza a los nuevos consumidores online | Estrategia Digital
 
Co vše "umí" otázka
Co vše "umí" otázkaCo vše "umí" otázka
Co vše "umí" otázka
 
Nuevas herramientas de Google | Google Q3
Nuevas herramientas de Google | Google Q3Nuevas herramientas de Google | Google Q3
Nuevas herramientas de Google | Google Q3
 
Data a potřeby výzkumníka
Data a potřeby výzkumníkaData a potřeby výzkumníka
Data a potřeby výzkumníka
 
Využití a propojování informačních zdrojů
Využití a propojování informačních zdrojůVyužití a propojování informačních zdrojů
Využití a propojování informačních zdrojů
 
Statistické informace ČSÚ
Statistické informace ČSÚStatistické informace ČSÚ
Statistické informace ČSÚ
 
Medialni data data data
Medialni data data data Medialni data data data
Medialni data data data
 
Výzkumy veřejného mínění v mezinárodním kontextu
Výzkumy veřejného mínění v mezinárodním kontextuVýzkumy veřejného mínění v mezinárodním kontextu
Výzkumy veřejného mínění v mezinárodním kontextu
 
Normal accidents and outpatient surgeries
Normal accidents and outpatient surgeriesNormal accidents and outpatient surgeries
Normal accidents and outpatient surgeries
 
Nuevas herramientas de Google para Marketing
Nuevas herramientas de Google para Marketing Nuevas herramientas de Google para Marketing
Nuevas herramientas de Google para Marketing
 
Volně prodejné studie
Volně prodejné studie Volně prodejné studie
Volně prodejné studie
 
Co ovlivňuje výsledky výzkumů veřejného mínění a proč se výzkumy na Slovensku...
Co ovlivňuje výsledky výzkumů veřejného mínění a proč se výzkumy na Slovensku...Co ovlivňuje výsledky výzkumů veřejného mínění a proč se výzkumy na Slovensku...
Co ovlivňuje výsledky výzkumů veřejného mínění a proč se výzkumy na Slovensku...
 
Otevřená data a sociologické zkoumání
Otevřená data a sociologické zkoumáníOtevřená data a sociologické zkoumání
Otevřená data a sociologické zkoumání
 
Pasport výzkumů veřejného mínění
Pasport výzkumů veřejného míněníPasport výzkumů veřejného mínění
Pasport výzkumů veřejného mínění
 
Curso SEM / Adwords - Industrial & Ecommerce Webinar
Curso SEM / Adwords - Industrial & Ecommerce WebinarCurso SEM / Adwords - Industrial & Ecommerce Webinar
Curso SEM / Adwords - Industrial & Ecommerce Webinar
 
Docker How and Why
Docker How and WhyDocker How and Why
Docker How and Why
 

Semelhante a Scalability and consistency

Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
Joe Ray
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
OpenStack Foundation
 

Semelhante a Scalability and consistency (20)

Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Puppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With PuppetPuppet Camp Denver 2015: Nagios Management With Puppet
Puppet Camp Denver 2015: Nagios Management With Puppet
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
The Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With PuppetThe Art and Zen of Managing Nagios With Puppet
The Art and Zen of Managing Nagios With Puppet
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
 
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
Nagios Conference 2014 - Mike Merideth - The Art and Zen of Managing Nagios w...
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development Workflow
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
Immutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answerImmutable infrastructure isn’t the answer
Immutable infrastructure isn’t the answer
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Training Slides: 103 - Basics - Simple Tungsten Clustering Installation
Training Slides: 103 - Basics - Simple Tungsten Clustering InstallationTraining Slides: 103 - Basics - Simple Tungsten Clustering Installation
Training Slides: 103 - Basics - Simple Tungsten Clustering Installation
 
Systems administration for coders presentation
Systems administration for coders presentationSystems administration for coders presentation
Systems administration for coders presentation
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
The Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with PuppetThe Art & Zen of Managing Nagios with Puppet
The Art & Zen of Managing Nagios with Puppet
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Scalability and consistency

  • 2. Overview • The only sane way to scale is to ensure consistency and automation • Build things in a way in which you don't care about individual servers (don't be afraid to rekick a server) • You should never need to login to an individual box once it's in production 
  • 3. How to Accomplish This • Use an automated provisioning tool (such as kickstart/cobbler) •  Use configuration management (such as puppet) •  Test, test, test
  • 4. Users and Authentication • Logging in as root directly is bad • Keys used for automated processes should be separate from user keys • Access to a service on a box and SSH access to the box should not be linked
  • 5. Packaging • Use a local copy of distribution repositories • Do not use external repositories directly • Use RPMs (do not use PECL, PEAR, CPAN, gem, extracting tarballs, compiling from source, etc.) External repositories are moving targets. Depending on when a server is provisioned, it could end up with different package versions. Non-RPM packaging methods don't have upgrade, uninstall, and versioning, which is why they should be avoided.
  • 6. Building RPMs • It's perfectly fine to build a custom RPM when one is not readily available • Don't rebuild just to change file locations (such as putting stuff under /box) • Build in a "sterile" environment • Make sure RPM spec files list all of their direct build and runtime dependencies
  • 7. General Puppet Tips • Write modules/classes in a way that they can be reused • Be specific...don't assume something will happen a certain way if you don't define it • Follow the Puppet Style Guide • Don't hard-code anything (hostnames in particular) • Use dependencies http://docs.puppetlabs.com/guides/style_guide.html
  • 8. Puppet Tips - Users Use this: group { "bob":   ensure => present,   gid      => 503, } user { "bob":   ensure => present,   gid       => 'bob',   require => Group["bob"], } Instead of: user { "bob":   ensure => present, } • Manage the group and the user • Specify the UID and GID to ensure consistency across servers
  • 9. Puppet Tips - Packages Use this: package { "php-pecl-memcache":   ensure => installed, } Instead of: exec { "install_pecl_memcache":   command => 'pecl install memcache', } • Use a single package manager (RPM) as much as possible • Specify versions when it makes sense
  • 10. Puppet Tips - Dependencies Use this: package { "nslcd":   ensure => installed, } service { "nslcd":   ensure => running,   require => Package["nslcd"],   subscribe => Package["nslcd"], } Instead of: package { "nslcd":   ensure => installed, } service { "nslcd":   ensure => running, } • Dependencies ensure that puppet performs operations in a particular order
  • 11. Puppet Tips - Testing • Test your changes on a non-production server • For larger changes in puppet, it's not completely tested until you can build a server from the ground up and puppet sets everything up properly without manual intervention • If you get errors on the first puppet run and none on the second, add more dependencies
  • 12. Puppet Tips - Roles • Instead of defining everything on a per-node basis, define roles and put servers into them. It's better to define 500 roles and have servers fit neatly into them than to have 1000 node definitions, each of them differing by only a little bit • All roles should be defined in the "nodetype" module and inherit from nodetype::generic • This will allow us to eventually use an ENC (external node classifier)