SlideShare a Scribd company logo
1 of 51
Download to read offline
Puppet at scale

Rhommel Lamas

November 2013
Thursday, November 28, 13
Who am I?

Thursday, November 28, 13
Who am I?
Scale experience
•Physical servers Xtratelecom.es.
•AWS and other cloud providers at Wuaki.tv and
3scale.net.

Thursday, November 28, 13
Who am I?
Scale experience
•Physical servers Xtratelecom.es.
•AWS and other cloud providers at Wuaki.tv and
3scale.net.
Config Management
• Worked with CFEngine2 for 2 years.
• Puppet user since 2009.

Thursday, November 28, 13
Who am I?
Scale experience
•Physical servers Xtratelecom.es.
•AWS and other cloud providers at Wuaki.tv and
3scale.net.
Config Management
• Worked with CFEngine2 for 2 years.
• Puppet user since 2009.
Obsessed about config management and I use Emacs.

Thursday, November 28, 13
What is 3scale?
3scale provides tools such as traffic
management, API administration, traffic
reports, and more, to help companies
publicize their APIs easily and power new
types of connected applications.

Thursday, November 28, 13
What does scaling stands for?

Thursday, November 28, 13
What does scaling stands for?
Scalability is the ability of a system, network,
or process to handle a growing amount of
work in a capable manner or its ability to be
enlarged to accommodate that growth.
Wikipedia

Thursday, November 28, 13
What are our scaling needs?

Thursday, November 28, 13
What are our scaling needs?
• How many people do we need to scale our
system infrastructure?

Thursday, November 28, 13
What are our scaling needs?
• How many people do we need to scale our
system infrastructure?

• How many environments and systems can
our team maintain?

Thursday, November 28, 13
What are our scaling needs?
• How many people do we need to scale our
system infrastructure?

• How many environments and systems can
our team maintain?

• Can we delegate configurations easily to our
team members?

Thursday, November 28, 13
Puppet dynamic environments

Thursday, November 28, 13
Puppet dynamic environments
• Purpose of Puppet environments.

Thursday, November 28, 13
Puppet dynamic environments
• Purpose of Puppet environments.
• Puppet base environments at 3scale.

Thursday, November 28, 13
Puppet environments at 3scale
environments

/etc/puppet
auth.conf

production
Capfile
hieradata

autosign.conf

common.yaml
production.yaml

config.ru

preview.yaml

hiera.yaml

manifests
production.pp

hipchat.yaml

preview.pp

fileserver.conf

nodes
production

unicorn.rb

webserver.pp

environments

preview
webserver.pp
modules
nginx
preview
staging

Thursday, November 28, 13
[main]
server = puppet.example.com
environment = production
[master]
environment = production
manifest
= $confdir/environments/$environment/manifests/site.pp
modulepath = $confdir/environments/$environment/modules

Thursday, November 28, 13
[main]
server = puppet.example.com
environment = production
[master]
environment = production
manifest
= $confdir/environments/$environment/manifests/$environment.pp
modulepath = $confdir/environments/$environment/modules

# production.pp
import 'nodes/production/nodes.pp'
import 'nodes/production/*.pp

Thursday, November 28, 13
:hierarchy:
- '%{::osfamily}'
- '%{::environment}'
- common
:backends:
- yaml
- json
:yaml:
:datadir: "/etc/puppet/environments/%{environment}/hieradata"

Thursday, November 28, 13
Thursday, November 28, 13
Puppet dynamic environments
• Purpose of Puppet environments.
• Puppet environments at 3scale.
• Puppet development workflow (Git).
• Puppet-lint
• Puppet-rspec
• Code Review

Thursday, November 28, 13
Thursday, November 28, 13
Thursday, November 28, 13
Thursday, November 28, 13
Puppet at 3scale.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.
• 15 minutes splay with a splaylimit $runinterval/2.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.
• 15 minutes splay with a splaylimit $runinterval/2.
• Using DNS SRV records.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.
• 15 minutes splay with a splaylimit $runinterval/2.
• Using DNS SRV records.
• The foreman as our ENC.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.
• 15 minutes splay with a splaylimit $runinterval/2.
• Using DNS SRV records.
• The foreman as our ENC.
• Puppetdb and hiera.

Thursday, November 28, 13
Puppet at 3scale.
• Since July 2013 we are running Puppet 3.0+.
• 2 Puppet master’s.
• Nginx + Unicorn.
• 15 minutes splay with a splaylimit $runinterval/2.
• Using DNS SRV records.
• The foreman as our ENC.
• Puppetdb and hiera.
•MCollective with Rabbitmq connector.
Thursday, November 28, 13
ROUTE
53

_x-puppet._tcp.3scale.net
_x-puppet-ca._tcp.3scale.net

Puppet
Master
+
RabbitMQ
Cluster
+
MCollective
Client
+
PuppetDB
+
The
Foreman

Puppet
Master
+
RabbitMQ
Cluster
+
MCollective
Client
+
PuppetDB
+
The
Foreman

Puppet
Master
+
RabbitMQ
Cluster
+
MCollective
Client
+
PuppetDB
+
The
Foreman

RabbitMQ Load Balancer

Puppet
Agent
+
Mcollective
Server

Thursday, November 28, 13

Puppet
Agent
+
Mcollective
Server

Puppet
Agent
+
Mcollective
Server

PostgreSQL
RDS
MultiAZ
Thursday, November 28, 13
What nobody will tell you about
puppet.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.
• Puppet-rspec will help you find errors on early stages so
TEST your modules.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.
• Puppet-rspec will help you find errors on early stages so
TEST your modules.
• Don’t code remotely on your servers, use your local
development environment and git.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.
• Puppet-rspec will help you find errors on early stages so
TEST your modules.
• Don’t code remotely on your servers, use your local
development environment and git.
• Read puppet documentation on every version.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.
• Puppet-rspec will help you find errors on early stages so
TEST your modules.
• Don’t code remotely on your servers, use your local
development environment and git.
• Read puppet documentation on every version.
• Be careful about dependencies.

Thursday, November 28, 13
What nobody will tell you about
puppet.
• Puppet-lint is your friend and it will help others to
understand your code, so USE IT.
• Puppet-rspec will help you find errors on early stages so
TEST your modules.
• Don’t code remotely on your servers, use your local
development environment and git.
• Read puppet documentation on every version.
• Be careful about dependencies.
• Once you start to puppetize you become an Addict.

Thursday, November 28, 13
Questions?
at 3scale
we’re hiring
http://3scale.net/jobs

Rhommel Lamas
Twitter: @rhoml
Thursday, November 28, 13
Thank you.
at 3scale
we’re hiring
http://3scale.net/jobs

Rhommel Lamas
Twitter: @rhoml
Thursday, November 28, 13
Thursday, November 28, 13
Useful links

Thursday, November 28, 13
Useful links
• http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records

Thursday, November 28, 13
Useful links
• http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records
• http://docs.puppetlabs.com/puppetdb/latest/install_via_module.html

Thursday, November 28, 13
Useful links
• http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records
• http://docs.puppetlabs.com/puppetdb/latest/install_via_module.html
• http://puppetlabs.com/blog/git-workflow-and-puppet-environments

Thursday, November 28, 13
Useful links
• http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records
• http://docs.puppetlabs.com/puppetdb/latest/install_via_module.html
• http://puppetlabs.com/blog/git-workflow-and-puppet-environments
• http://projects.puppetlabs.com/projects/1/wiki/using_unicorn

Thursday, November 28, 13
Useful links
• http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records
• http://docs.puppetlabs.com/puppetdb/latest/install_via_module.html
• http://puppetlabs.com/blog/git-workflow-and-puppet-environments
• http://projects.puppetlabs.com/projects/1/wiki/using_unicorn
• https://github.com/cernops/puppetdb_foreman

Thursday, November 28, 13

More Related Content

Viewers also liked

Morgado golf gid
Morgado golf gidMorgado golf gid
Morgado golf gid
Felipe Melo
 
Reglementation chasse au grand gibier pdf
Reglementation chasse au grand gibier pdfReglementation chasse au grand gibier pdf
Reglementation chasse au grand gibier pdf
usbeck
 
Webinar mvo en aantrekkelijk werkgeverschap.
Webinar mvo en aantrekkelijk werkgeverschap.Webinar mvo en aantrekkelijk werkgeverschap.
Webinar mvo en aantrekkelijk werkgeverschap.
Lloyd's Register Quality Assurance Nederland
 

Viewers also liked (7)

Morgado golf gid
Morgado golf gidMorgado golf gid
Morgado golf gid
 
Reglementation chasse au grand gibier pdf
Reglementation chasse au grand gibier pdfReglementation chasse au grand gibier pdf
Reglementation chasse au grand gibier pdf
 
Webinar mvo en aantrekkelijk werkgeverschap.
Webinar mvo en aantrekkelijk werkgeverschap.Webinar mvo en aantrekkelijk werkgeverschap.
Webinar mvo en aantrekkelijk werkgeverschap.
 
Cómo "embeber" / insertar contenidos multimedia en blogger
Cómo "embeber" / insertar contenidos multimedia en bloggerCómo "embeber" / insertar contenidos multimedia en blogger
Cómo "embeber" / insertar contenidos multimedia en blogger
 
PISA comprensión lectora:El globo
PISA comprensión lectora:El globoPISA comprensión lectora:El globo
PISA comprensión lectora:El globo
 
Top Performing QSRs in India on Social Media.
Top Performing QSRs in India on Social Media.Top Performing QSRs in India on Social Media.
Top Performing QSRs in India on Social Media.
 
Como cuidar nuestro cuerpo
Como cuidar nuestro cuerpoComo cuidar nuestro cuerpo
Como cuidar nuestro cuerpo
 

Similar to Building scalable applications while scaling your infrastructure by rhommel lamas

Managing-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdfManaging-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdf
ssusera181ef
 
Deployment presentation
Deployment presentationDeployment presentation
Deployment presentation
Corey Purcell
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
Laura Lorenz
 

Similar to Building scalable applications while scaling your infrastructure by rhommel lamas (20)

Infrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / PuppetInfrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / Puppet
 
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
 
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
Gluster Cloud Night in Tokyo 2013 -- Tips for getting startedGluster Cloud Night in Tokyo 2013 -- Tips for getting started
Gluster Cloud Night in Tokyo 2013 -- Tips for getting started
 
Managing-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdfManaging-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdf
 
Cooking an Omelette with Chef
Cooking an Omelette with ChefCooking an Omelette with Chef
Cooking an Omelette with Chef
 
Chef - Configuration Management for the Cloud
Chef - Configuration Management for the CloudChef - Configuration Management for the Cloud
Chef - Configuration Management for the Cloud
 
Testing your puppet code
Testing your puppet codeTesting your puppet code
Testing your puppet code
 
JRubyConf 2009
JRubyConf 2009JRubyConf 2009
JRubyConf 2009
 
What Ops Can Learn From Design
What Ops Can Learn From DesignWhat Ops Can Learn From Design
What Ops Can Learn From Design
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
Deployment presentation
Deployment presentationDeployment presentation
Deployment presentation
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and Gherkin
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM Talk
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
How I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet Agents
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
 
Getting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdfGetting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdf
 
Open Source Monitoring in 2019
Open Source Monitoring in 2019 Open Source Monitoring in 2019
Open Source Monitoring in 2019
 

Building scalable applications while scaling your infrastructure by rhommel lamas