Services DevOps DevSecOps Cloud Consulting Infrastructure Automation Managed Services AIOps MLOps DataOps Microservices 🔐 Private AINEW Solutions DevOps Transformation CI/CD Automation Platform Engineering Security Automation Zero Trust Security Compliance Automation Cloud Migration Kubernetes Migration Cloud Cost Optimisation AI-Powered Operations Data Platform Modernisation SRE & Observability Legacy Modernisation Managed IT Services 🔐 Private AI DeploymentNEW Products ✨ ZippyOPS AINEW 🛡️ ArmorPlane 🔒 DevSecOpsAsService 🖥️ LabAsService 🤝 Collab 🧪 SandboxAsService 🎬 DemoAsService Bootcamp 🔄 DevOps Bootcamp ☁️ Cloud Engineering 🔒 DevSecOps 🛡️ Cloud Security ⚙️ Infrastructure Automation 📡 SRE & Observability 🤖 AIOps & MLOps 🧠 AI Engineering 🎓 ZOLS — Free Learning Company About Us Projects Careers Get in Touch

Puppet Server Setup on CentOS 7: Complete Guide

Puppet Server Setup on CentOS 7: Complete Guide

Efficiently managing and automating your IT infrastructure is crucial for organizations. Puppet Server is a powerful open-source tool that simplifies the automation of tasks, reduces errors, and speeds up application deployment. This guide provides a step-by-step approach for setting up Puppet Server and Puppet Agent on CentOS 7. With the right configuration, you can streamline operations across your entire system.

If you’re looking for expert help with DevOps, AIOps, or MLOps, ZippyOPS offers consulting, implementation, and managed services to optimize your Puppet setup and automate your infrastructure effectively.

Puppet Server and Agent Setup on CentOS 7

Prerequisites for Puppet Server Setup

Before setting up Puppet Server, ensure that both your master and client systems meet the following resource requirements:

Puppet Master Configuration

  • Operating System: CentOS 7 (Server installation)
  • CPU: 1 vCPU
  • RAM: 2 GB
  • Disk Space: 40 GB

Puppet Client Configuration

  • Operating System: CentOS 7 (Server installation)
  • CPU: 1 vCPU
  • RAM: 1 GB
  • Disk Space: 25 GB

Additionally, there are some preparatory steps to follow:

1. Install NTP for Time Synchronization

To ensure proper communication between Puppet Master and Puppet Agent, synchronize both systems with the same time. Install and configure NTP on both systems:

# yum -y install ntpdate

2. DNS Configuration

For communication to work correctly, the Puppet nodes must be able to resolve each other’s hostnames. You can either update the /etc/hosts file or configure a DNS server.

3. Add Puppet Repository

To install Puppet Server and Puppet Agent, add the Puppet repository to both master and client nodes:

# rpm -Uvh https://yum.puppet.com/puppet6-release-el-7.noarch.rpm

Installing Puppet Server

Now, let’s proceed with the installation and configuration of Puppet Server on CentOS 7.

Step 1: Install Puppet Server

Use the following command to install Puppet Server on the master node:

# yum install -y puppetserver

Step 2: Adjust Memory Allocation

Puppet Server uses 2GB of memory by default. If your server has more or less memory, you can modify this by editing the /etc/sysconfig/puppetserver file:

# vi /etc/sysconfig/puppetserver

For example, for 512MB of available memory, set the following:

JAVA_ARGS="-Xms512m -Xmx512m -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

Step 3: Start Puppet Server

Once the server is installed, start the Puppet service and enable it to start on boot:

# systemctl start puppetserver
# systemctl enable puppetserver

Step 4: Configure the Firewall for Puppet Server

Puppet Server uses port 8140 by default. To allow communication, configure the firewall to open this port:

# firewall-cmd --permanent --add-port=8140/tcp
# firewall-cmd --reload

Installing Puppet Agent

Once your Puppet Server is ready, you can proceed with the installation of the Puppet Agent on client nodes.

Step 1: Install Puppet Agent

To install the Puppet Agent on the client system, use the following command:

# yum install -y puppet-agent

Step 2: Configure Puppet Agent to Communicate with the Master

Edit the /etc/puppetlabs/puppet/puppet.conf file to configure the connection between the Puppet Agent and Puppet Master. Set the certname to the client hostname and server to the Puppet Master’s hostname:

# vi /etc/puppetlabs/puppet/puppet.conf

Example configuration:

[main]
certname = www.puppetclient.zippyops.com
server = www.puppetmaster.zippyops.com

Step 3: Start Puppet Agent

To start the Puppet Agent and ensure it runs automatically on boot:

# puppet resource service puppet ensure=running enable=true

Signing the Agent Certificate

After setting up the Puppet Agent, the Puppet Master must sign the certificate request from the client node before it can start receiving configurations.

Step 1: List Certificate Requests

To view the pending certificate requests, run:

# puppetserver ca list

Step 2: Sign the Certificate

To sign the agent’s certificate, run:

# puppetserver ca sign --certname www.puppetclient.zippyops.com

You can also sign all pending requests at once:

# puppetserver ca sign --all

Step 3: Verify the Puppet Client

Once the certificate is signed, verify the client’s setup by running the following on the Puppet Agent:

# puppet agent --test

This will confirm that the client is receiving configurations from the Puppet Master.


Conclusion on Setting up Puppet Server and Puppet Agent

You’ve now successfully set up Puppet Server and Puppet Agent on CentOS 7. By automating infrastructure management with Puppet, you can streamline your operations and reduce manual errors.

For businesses looking to further optimize their IT infrastructure, ZippyOPS offers expert consulting and managed services for DevOps, AIOps, and MLOps solutions, ensuring smooth automation across your entire environment.

To learn more about our services, visit our service page. If you need personalized help, feel free to reach out to us at sales@zippyops.com.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top