Image showing a Puppet sync error message

How to use Puppet environments in Linux to safely update an agent

Objective

Create and use puppet environments to test new configuration before updating a live production system.

Operating System and Software Versions

  • Operating System: Any major linux distribution e.g. Ubuntu, Debian, CentOS
  • Software: puppet and puppet-master

Requirements

Privileged access to the puppet master server and the puppet client node.

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Introduction

Most Puppet installations begin life as a master server running a single branch. The master contains all the manifests and other configuration for all the Puppet agents that are synced to it. This is a fine place to begin but there will rapidly arrive a time when an update needs pushing that has the potential to break a production server. Hoping for the best is not the best way to proceed.

Puppet provides the tools to separate entire branches of configuration. These are called environments. A Puppet environment is a way to supply an isolated group of agent nodes with their own dedicated configuration. Each environment contains an entire Puppet configuration tree and can be considered as a separate Puppet master server.

Read more