arrow-down coffee engineering consultancy development remote-management support linkedin twitter youtube email phone gitlab github

Discovering Puppet with Learning Puppet VM

Submitted by Melinda Kiss on November 30, 2016

When I joined to Olindata as a junior MySQL DBA I only had a vague idea about how Puppet, this open-source configuration management tool works in reality. I never really worked with a system like that, so I have been asked if I can learn it with Puppet Learning VM, which you can download from the following link here. This post is about how to set it up and what challenges you might encounter in this journey.

First of all let’s see the necessary tools/programs/requirements to set up Puppet Learning VM on your computer.

  • A computer with high enough RAM (They are asking you to allocate for optimal use 4G memory, my old laptop only had 4G RAM so even booting this on 2-3G RAM was freezing the whole system.)
  • min. 100G free disk-space. You can make due with less disk space if you don't have this much.
  • Up to date virtualization software (vmware player, virtualbox etc.)
  • Good Internet access
  • 2.5 Ghz (or better) CPU with 64-bit architecture
  • Command line experience would help you a lot

Installing virtualbox in let’s say Ubuntu you can do with the following command:

sudo apt-get install virtualbox

When all requirements are in place, go ahead and download the zip-file from the website (it can take a while (3.1G at this moment) depending on the speed of your Internet). Unzip it and start up your virtualization software. In this case I’m going to use virtualbox.

The .ova file (Open Virtualization Archive) must be “imported” instead of opening it directly. I show you a screen-shot how its done in virtualbox (File menu then Import Appliance):

Before you boot up your freshly installed Puppet Learning VM, make sure the virtual machine was configured correctly. In the “Setting” under the “System” tab you can find specifics for Memory, as I said before make sure it's min. 4G RAM. Then also set in the “Network” tab like the following screen-shot:

The name of the adapter to bridge to is automatically filed in, you don’t have to worry about it, if its not the same on your system.

Now you are ready to go and play around with Learning Puppet VM. Please note down the IP-address and the password it gives you, cause it’s generally a good idea not to directly log in to the virtual machine it self from the virtualization software, but open your favorite terminal and just use ssh to get in to the machine.

If you don’t know too much or almost nothing about how Puppet works, there is a Quest-Guide which provides a ton of information and hands-on experience what Puppet can do and how you can build up your Puppet code and how this whole thing holds together.

I found it very useful, however some information inside is not up to date, and you can encounter some problems if you are not following it precisely.

Like in the first quest the version number already at 4.7.0 (at this moment). Also I made a mistake once installing the module called “dwerder-graphite” in the quest of “The Power of Puppet” and I nicely ignored the version number, which resulted the following error message when I tried to run puppet agent –test:

Evaluation Error: Error while evaluating a Function Call, having $gr_web_server => 'none' requires use of $gr_web_user and $gr_web_group at /etc/puppetlabs/code/environments/production/modules/graphite/manifests/config.pp:65:9 on node learning.pppetlabs.vm

After playing around with the classes and their parameters in the PE console, I had to give up for getting Learnig Puppet VM working with the latest “dwerder-graphite” and run the following command, which fixed the problem, so I could continue my learning curve.

puppet module uninstall dwerder-graphite && puppet module install dwerder-graphite -v 5.16.1

At the end of the day, I think it’s a really good guide to get you through your first Puppet experience, explaining the basics of how Puppet works and why. If you would like to contribute to the Quest Guide, you can find it here. Also if your vm’s IP-address constantly changes because you connected to different networks, you can still follow the Quest Guide from a static url here.