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

PuppetMaster Configuration for Linux & Windows Servers

PuppetMaster Configuration for Linux & Windows Servers

Managing infrastructure efficiently is essential for smooth operations. The PuppetMaster Configuration simplifies the process of managing both Linux and Windows environments. In this guide, we’ll walk through setting up PuppetMaster for automation on Linux (CentOS) and Windows Server 2012 nodes.

This configuration automates essential tasks such as installing EPEL, ClamAV, Tomcat, Nagios, OS patching, and creating users on Linux servers. For Windows servers, it automates Chocolatey installation, Tomcat setup, Nagios Client, Windows Update Services, and user creation.

PuppetMaster configuration process for Linux and Windows servers

How to Install and Set Up Puppet Server

The first step in setting up PuppetMaster Configuration is installing and configuring the Puppet server.

1. Install Puppet Server Repository

As a root user, enable the Puppet repository:

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

Verify the repository has been added:

yum repolist | grep puppet

Install Puppet server:

yum install puppetserver -y

2. Configure Java Memory Settings

Edit /etc/sysconfig/puppetserver to configure the Java memory:

JAVA_ARGS="-Xms2g -Xmx2g"

You can adjust this to 1g or 512m depending on your requirements.

3. Set Up Puppet Server

Edit the puppet.conf file at /etc/puppetlabs/puppet/puppet.conf and add the server address:

[agent]
server=puppetserver.zippyops.com

Start and enable Puppet server:

systemctl start puppetserver && systemctl enable puppetserver

The Puppet server is now ready.

PuppetDB Installation for Efficient Data Management

PuppetDB helps manage and store configuration data for efficient reporting and query execution. Here’s how to install and configure PuppetDB.

1. Install PostgreSQL

PuppetDB requires PostgreSQL 11. Add the PostgreSQL repository and install it:

rpm -Uvh https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
yum install postgresql11-server postgresql11-contrib -y

2. Configure PostgreSQL

Initialize the database:

/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl start postgresql-11 && systemctl enable postgresql-11

Create the puppetdb user and database:

sudo -iu postgres
createuser -DRSP puppetdb
createdb -E UTF8 -O puppetdb puppetdb
psql puppetdb -c 'create extension pg_trgm'

3. Install PuppetDB

Install PuppetDB:

rpm -Uvh https://yum.puppet.com/puppet6/puppet6-release-el-7.noarch.rpm
yum install puppetdb -y

Configure database settings by editing database.ini:

[database]
classname = org.postgresql.Driver
subprotocol = postgresql
subname = //localhost:5432/puppetdb
username = puppetdb
password = puppetdb

Start and enable PuppetDB:

systemctl start puppetdb && systemctl enable puppetdb

4. Update Puppet Server Configuration

Configure Puppet to use PuppetDB by editing puppet.conf:

[master]
storeconfigs = true
storeconfigs_backend = puppetdb

Restart Puppet server:

systemctl restart puppetserver

Installing PuppetBoard for Visualization

PuppetBoard is a web interface for visualizing data from PuppetDB. Follow these steps to set it up.

1. Install Dependencies

Install necessary dependencies:

yum install gcc python-devel python2-pip

2. Install PuppetBoard

Install PuppetBoard using pip:

pip install puppetboard

3. Configure the Web Interface

Create the PuppetBoard directory:

mkdir -p /var/www/html/puppetboard
cp /usr/lib/python2.7/site-packages/puppetboard/default_settings.py /var/www/html/puppetboard/settings.py

Edit settings.py:

PUPPETDB_HOST = 'puppetdb.zippyops.com'
PUPPETDB_PORT = 8081

4. Set Up Apache Server

Install Apache:

yum install httpd mod_wsgi -y

Create the Apache configuration file:

vi /etc/httpd/conf.d/puppetboard.conf

Start Apache:

systemctl start httpd

You can now access PuppetBoard through your browser.

Installing Essential Puppet Modules

To simplify management of your infrastructure, install necessary Puppet modules:

puppet module install puppetlabs-ntp
puppet module install aco-tomcat
puppet module install albatrossflavour-os_patching
puppet module install puppetlabs-chocolatey
puppet module install puppetlabs-wsus_client

Configuration for Linux and Windows Nodes

Here’s an example configuration for both Linux and Windows nodes.

For Linux Nodes:

node /server1.zippyops.com/ {
    include epel
    include clam
    include tomcat
    include nagios::client
    group { 'admin': ensure => present }
    user { 'admin': ensure => present, password => 'hashedpassword' }
    class { 'os_patching': patch_window => 'Week3' }
}

For Windows Nodes:

node /winserver2012.zippyops.com/ {
    include chocolatey
    package { 'avastfreeantivirus': ensure => 'installed', provider => 'chocolatey' }
    user { 'test': ensure => present, password => 'Master!@#123', groups => ['Users', 'Administrators'] }
    class { 'wsus_client': auto_install_minor_updates => true, auto_update_option => 'AutoInstall' }
}

ZippyOPS Solutions for Advanced Infrastructure Management

For even more advanced infrastructure management, ZippyOPS offers consulting, implementation, and managed services across areas like DevOps, DevSecOps, DataOps, Cloud, AIOps, MLOps, and more. Whether you’re handling microservices, security, or infrastructure, ZippyOPS can help streamline your operations.

Learn more about ZippyOPS’ offerings by visiting their services, solutions, and products.

For inquiries, reach out to sales@zippyops.com.

Conclusion on PuppetMaster Configuration

The PuppetMaster Configuration simplifies the process of managing Linux and Windows environments. By automating key tasks such as software installation, patching, and user creation, PuppetMaster enhances your infrastructure’s efficiency. PuppetDB and PuppetBoard further improve data management and visibility, making the system easier to monitor and maintain.

Leave a Comment

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

Scroll to Top