Upgrade to Pro — share decks privately, control downloads, hide ads and more …




Salimane Adjao Moustapha

August 14, 2013

More Decks by Salimane Adjao Moustapha

Other Decks in Programming


  1. Puppet
    Salimane Adjao Moustapha
    [email protected]

    View Slide

  2. Web app depends on services that should be on the server,
    users access/permissions...

    Capistrano expects folders, rvm to be in a certain location

    You need to deploy many servers with different environments
    on staging, production...

    Doing all that manually and you're setting yourself for “wtf!wtf!

    View Slide

  3. The idea is to make it repeatable,
    predictable and testable with less
    moving parts...

    View Slide

  4. Insert Puppet...

    Configuration management framework and

    Ruby based

    GPLv2/Apache licenses

    From PuppetLabs (company)

    View Slide

  5. Deployment

    Config Language and Resource Abstraction

    Transactional Layer

    View Slide

  6. Deployment

    – Run as daemon
    – Listen on a port
    – Serve configuration catalogs

    – Connect to master via ssh
    – Retrieve configuration catalog from master
    – Can run as a daemon or manually triggered

    Puppet can also run in stand alone mode

    View Slide

  7. Config language/ Resource
    file { ['/meltwater', '/meltwater/likealyzer']:
    ensure => directory,
    owner => 'www-data',
    group => 'www-data',
    mode => '0644',
    require => User['www-data'],

    View Slide

  8. Transactional layer

    Agent uses facter to get details about itself

    Agent send “facts” to Master

    Master recognize, compile configuration
    “catalog” for that agent and send it back

    Agent apply the “catalog” on itself then send a
    result report back

    View Slide

  9. Configuration

    Node Definition

    Resource Definition

    Module Definition


    View Slide

  10. Node definition
    node puppet-demo {
    file { ['/meltwater', '/meltwater/likealyzer']:
    ensure => directory,
    owner => 'vagrant',
    group => 'vagrant',
    mode => '0644'

    View Slide

  11. Resource Definition
    type { name:
    attribute => value,
    package { 'vim':
    ensure => present

    View Slide

  12. Module Definition

    – files
    – templates
    – tests
    – spec

    – manifests


    View Slide

  13. Demo time

    View Slide

  14. Questions

    View Slide