Install Puppet Server

Ticker

6/recent/ticker-posts

Install Puppet Server


Question : The Nautilus DevOps team started experimenting with the Puppet server to manage some of their infrastructure in Stratos DC. For testing different scenarios, the team will be using jump host as puppet master. At this point we just need to install puppet server package and ensure its service is up and running. Below you can find more details about the task.

Install puppetserver package on jump host and start its service.

Before starting puppetserver service, you might need to change its memory allocation configuration. We recommend to allocating it 512m of memory.

Note: Please make sure to install puppetserver package only not any other alternate package.


Please Note :-  Perform the below commands based on your question  server,  user name & other details might differ . So please read task carefully before executing. All the Best 👍


Solution: 

1. To install the puppet Server package, 1st we need to install the puppet repo

root@jump_host /# yum install https://yum.puppetlabs.com/puppet-release-el-7.noarch.rpm

Loaded plugins: fastestmirror, ovl

puppet-release-el-7.noarch.rpm                                                                        | 9.7 kB  00:00:00    

Examining /var/tmp/yum-root-fFPAAz/puppet-release-el-7.noarch.rpm: puppet-release-1.0.0-14.el7.noarch

Marking /var/tmp/yum-root-fFPAAz/puppet-release-el-7.noarch.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package puppet-release.noarch 0:1.0.0-14.el7 will be installed

--> Finished Dependency Resolution

 Dependencies Resolved

 =============================================================================================================================

 Package                     Arch                Version                      Repository                                Size

=============================================================================================================================

Installing:

 puppet-release              noarch              1.0.0-14.el7                 /puppet-release-el-7.noarch              5.1 k

 

Transaction Summary

=============================================================================================================================

Install  1 Package

 

Total size: 5.1 k

Installed size: 5.1 k

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : puppet-release-1.0.0-14.el7.noarch                                                                        1/1

  Verifying  : puppet-release-1.0.0-14.el7.noarch                                                                        1/1

 Installed:

  puppet-release.noarch 0:1.0.0-14.el7                                                                                      

 Complete!

root@jump_host /#

  

2. Install Puppet Server packages   

root@jump_host /# yum install puppetserver

Loaded plugins: fastestmirror, ovl

Determining fastest mirrors

epel/x86_64/metalink                                                                                  |  34 kB  00:00:00    

 * base: linux.darkpenguin.net

 * epel: mirror.23media.com

 * extras: linux.darkpenguin.net

 * updates: linux.darkpenguin.net

base                                                                                                  | 3.6 kB  00:00:00    

epel                                                                                                  | 4.7 kB  00:00:00     

extras                                                                                                | 2.9 kB  00:00:00    

puppet                                                                                                | 2.5 kB  00:00:00    

updates                                                                                               | 2.9 kB  00:00:00    

(1/7): base/7/x86_64/primary_db                                                                       | 6.1 MB  00:00:00    

(2/7): extras/7/x86_64/primary_db                                                                     | 242 kB  00:00:00    

(3/7): epel/x86_64/group_gz                                                                           |  96 kB  00:00:00    

 (4/7): updates/7/x86_64/primary_db                                                                    | 9.5 MB  00:00:00    

(5/7): epel/x86_64/primary_db                                                                         | 6.9 MB  00:00:00    

(6/7): epel/x86_64/updateinfo                                                                         | 1.0 MB  00:00:00    

(7/7): puppet/x86_64/primary_db                                                                       |  90 kB  00:00:00    

Resolving Dependencies

--> Running transaction check

---> Package puppetserver.noarch 0:7.2.1-1.el7 will be installed

--> Processing Dependency: puppet-agent >= 6.16.0 for package: puppetserver-7.2.1-1.el7.noarch

--> Processing Dependency: java-1.8.0-openjdk-headless for package: puppetserver-7.2.1-1.el7.noarch

--> Processing Dependency: /usr/bin/which for package: puppetserver-7.2.1-1.el7.noarch

--> Running transaction check

---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.292.b10-1.el7_9 will be installed

--> Processing Dependency: tzdata-java >= 2021a for package: 1:java-1.8.0-openjdk-headless-1.8.0.292.b10-1.el7_9.x86_64

:00    

(14/17): which-2.20-7.el7.x86_64.rpm                                                                  |  41 kB  00:00:00    

warning: /var/cache/yum/x86_64/7/puppet/packages/puppetserver-7.2.1-1.el7.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 9e61ef26: NOKEY

Public key for puppetserver-7.2.1-1.el7.noarch.rpm is not installed

(15/17): puppetserver-7.2.1-1.el7.noarch.rpm                                                          |  62 MB  00:00:01    

(16/17): java-1.8.0-openjdk-headless-1.8.0.292.b10-1.el7_9.x86_64.rpm                                 |  33 MB  00:00:01    

(17/17): puppet-agent-7.9.0-1.el7.x86_64.rpm                                                          |  25 MB  00:00:01    

-----------------------------------------------------------------------------------------------------------------------------

Total                                                                                         88 MB/s | 123 MB  00:00:01    

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release

Importing GPG key 0xEF8D349F:

 Userid     : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>"

 Fingerprint: 6f6b 1550 9cf8 e59e 6e46 9f32 7f43 8280 ef8d 349f

 Package    : puppet-release-1.0.0-14.el7.noarch (installed)

 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release

Is this ok [y/N]: y

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-2025-04-06-puppet-release

Importing GPG key 0x9E61EF26:

 Userid     : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release@puppet.com>"

 Fingerprint: d681 1ed3 adee b844 1af5 aa8f 4528 b6cd 9e61 ef26

 Package    : puppet-release-1.0.0-14.el7.noarch (installed)

 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-2025-04-06-puppet-release

Is this ok [y/N]: y

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : libxslt-1.1.28-6.el7.x86_64                                                                              1/17

  Installing : python-lxml-3.2.1-4.el7.x86_64                                                                           2/17

  Installing : python-javapackages-3.4.1-11.el7.noarch                                                                  3/17

  Installing : javapackages-tools-3.4.1-11.el7.noarch                                                                   4/17

  Installing : avahi-libs-0.6.31-20.el7.x86_64                                                                          5/17

 

Installed:

  puppetserver.noarch 0:7.2.1-1.el7                                                                                         

 

Dependency Installed:

  avahi-libs.x86_64 0:0.6.31-20.el7                                      copy-jdk-configs.noarch 0:3.3-10.el7_5             

  

Complete!

root@jump_host /#


3.  Check the existing configuration & edit the Puppet configuration file and change memory allocation as per task.     ( Please refer to your task, also watch the video below)

root@jump_host /# cat /etc/sysconfig/puppetserver |grep JAVA

JAVA_BIN="/usr/bin/java"

JAVA_ARGS="-Xms2g -Xmx2g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

# Modify this as you would JAVA_ARGS but for non-service related subcommands

JAVA_ARGS_CLI="${JAVA_ARGS_CLI:-}"

root@jump_host /#

root@jump_host /# vi /etc/sysconfig/puppetserver

root@jump_host /# cat /etc/sysconfig/puppetserver |grep JAVA

JAVA_BIN="/usr/bin/java"

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

# Modify this as you would JAVA_ARGS but for non-service related subcommands

JAVA_ARGS_CLI="${JAVA_ARGS_CLI:-}"

root@jump_host /#


4.  Start the puppet server and check the status 

root@jump_host /# systemctl start puppetserver

root@jump_host /# systemctl enable puppetserver

Created symlink from /etc/systemd/system/multi-user.target.wants/puppetserver.service to /usr/lib/systemd/system/puppetserver.service.

root@jump_host /#

root@jump_host /# systemctl status  puppetserver

● puppetserver.service - puppetserver Service

   Loaded: loaded (/usr/lib/systemd/system/puppetserver.service; enabled; vendor preset: disabled)

   Active: active (running) since Fri 2021-07-23 14:10:24 UTC; 29s ago

 Main PID: 369 (java)

   CGroup: /docker/21a9bccc9ca3cc886e41787b47b59362f03bd04fbb4d35cfbf1c468de771b10d/system.slice/puppetserver.service

           └─369 /usr/bin/java -Xms512m -Xmx512m -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger -XX:OnO...

 

Jul 23 14:10:06 jump_host.stratos.xfusioncorp.com systemd[1]: Starting puppetserver Service...

Jul 23 14:10:24 jump_host.stratos.xfusioncorp.com systemd[1]: Started puppetserver Service.

root@jump_host /#



5.  Click on Finish & Confirm to complete the task successfully

Happy Learning!!!!


Apart from this if you need more clarity,  I have made a  tutorial video on this , please go through and share your comments. Like and share the knowledge



Post a Comment

0 Comments

Latest Posts

KodeKloud Kubernetes Security CKS  Lab Challenge 4 |  Audit-policy | Install & configure falco utility | Inspect the API server audit logs and identify the user