From recipes to    running systemsmanaging production servers as you write code
GoalsCentralise configuration changesFormalise configurationMinimise efforts of maintaining systemsMinimise risks and fear o...
PrinciplesVersion control recipesPuppet, Chef to code standard recipesRe-use recipes across environmentsDeploy often and i...
Tools• Git, Github• Puppet, Chef• Cucumber-nagios, Cucumber-puppet,  Rspec-puppet• Jenkins,Vagrant, virtualisation, linux ...
Puppet• Configuration management utility• Written in Ruby (^_^)• Model driven• Abstract OS layer• Focus on high level detai...
General overview   Modules               Puppet Master        Node configuration               General infrastructure Monit...
Anatomy of a          puppet run1. Requests a signed certificate (first run only)2. Collects facts (hardware, OS, hostname, ...
Puppet organisation  External node                                        Nodes    classifier              Top level classe...
Structure of a module                             define how the modulemanifests/                           works          ...
Manifestsa collection of resources & relationships
Dynamic templates
Pre-defined resourcesFile        HostPackage     MountService     Exec (commands)User        SSH keyGroup       SSH authori...
Resource collectionsClasses, parameterised classes, defined resource types  Classes:• single inheritance• singleton• are ty...
Example of a class
Resource collectionsClasses, parameterised classes, defined resource types  Parameterised classes:• similar to classes• acc...
Example of a parameterised class
Resource collectionsClasses, parameterised classes, defined resource types  Defined Resource Types:• no inheritance• reusabl...
Example of a defined resource type
The Foreman• Provides web interface to Puppet• Client inventory• Collects reports and failures• External node classifier• P...
Web interface of Puppet system
Server and high-level configuration            inventory
Collect reports from Puppet master
Log and report errors for immediate              analysis
Provide nodes configuration     to Puppet master
Provisioning new node from web
Present• Most of our services managed by Puppet• Most of our environments managed by  Puppet• Basic testing process in pla...
Future•   Centralise host provisioning with Foreman•   Complete testing cycle with production-like    testing servers•   D...
Upcoming SlideShare
Loading in …5
×

Puppet

1,749 views

Published on

dddd

Published in: Technology, Spiritual
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,749
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
53
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Puppet

    1. 1. From recipes to running systemsmanaging production servers as you write code
    2. 2. GoalsCentralise configuration changesFormalise configurationMinimise efforts of maintaining systemsMinimise risks and fear of changesTest infrastructure changes
    3. 3. PrinciplesVersion control recipesPuppet, Chef to code standard recipesRe-use recipes across environmentsDeploy often and in smaller chunksTest changes on testing environment
    4. 4. Tools• Git, Github• Puppet, Chef• Cucumber-nagios, Cucumber-puppet, Rspec-puppet• Jenkins,Vagrant, virtualisation, linux containers• Puppet dashboard, Foreman
    5. 5. Puppet• Configuration management utility• Written in Ruby (^_^)• Model driven• Abstract OS layer• Focus on high level details and relationships
    6. 6. General overview Modules Puppet Master Node configuration General infrastructure Monitoring LDAP / Kerberos SSH gatewayNagios, Munin Applications infrastructureDevelopment Staging Production app servers, web servers, httpd, mysqld, ... VMs, httpd, mysqld db servers, ... Puppet clients
    7. 7. Anatomy of a puppet run1. Requests a signed certificate (first run only)2. Collects facts (hardware, OS, hostname, ...)3. Obtains latest catalog from master4. Apply changes5. Sends report of changes and failure to master
    8. 8. Puppet organisation External node Nodes classifier Top level classes app_server, web_server, db_server, db_slave, sphinx_server...Modules Apache Ruby Mysql Nagios Git Sphinx Munin Memcached ....
    9. 9. Structure of a module define how the modulemanifests/ works static contentfiles/ notonthehighstreet.cert dynamic templatestemplates/ httpd.conf.erb ruby based librarieslib/ package providers, ...spec/, tests/, features/... tests for classes, definitions
    10. 10. Manifestsa collection of resources & relationships
    11. 11. Dynamic templates
    12. 12. Pre-defined resourcesFile HostPackage MountService Exec (commands)User SSH keyGroup SSH authorised keyCron(job)
    13. 13. Resource collectionsClasses, parameterised classes, defined resource types Classes:• single inheritance• singleton• are typically used to group all the resources of a particular package, service, ...
    14. 14. Example of a class
    15. 15. Resource collectionsClasses, parameterised classes, defined resource types Parameterised classes:• similar to classes• accept parameters to customise their behavior
    16. 16. Example of a parameterised class
    17. 17. Resource collectionsClasses, parameterised classes, defined resource types Defined Resource Types:• no inheritance• reusable on same system• cannot define same resources more than once
    18. 18. Example of a defined resource type
    19. 19. The Foreman• Provides web interface to Puppet• Client inventory• Collects reports and failures• External node classifier• Provision new nodes
    20. 20. Web interface of Puppet system
    21. 21. Server and high-level configuration inventory
    22. 22. Collect reports from Puppet master
    23. 23. Log and report errors for immediate analysis
    24. 24. Provide nodes configuration to Puppet master
    25. 25. Provisioning new node from web
    26. 26. Present• Most of our services managed by Puppet• Most of our environments managed by Puppet• Basic testing process in place on Jenkins
    27. 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

    ×