What is puppet

  1. Infrastructure automation and configuration management tool.
  2. Enforces the defined state of the infrastructure
  3. Can automate tasks on thousands of machines
  4. Enables infrastructure as code
  5. Allows configuration consistency across nodes
  6. Enables quick provisioning of new machines in new environments
  7. Allows DevOps admins to write declarative instructions using the puppet language
  8. Code is written inside of classes and classes are assigned to node
  9. Puppet is written in Ruby Language.
  10. Acceptance testing can be done by Beaker, a product developed by puppet.
  11. Fundamentally what all we are doing with puppet is managing resources on a large and automated scale while caring as little as possible about the platform and distribution.

Definitions & Features

  1. Puppet Nodes: Nodes are any virtual or physical system that is able to run puppet agent and is specifically supported by puppet agent.
  2. Puppet has puppet.conf file:
    1. This the main config file, which contains 4 sections, main, master, agent and user.
    2. Settings are loaded at service start time.
    3. In agent section, you can define runinterval, which tells puppet how often agent daemon runs.
  3. In puppet you have resources. Every resource is an instance of resource type.
  4. Resource types can be: file, package, service, .
  5. A system configuration is a collection of resources.
  6. A catalog in puppet describes the desired state for each resource on a system.
  7. Puppet doesn't enforce resources from top down, instead on dependency relationships.
  8. Resource meta parameters can be applied on any resource type.
    1. Require (need a referenced resource to be applied first;
    2. Before(request to be applied before a referenced resource)
    3. Subscribe(listen for puppet changes)
    4. Notify (send a notification when puppet changes the containing resource)
    5. Other: schedule, alias, audit, noop, loglevel, tag.    
  9. You define variables with $var in puppet; Three scopes for variables: Top, node, class. Puppet always finds the closest scope to the code being executed.
  10. Profiles are a grouping of technology configurations and class declarations.
  11. Role is based on a business function. I.e., webserver, database server etc.,
  12. Puppet module is a command used to help manage building and downloading modules from the puppet forge .