Although Puppet is inherently cross-platform and works with many different operating systems, for the purposes of this book, I'm going to focus on just one operating system, namely the Ubuntu 16.04 LTS distribution of Linux, and the most recent version of Puppet, Puppet 5. However, all the examples in the book should work on any recent operating system or Puppet version with only minor changes.
You will probably find that the best way to read this book is to follow along with the examples using a Linux machine of your own. It doesn't matter whether this is a physical server, desktop or laptop, cloud instance, or a virtual machine. I'm going to use the popular Vagrant software to run a virtual machine on my own computer, and you can do the same. The public GitHub repository for this book contains a Vagrantfile, which you can use to get up and running with Puppet in just a few steps.
To get a copy of the repo that accompanies this book, follow these steps:
git clone https://github.com/bitfield/puppet-beginners-guide-3.git
If you already have a Linux machine or cloud server you'd like to use for working through the examples, skip this section and move on to the next chapter. If you'd like to use VirtualBox and Vagrant to run a local virtual machine (VM) on your computer to use with the examples, follow these instructions:
Once you have installed Vagrant, you can start the Puppet Beginner's Guide virtual machine:
cd puppet-beginners-guide-3 scripts/start_vagrant.sh
Vagrant will begin downloading the base box. Once that has booted, it will install Puppet. This may take a while, but once the installation is complete, the virtual machine will be ready to use.
vagrant ssh
puppet --version 5.2.0
If you're using Windows, you may need to install the PuTTY software to connect to your VM. There is some helpful advice about using Vagrant on Windows at:
http://tech.osteel.me/posts/2015/01/25/how-to-use-vagrant-on-windows.html
If you have any problems running the VM, look for help on the VirtualBox or Vagrant websites. In particular, if you have an older machine, you may see a message like the following:
VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.
Your computer may have a BIOS setting to enable 64-bit hardware virtualization (depending on the manufacturer, the trade name for this is either VT-x or AMD-V). Enabling this feature may fix the problem. If not, you can try the 32-bit version of the Vagrant box instead. Edit the file named Vagrantfile
in the Git repository, and comment out the following line with a leading #
character:
config.vm.box = "ubuntu/xenial64"
Uncomment the following line by removing the leading #
character:
# config.vm.box = "ubuntu/xenial32"
Now re-run the scripts/start_vagrant.sh
command.
3.137.173.249