puppet robots

How to install Puppet on CentOS7

3 min read
Christopher Carfi

Puppet is a configuration management tool designed to allow users to define the state of complex IT infrastructures in the easiest way possible. Once those definitions are created, Puppet will automatically enforce those rules across each node. After installation, a Puppet agent is placed on every server, device and even virtual machine in an IT infrastructure. As a result, Puppet allows you to automate certain tasks that are traditionally accomplished manually, significantly reducing the amount of time needed to manage these activities on a daily basis. Do note that unlike other Linux variants, CentOS 7 does not yet have Puppet in the default repository list. As a result, you'll need to complete a few basic steps before you can move along to the installation process.

To set up Puppet, you'll need a live Linux server (that you can tweak) with a dedicated IP address and a way to connect to it. We recommend a GoDaddy Virtual Private Server if you're just getting started, or a full dedicated server if you’re ready to take total control. To connect to your server, you'll need some kind of an SSH client. Google it, or try PuTTY (Windows) or Terminal (Mac).

[requirements difficulty="3" time="15"]

Adding Puppet to your CentOS 7 repository list, though a mandatory step, should only take a few moments. Open the Terminal window and input the following command:1. Add Puppet to your CentOS repository list.

rpm -ivh https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-11.noarch.rpm

The necessary files will download to your machine and you can then move on with the rest of the process.

2. Install Puppet server.

Return to the Terminal window to download and install the necessary Puppet-Server files directly from the product's developer, Puppet Labs. To do so, enter the following command:

yum install -y puppet-server

When prompted, enter your administrator password to allow the installation process to complete.

3. Add the Puppet secure HTTP server to the CentOS firewall.

To make sure that Puppet is capable of running correctly across your infrastructure, you'll need to make sure that you add an exception to your firewall configuration. To do that, execute the following command in the Terminal window:

firewall-cmd --zone=public --add-port=XXXX/tcp --permanent

Replace XXXX with the port number that you plan on using. You can then reload your firewall so that the new settings will go into effect with the following command:

firewall-cmd --reload

4. Verify that Puppet has installed correctly by executing Puppet-Server.

Once properly installed, the easiest way to test to make sure that Puppet has installed correctly is by executing the Puppet-Server with the following command:

systemctl start  puppetmaster.service

5. Install the Puppet client on your nodes.

Once the Puppet-Server has been installed, you will need to install the Puppet Client on each node in your infrastructure before work can begin in earnest. To do this, follow the steps above to complete the addition of the Puppet Labs repository on each machine and use the following command in the Terminal to install the Puppet client:

yum install -y puppet

As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Third-party marks and logos are registered trademarks of their respective owners. All rights reserved.

Products Used