introduction to puppet

17
Introduction to Puppet Habeeb Rahman | [email protected] | [email protected]

Upload: habeeb-rahman

Post on 10-May-2015

1.894 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Introduction to puppet

Introduction to PuppetHabeeb Rahman | [email protected] | [email protected]

Page 2: Introduction to puppet

pre puppet/config management era

manual Installationlogin and perform installation/config changesad hoc scripts/toolsnot scalableeveryone solving same problems their own wayboring

Page 3: Introduction to puppet

puppet era

mature toolssharingopensourceinfrastructure as a codeversion controlled

Page 4: Introduction to puppet

what?Vanilla Server

vanilla server apply puppet Your desired application

server

Before AfterTransformation

Page 5: Introduction to puppet

how?(1/2)

master-agent modepuppet master

puppet agent(server 1)

puppet agent(server 2)

puppet agent(server 3)

puppet agent(server 'n')

Page 6: Introduction to puppet

how?(2/2)

standalone mode

puppet apply

puppet (server 1)

Page 7: Introduction to puppet

components

facter & factspuppet languageresourcesmanifestsclassestemplates

Page 8: Introduction to puppet

facter & facts

puppet uses facter to gather information about the host system

Page 9: Introduction to puppet

puppet language

● DSL● ruby

Page 10: Introduction to puppet

resources

● the building blocks● model system configurations● built-in resources

user { 'dave':

ensure => 'present',

home => '/home/dave',

shell => '/bin/zsh'

}

● puppet describe -s user

Page 11: Introduction to puppet

manifests

puppet programs are called “manifests” file extension: .pp

Page 12: Introduction to puppet

classes

● describe one part of what makes up a system’s identity

● not object-oriented programming 'class'

Page 13: Introduction to puppet

templates

puppet uses ruby erb templating system

file {'/etc/foo.conf':

ensure => file, require => Package['foo'], content => template('foo/foo.conf.erb'), }

Page 14: Introduction to puppet

how does it all fit together?

Page 15: Introduction to puppet

catalog

Page 16: Introduction to puppet

puppet help

puppet describeprints help about puppet resource types, providers, and metaparameters

puppet help <subcommand>help about puppet commands

Page 17: Introduction to puppet

learning

http://docs.puppetlabs.com/learning/