Beginning adventures with Puppet from PuppetLabs

Recently, I’ve decided to start learning Puppet from PuppetLabs.

I created a CentOS VM using VMWare Player and have been setting up an environment in which I can use Puppet to provision an AWS EC2 server and set up services, etc.

Unfortunately, I’ve had some issues with getting the Cloud Provisioner to work.

The Puppet website says to install the Cloud Provisioner, you install Puppet and it asks you if you wish to install the Provisioner during installation. However, their site recommends installing Puppet using YUM and not the tarball. ¬†The YUM installer does not ask if you wish to install the Cloud Provisioner so that does not help. The website also says you can post-install it by downloading the tarball and use YUM to install it from the ‘packages’ directory in the tarball. Unfortunately, the tarball does not have a ‘packages’ directory in it, so that does not help.

I did find a Cloud Provisioner Puppet module which could be installed to provide the Cloud Provisioner node_aws. This breaks the ‘puppet node’ command¬†as I discovered after many attempts to get it to work. I found on the Puppet discussion group a post a couple of years ago, which apparently has not been resolved.

[Puppet – Bug #16651] Installing the cloud provisioner module breaks the node subcommand

This is the sort of error you now get:

[root@centos ~]# puppet help node_aws
Error: Could not autoload puppet/face/node_aws/list: no such file to load -- guid
Error: Could not load help for the face node_aws.
Please check the error logs for more information.
 
Detail: "Could not autoload puppet/face/node_aws/list: no such file to load -- guid"
 
Error: Try 'puppet help help help' for usage

After some Googling around it appeared I needed to install ‘guid’. So, I did. YUM could not find ‘rubygem-guid’ but gem did:

[root@centos ~]# gem install guid
Successfully installed guid-0.1.1
1 gem installed
Installing ri documentation for guid-0.1.1...
Installing RDoc documentation for guid-0.1.1...

So, let’s try node_aws in the puppet help:

[root@centos ~]# puppet help node_aws
Error: Could not autoload puppet/face/node_aws/list: no such file to load -- fog
Error: Could not load help for the face node_aws.
Please check the error logs for more information.
 
Detail: "Could not autoload puppet/face/node_aws/list: no such file to load -- fog"
 
Error: Try 'puppet help help help' for usage

Oh dear. Well, can we install fog?

[root@centos ~]# gem install fog
ERROR:  Error installing fog:
        mime-types requires Ruby version >= 1.9.2.
 
[root@centos ~]# ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Nope! I did some more Googling around and discovered Puppet requires Ruby 1.8 so no point in upgrading to 1.9.2 just for fog. At this point, I’m at a loss and will keep slugging it out, but I’m sure it should not be this difficult!

For now, I’ve uninstalled the cloud_provisioner module:

[root@centos ~]# puppet module uninstall puppetlabs-cloud_provisioner
Notice: Preparing to uninstall 'puppetlabs-cloud_provisioner' ...
Removed 'puppetlabs-cloud_provisioner' (v1.1.4) from /etc/puppet/modules
[root@centos ~]# puppet help node_aws
Error: Could not load help for the face node_aws.
Please check the error logs for more information.
 
Detail: "Could not find Puppet Face node_aws"
 
Error: Try 'puppet help help help' for usage



  1. UPDATE:

    As a follow-up I’ve discovered that the Cloud Provisioner install IS in the Puppet tarball. You just have to know which one.
    There’s Puppet Agent, Puppet Open Source and Puppet Enterprise.

    Puppet Enterprise is the tarball which contains the Cloud Provisioner. So if you want to install that, PE is the one to download.

Leave a Comment

%d bloggers like this: