Followers

Puppet- Installation

Step 1: Update Package List

Before you start the installation process, update the list of available packages:

sudo apt-get update -y

Before installing Puppet, update your Ubuntu system

Step 2: Set Up Hostname Resolution

  With Puppet, master and client nodes communicate using hostnames. Before installing Puppet, you need to set up a unique hostname on each node.

1. Open the hosts file on each node by using:

sudo nano /etc/hosts

2. Paste the following lines at the end of each hosts file:

[puppet master ip] puppetmaster puppet
[puppet client ip] puppetclient

Where:

  • [puppet master ip] is the IP address of the master node, and
  • [puppet client ip] is the IP address of the client node.
Edit the hosts file on each of your nodes

3. Press Ctrl + X to close the file, and then type Y and press Enter to save the changes you made.

Step 3: Install Puppet Server on Master Node

1. Download the latest Puppet version on the master node:

wget https://apt.puppetlabs.com/puppet6-release-focal.deb

Download the Puppet installation files

2. Once the download is complete, install the package by using:

sudo dpkg -i puppet6-release-focal.deb

Deploy the Puppet installation

3. Update the package repository:

sudo apt-get update -y

4. Install the Puppet server with the following command:

sudo apt-get install puppetserver -y

5. Open the puppetserver file by using:

sudo nano /etc/default/puppetserver

6. In the puppetserver file, modify the following line to change the memory size to 1GB:

JAVA_ARGS="-Xms1g -Xmx1g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

Edit the puppetserver file to change available RAM to 1GB

7. Press Ctrl + X to close the puppetserver file. Type Y and press Enter to save the changes you made.

8. Start the Puppet service and set it to launch on system boot by using:

sudo systemctl start puppetserver
sudo systemctl enable puppetserver

Start up the puppetserver service

9. Check if the Puppet service is running with:

sudo systemctl status puppetserver

Check the status of the puppetserver service

Step 4: Install Puppet Agent on Client Node

1. Download the latest version of Puppet on a client node:

wget https://apt.puppetlabs.com/puppet6-release-focal.deb

2. Once the download is complete, install the package by using:

sudo dpkg -i puppet6-release-focal.deb

3. Update the package repository one more time:

sudo apt-get update -y

4. Install the Puppet agent by using:

sudo apt-get install puppet-agent -y

5. Open the Puppet configuration file:

sudo nano /etc/puppetlabs/puppet/puppet.conf

6. Add the following lines to the end of the Puppet configuration file to define the Puppet master information:

[main]
certname = puppetclient
server = puppetmaster

Edit the Puppet configuration file

7. Press Ctrl + X to close the Puppet configuration file, then type Y and press Enter to save the changes.

8. Start the Puppet service and set it to launch on system boot by using:

sudo systemctl start puppet
sudo systemctl enable puppet

9. Check if the Puppet service is running with:

sudo systemctl status puppet

Check the status of the Puppet service

Step 5: Sign Puppet Agent Certificate

1. Using the Puppet master node, list all the available certificates:

sudo /opt/puppetlabs/bin/puppetserver ca list --all

List available certificates on the master node

2. Sign the certificates with:

sudo /opt/puppetlabs/bin/puppetserver ca sign --all

3. Use the following command to test the communication between the master and client nodes:

sudo /opt/puppetlabs/bin/puppet agent --test

Below is the puppet manifest directory/etc/puppetlabs/code/environments/production/manifests/site.pp

COMMENTS

Name

Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,Jira,1,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
ltr
static_page
DevOpsWorld: Puppet- Installation
Puppet- Installation
DevOpsWorld
https://www.devopsworld.co.in/p/puppet-installation.html
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/p/puppet-installation.html
true
5997357714110665304
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content