A little over a year ago I wrote a three-part series on learning Puppet, which is a configuration management and automation tool that you can use to manage your entire environment. When listening to a recent Puppet Labs podcast I learned that the Puppet Learning VM had been updated.
I checked it out, and I think Puppet has come a long way in one year. The Learning VM is now a little easier to understand, and Puppet made it more fun by creating quests for people to follow. I describe how to deploy the new Puppet Learning VM and some of the quests.
Getting started with the Puppet Learning VM
- Download the Puppet Learning VM.
- Extract the files from the zip file (which should contain a .vmx, .vmdk, and the quests file).
- Open your virtualization platform of choice (I'm using VMware Workstation, but Player, Fusion, and VirtualBox will work as well) and click Create New Virtual Machine.
- Select the .vmx file and start the VM.
- Log in to the VM using root/puppet as your credentials.
You can also SSH into the Puppet Learning VM without any further configuration — SSH has already been enabled for you. The console will tell you which IP address it has picked up. You can also use the IFCONFIG command to see what the IP address is.
At the command line type:
quest —start welcome
This will start your quest as you can see in the terminal window (Figure A).
The first quest is mostly about familiarizing yourself with the VM and the quest concept. It asks you to find the version of Puppet (command: puppet -V), see the options available (command: quest —help), and check the progress of your quest (command: quest —progress). For some reason when I did the quest it wasn't registering that I had completed the "check the version" task, so I logged out, logged back in, and ran it again; the quest status updated to 3/3 tasks completed.
The next quest gets a little more into using the "Power of Puppet," which is what the section is called in the Quest Guide (it's in the zip file you downloaded for the Puppet Learning VM). It has you set up a website that serves the Quest Guide from your Puppet VM. This quest also lets you use the Forge, which is where users share Puppet code, and the Puppet Enterprise Console (not available in the free version of Puppet).
To begin this quest type:
quest —start power
We have three tasks to complete. Some of these tasks use modules found using the Puppet Enterprise modules, which may not be available if you aren't using Puppet Enterprise beyond this learning VM.
We'll need the apache service in order to serve out a website, and luckily there is a module available that will make it easy to install.
puppet module install puppetlabs-apache
It's great that the Puppet team also thought of those who may not have internet access. If that's the case, you can look in the Guest Guide to figure out how to install apache from a local directory.
The second task is to use the facter tool to find your IP address. Granted, IFCONFIG works just as well, but in order to complete the task and start getting familiar with the facter tool run the command:
You can use this IP address to open a browser to https://IP_Address, which takes you to the Puppet Enterprise GUI (Figure B).
Using the Puppet Enterprise Console GUI, you'll add the lvmguide class to enable you to configure the VM as a webserver. You can do this by clicking the Add Classes button and searching for the lvmguide class. Then, put a checkmark next to it and click Add Selected Classes. You'll classify your learning VM with the lvmguide class by clicking the Nodes button and adding the class to your node by editing the node.
The third task is to manually update the Puppet VM by running an agent command (command: puppet agent —test). Then, you can test that the website is being served out by going to http://IP_Address.
Video walk-through of additional quests
In this video, you'll see quests that cover learning about Resources and creating your first Manifest, which will get rid of a user created during the Resources quest. To follow along with the video, please see quests Resources and Manifest in the Quest Guide.
I'm impressed with the work Puppet has put into the documentation and education to help people get started. If you are using Puppet or have questions about it, please post in the comments section.
Lauren Malhoit has been in the IT field for over 10 years and has acquired several data center certifications. She's currently a Technology Evangelist for Cisco focusing on ACI and Nexus 9000. She has been writing for a few years for TechRepublic, Tech Pro Research, and VirtualizationAdmin.com. As a Cisco Champion, EMC Elect, VMware vExpert, and PernixPro, Lauren stays involved in the IT community. Lauren has been a delegate for Tech Field Day and has also authored a book called VMware vCenter Operations Manager Essentials.