As a companion to my series on managing Windows Server with Puppet Enterprise, this short two-part article will guide you through installing your own Puppet 5 server on Red Hat Linux in Hyper-V.
If you are wondering why I’m writing about Linux on Petri, you might have missed my series of articles on managing Windows Server using Puppet. So far, there are seven parts and you can find the links below. Puppet is a more mature configuration management solution than Microsoft’s PowerShell Desired State Configuration (DSC) and natively manages both Windows and Linux.
Managing Windows Server with Puppet Part 1: Configure Puppet Master and Bootstrap the Puppet Agent in Windows Server
Managing Windows Server with Puppet Part 2: Log in to Puppet Master, Accept Node Certificate, and Test Connectivity
Managing Windows Server with Puppet Part 3: Install Modules and Edit the Site Manifest
Managing Windows Server with Puppet Part 4: Working with Files and ACLs
Managing Windows Server with Puppet Part 5: Managing Local Users and Groups
Managing Windows Server with Puppet Part 6: Installing, Updating, and Removing Software
Managing Windows Server with Puppet Part 7: Installing Active Directory
In the articles, I have been using a Puppet Master server automatically deployed in the Azure cloud using a template provided by Microsoft. But what if you want to install your own Puppet Master locally or in a virtual machine? That’s what I’m going to show you how to do in this article.
I must confess that I’m not a Linux expert. For the purposes of this article I’m going to use Red Hat Linux Enterprise (RHEL). There are several different Linux distributions that you could use for your Puppet Master server but I know that RHEL is officially supported by Puppet, that it works with Hyper-V, and that it is a commonly deployed Linux distribution. For more information on supported Linux distributions, see Puppet’s website here. The instructions that follow have been tested in RHEL and Hyper-V. I can’t promise that they will work with any other Linux distribution or hypervisor.
Unlike Windows, which will work for a time-limited period without activation, before you can do anything useful with RHEL, you’ll need to register and subscribe the OS. And before you can do that, you must have an active Red Hat Developer Program account and accept Red Hat’s T&Cs. If you don’t already have an account, sign up here. As part of the registration process, you’ll need to confirm your account by clicking on a link sent to you via email.
Once you have registered, logged in to your developer account and accepted the T&Cs, download the latest version of RHEL DVD ISO here. Save it to your local hard drive in the C:\Users\Public\Downloads folder.
Now you have a registered developer account and have downloaded the RHEL DVD ISO, we can install Linux in Hyper-V on Windows 10 or Windows Server.
Note that if you are running the latest version of Windows 10 and you have compatible hardware, Hyper-V should already be installed. If not, you can install it by running the following command in an elevated PowerShell prompt:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Note that you will need Internet connectivity to download the components required for Puppet and to register and subscribe the OS. If you need to change any of the VM’s default settings, you can click Edit settings before connecting to the VM.
Now we are ready to begin the Linux installation process.
Note that in a production environment, you should create at least one user account and use SUDO to elevate to root when required. To keep things simple, I will just use the root account in this demonstration.
Now sit back and wait for Linux to install. Don’t forget to click Reboot once the install has completed.
Once the server has rebooted, you’ll need to log in, register, and subscribe your copy of Red Hat.
That’s it! RHEL is now ready to use. In the next and final part of this article, I’ll show you how to set up Puppet 5.