Introduction

Puppet models desired system states, enforces those states, and reports any variances so you can track what Puppet is doing. To model system states, Puppet uses a declarative resource-based language - this means a user describes a desired final state (for example, "this package must be installed" or "this service must be running") rather than describing a series of steps to execute.

You use the declarative, readable Puppet DSL (Domain Specific Language) to define the desired end-state of your environment, and Puppet converges the infrastructure to the desired state. So if you have a pre-defined configuration that every new switch should receive, or need to make incremental configuration changes to your infrastructure, or even have a need to install third party software agents, the puppet intent-based automation solution can automate these repetitive configuration management tasks quickly. We support both open source and puppet enterprise with Open NX-OS.

Key Technical Concepts

Puppet Server

The puppet server acts as a central server or point of configuration and control for your datacenter, both switching and compute:

  • Manifests
  • Resources

Node

Any physical, virtual, or cloud machine or switch configured to be maintained by a puppet client, be it server or switch.

Puppet Client

Runs locally on every node that is managed by the puppet master server. Performs all configuration tasks specified by the manifest and converges the node into desired state.

Resources

Puppet ships with a number of pre-defined resources, which are the fundamental components of your infrastructure. The most commonly used resource types are files, users, packages and services. You can see a complete list of the Cisco resource types at the Github respository link below.

Puppet revolves around the management of these resources. The following code sample ensures a third party agent service is always up and running.

  service { 'tcollector':  
    ensure => running,  
  }  

Here, the "service" is the resource type, and "tcollector" is the managed resource. Each resource has attributes, and here, "ensure" is an attribute of the tcollector service. We’re setting the "ensure" attribute to "running" to tell Puppet that tcollector should always be running, and to start the service if it is not.