====== Puppet ====== Puppet Open Source ------------------ Puppet Enterprise ----------------- * Provides the Web GUI * Free upto 10 agents Installing Puppet ================= Installing Agent ----------------- The puppet client * Install the puppet repo: puppetlabs-release-pc1 * Install agent: puppet-agent Gather Facts ------------ `puppet facter` Ininitialse ----------- `puppet agent -t` Classes ======= Modules ======= First, Puppet needs to know where to find your modules: .. code:: [root@training ~]# puppet master --configprint basemodulepath /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules [root@training ~]# puppet master --configprint environmentpath /etc/puppetlabs/code/environments Directories that contain configuration. Encapsulate all components into a single folder structure. Directory Structure ------------------- .. code:: [root@training environments]# tree production/modules/ssh/ ... ├── manifests ├── init.pp ## class ssh { ... } └── server.pp ## class ssh\:\:server { ... } Puppet expects to find classes in the manifests directory of your module. Extensions have a `.pp` extension The main manifest class is stored in `..//manifests/init.pp` The main file Writing Modules In the repo: /erc/puppetlabs/code/modules/ Validating ---------- puppet parser validate system_users/manifests/init.pp Linting ------- See: http://puppet-lint.com Invoking -------- puppet apply puppet describe Classes Nodes Accessing Samples ----------------- puppet resource host Puppet Modules -------------- - manifests/init.pp => class { ... - examples/init.pp =? Relationships ------------- http://garylarizza.com https://www.youtube.com/user/PuppetLabsInc https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa Puppet Forge forge.puppet.com Doenload, use, create wrapper modules to add yoru own config