Free Software 2011-2012 Jose Castro http://gsyc.urjc.es/~jfcastro [email protected] @jfcastroluis 24 de noviembre de 2011 1 / 22 Jose Castro Puppet: Configuration management tool
is licensed under a Creative Commons Attribution 3.0 License http://creativecommons.org/licenses/by/3.0 2 / 22 Jose Castro Puppet: Configuration management tool
are often repetitive: deploying hosts creating users managing applications configuring daemons monitoring services ... We are always trying automating them with scripts but become complex poorly documented customized to each enviroment rarely scale to large platforms “ssh in a for loop is not a solution” — Luke Kanies, Puppet devel 4 / 22 Jose Castro Puppet: Configuration management tool
a configuration management framework and tools with an object-oriented model Ruby-based GPLv2 and Apache (for 2.7.0 and later) Luke Kanies began developing tool in 2001 In 2005 he founded PuppetLabs 0.25.5 to 2.6.0 version Linux, FreeBSD, OpenBSD, Solaris, AIX, HP UX, MacOS... 5 / 22 Jose Castro Puppet: Configuration management tool
master agent agent agent ... master runs a daemon listens on port 8140 serves a configuration catalog agents connect to master via SSL connection retrieve any configuration from catalog can run as daemon or manually triggered Puppet can also run in a stand-alone mode 7 / 22 Jose Castro Puppet: Configuration management tool
language and resource abstraction layer Package example package { ’vim’: provider => apt, ensure => present, } configuration items are named resources statements about the state of configuration sysadmin doesn’t care how this state is achieved agents use Facter to get information about themself agents manage providers depending on system type 8 / 22 Jose Castro Puppet: Configuration management tool
Transactional layer The process of host configuration has these steps: Compile the configuration Transfer the compiled configuration to agents Apply the configuration on agents Report the results to the master 9 / 22 Jose Castro Puppet: Configuration management tool
Master running Daemon # service puppetmaster start Process # puppet master –no-daemonize initiates Puppet environments creates a local Certificate Authority creates cretificates and keys for master open a connection waiting for clients 13 / 22 Jose Castro Puppet: Configuration management tool
Even more Node definition site.pp import ’nodes.pp’ $puppetserver = ’puppet.example.com’ nodes.pp node ’node1.example.com’ { include sudo package { ’vim’: ensure => present } } There are two types of collection we can include in a node: Classes – a basic collection of resources Modules – an advanced and portable collection of resources 16 / 22 Jose Castro Puppet: Configuration management tool
Free Software 2011-2012 Jose Castro http://gsyc.urjc.es/~jfcastro [email protected] @jfcastroluis 24 de noviembre de 2011 22 / 22 Jose Castro Puppet: Configuration management tool