puppet #5

Supports: precise
Add to new model


This charm deploys the startup script and compatbility scripts for
the puppet agent, which is the process responsible for configuring the
local node. Puppet lets you centrally manage every important aspect
of your system using a cross-platform specification language that
manages all the separate elements normally aggregated in different
files, like users, cron jobs, and hosts, along with obviously discrete
elements like packages, services, and files. Puppet's simple
declarative specification language provides powerful classing
abilities for drawing out the similarities between hosts while
allowing them to be as specific as necessary, and it handles
dependency and prerequisite relationships between objects clearly and


This subordinate charm can be used to apply system level policy on top
of any Juju charms deployed, using Puppet. As described by the project

Puppet Open Source is a flexible, customizable framework available under
the Apache 2.0 license designed to help system administrators automate the
many repetitive tasks they regularly perform. As a declarative, model-based
approach to IT automation, it lets you define the desired state - or the
"what" - of your infrastructure using the Puppet configuration language.


This example will show how to deploy puppet on top of the WordPress+MySQL example.

Installing WordPress and MySQL

juju deploy wordpress
juju deploy mysql
juju add-relation mysql wordpress

Adding Puppet to WordPress and MySQL

juju deploy puppet
juju add-relation puppet wordpress
juju add-relation puppet mysql

Specifying an external puppetmaster

If you have an external puppetmaster, note that you will have to use
some method to classify nodes automatically. The yaml from 'juju status'
should be parsable into an external node classifier.

juju set puppet external-puppetmaster=puppet.yourdomain.com

Setting up and configuring a puppetmaster

For environments without an existing puppetmaster, first deploy a new one:

juju deploy puppetmaster

Next, you will need to setup Puppet classes 'mysql' and 'wordpress':

juju ssh puppetmaster/0

This next command will result in all nodes being put into a class
that is named after their primary service, so the example will have,
as suggested, two classes, 'mysql' and 'wordpress'.

juju add-relation puppetmaster:puppetmaster puppet:puppetmaster


That should end up with puppet agent running on the WordPress and
MySQL nodes, pointed at either your external puppetmaster, or the
newly deployed puppetmaster.


(string) This will be the external puppet master server string. If a puppet master is related, this will be ignored.