Puppet Download Mac

  



Mac

On Mac OS X and.nix systems, you can use the command md5 learningpuppetvm.zip and compare the output to the MD5 sum provided on the download page. On Windows systems, you will need to download and use a tool such as the Microsoft File Checksum Integrity Verifier. A repository of 6,582 modules for Puppet and Puppet Enterprise® IT automation software.

Puppet is an open source (with enterprise version and support available) client/server tool from Puppet Labs to facilitate the configuration and management of computer systems.

Written in ruby and available on many platforms, it offers a DSL that allows the 'programming' of operational tasks across many machines.

The DSL covers abstracting the computer resources in a extensible way, and providing structure like class, modules and graphs that a configuration language can manipulate.

The server is called puppet master. It controls a puppet agent installed on client machines that are to be managed. In addition of master and agent, there are puppet apply for stand alone use and puppet resource for accessing the Puppet resource abstraction layer.

Its extensibility makes it future proof and there are providers (implements a resource abstraction in Puppet) for many platforms like Virtual box VMs and Amazon EC2.

The communication between clients and server is secured using SSL certificates.

This post is mainly for me so I can remember how I did install Puppet on Mac OS X and to allow me to repeat it on many mac systems.

Puppet-enterprise-tools/

The install basically boils down to running a script I put on Gist (assuming you want to install Puppet 2.7.11 with Facter 1.6.6 on a startup disk called Macintosh HD):

The remainder of the post describes the gory details. I'll keep this post updated as I learn more about the idiosyncrasies of Puppet on Mac.

I've tested these instructions on Mac OS X Lion (10.7.3) and Mac OS X Snow Leopard (10.6.8).

For Mac OS X, there is a .pkg available for Facter and Puppet downlable from Puppet Lab web site:

There are several versions available on that site.

For the purpose of this post, we will consider version 1.6.6 and 2.7.11 for Facter and Puppet respectively.

Puppet depends on Facter, so you need both. These are Mac OS X package on the site above.

There is another blog post [1] describing a way to install Puppet from source but the source links didn't work for me when I tried.

Unpack the dmg

Install the pkg

Create the puppet group and user

In other systems, the packaging may include the creation of the necessary puppet user and group.

The packages for Mac OS X don't do that. Although it's possible to create these when starting the puppet master with the --mkusers options, I prefer create then before hand during installation.

Create directories

Change permission on directories

Create puppet.conf

Puppet-tools/

There are several sections, each relevant only to different puppet subcommands except for [main] which is global.

If puppet is running on a client ensure the server property is set to the machine running puppet master instead of local hostname as here.

Putting it all together

As I needed to install Puppet on more than one mac, I've made a script, inspired by trevmex's tutorial [1], with all the steps together:

(Some of the steps uses sudo, so login password will be asked)

In the example above I've passed the version of Facter, the version of Puppet and my system disk as parameter to the script.

Create a hello world puppet class

Create the file /etc/puppet/manifests/site.pp with the following content:

Create the file /etc/puppet/manifests/nodes.pp with the following content:

Run the example:

you should see something like:

Testing on the same computer

Run the puppet master

You should see something like:

Run the puppet agent in a separate shell by typing:

You should see something like:

Between computers (or virtual machines)

install Puppet using the shell script above.

If you run the agent as above, you'll get this error:

on the server, ensure puppet master is running, then

on the client machine, ensure puppet.conf has the server property set to the hostname of the server (or use --server in the command below) and do:

sudo puppet agent –waitforcert 60 –test --debug --no-daemonize

then on the server, on the a different shell than the on running puppet master, do:

until the command above is run on the server, the client will output the following message:

Then when the command to issue a certificate is run on the server, the server will output:

and the client will output:

Revoking a client's privilege to connect to the Puppet master

the client certificate's name is the lowercase hostname

To revoke a client's certificate and thus deny it's connection attempts, it's a two steps process.

First on the server, revoke the certificates:

Then on the client, remove the certificates:

In some circumstances, you will need to use the following command to completely remove the client certificate from the master:

Ruby errors:

If you encounter one of the following errors:

it's probably because you've got rvm installed.

You can make the problem go away by using system ruby:

I'm not happy about that solution, but I haven't find a better way so far.

Error about plugins when running the puppet agent:

If you see this error in the agent log:

The puppet master log would correspondingly display this:

ensure you've set pluginsync to false in the puppet.conf: pluginsync = false

Certificates errors:

so far, I solved them by deleting the /etc/puppet/ssl directory on client and master

  • use --debug and --verbose options to puppet commands

  • use --configprint to dump the value of a config property. E.g: puppet apply --configprint modulepath

  • use the notify keyword in your classes to print custom debug information

  • check the documentation

[1] http://trevmex.com/post/850520511/bootstrapping-puppet-on-mac-os-x

Language guide: http://docs.puppetlabs.com/guides/language_guide.html

Puppet Mac Download

Modules and classes: http://docs.puppetlabs.com/learning/modules1.html

Core Types Cheat sheet: http://docs.puppetlabs.com/puppet_core_types_cheatsheet.pdf