Puppet Master Installation on CentOS 7

Posted: November 1, 2018 in Linux, puppet

Make sure DNS resolution is in place.This is needed in case no central DNS server is available:

cat /etc/hosts
192.168.1.97 puppetmaster
Add puppet repository:
rpm -Uvh https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm
Install Puppet:
sudo yum -y install puppetserver
#check version:
/opt/puppetlabs/bin/puppet --version
#Add Puppet path to Environmental variable:
export PATH=/opt/puppetlabs/bin:$PATH
source ~/.bash_profile
Alocate memory:

 

In this example 1GB of RAM is allocated to puppet:
Edit /etc/sysconfig/puppetserver
#Now change the line as below (Replace 1 with number of GBs)
JAVA_ARGS="-Xms1g -Xmx1g ...."
#Save and exit.

 

Edit /etc/puppetlabs/puppet/puppet.conf (make sure to put here puppet server name resolvable from DNS and from nodes)

[master]
 
[main]
environment = production
runinterval = 5s

 

 

Enable/start puppet service

systemctl start puppetserver
systemctl enable puppetserver
Open port 8140 if firewalld is running
firewall-cmd --add-port=8140/tcp --permanent
firewall-cmd --reload

 

Add path to puppet command to VISUDO

 

sudo visudo
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin

 

Disable agent (one time run)

 

If we want “one time” run (execute some manifest and stop contacting Puppet master, we can configure agent to stop-at the end of manifest file)

service { 'puppet':
  ensure => 'stopped',
  enable => 'false',
}

 

 

 

 

 

Advertisements
Comments
  1. […] In last post we installed Puppet server, in this one we’ll install Puppet agent on Windows server […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s