3. Principles
Version control recipes
Puppet, Chef to code standard recipes
Re-use recipes across environments
Deploy often and in smaller chunks
Test changes on testing environment
5. Puppet
• Configuration management utility
• Written in Ruby (^_^)
• Model driven
• Abstract OS layer
• Focus on high level details and relationships
6. General overview
Modules Puppet Master Node configuration
General infrastructure
Monitoring
LDAP / Kerberos SSH gateway
Nagios, Munin
Applications infrastructure
Development Staging Production
app servers, web servers,
httpd, mysqld, ... VMs, httpd, mysqld
db servers, ...
Puppet clients
7. Anatomy of a
puppet run
1. Requests a signed certificate (first run only)
2. Collects facts (hardware, OS, hostname, ...)
3. Obtains latest catalog from master
4. Apply changes
5. Sends report of changes and failure to master
9. Structure of a module
define how the module
manifests/ works
static content
files/ notonthehighstreet.cert
dynamic templates
templates/ httpd.conf.erb
ruby based libraries
lib/ package providers, ...
spec/, tests/, features/... tests for classes, definitions
12. Pre-defined resources
File Host
Package Mount
Service Exec (commands)
User SSH key
Group SSH authorised key
Cron(job)
13. Resource collections
Classes, parameterised classes, defined resource types
Classes:
• single inheritance
• singleton
• are typically used to group all the resources
of a particular package, service, ...
17. Resource collections
Classes, parameterised classes, defined resource types
Defined Resource Types:
• no inheritance
• reusable on same system
• cannot define same resources more than
once
26. Present
• Most of our services managed by Puppet
• Most of our environments managed by
Puppet
• Basic testing process in place on Jenkins
27. Future
• Centralise host provisioning with Foreman
• Complete testing cycle with production-like
testing servers
• Deploy fully working application servers from
scratch with Puppet
• Puppet 3.0 / Ruby 1.9
• Provide development instance configurable
with Puppet