Installing Puppet agent: Linux
Install the Puppet agent so that your master can communicate with your Linux nodes.
Before you begin: Review the pre-install tasks and installing Puppet Server.
-
Install a release package to enable Puppet Platform repositories.
-
Confirm that you can run Puppet executables.
The location for Puppet’s executables is
/opt/puppetlabs/bin/
, which is not in yourPATH
environment variable by default.The executable path doesn’t matter for Puppet services — for instance,
service puppet start
works regardless of thePATH
— but if you’re running interactivepuppet
commands, you must either add their location to yourPATH
or execute them using their full path.To quickly add the executable location to your
PATH
for your current terminal session, use the commandexport PATH=/opt/puppetlabs/bin:$PATH
. You can also add this location wherever you configure yourPATH
, such as your.profile
or.bashrc
configuration files.For more information, see details about file and directory locations.
-
Install the
puppet-agent
package on your Puppet agent nodes using the command appropriate to your system:- Yum –
sudo yum install puppet-agent
- Apt –
sudo apt-get install puppet-agent
- Zypper –
sudo zypper install puppet-agent
- Yum –
-
(Optional) Configure agent settings.
For example, if your master isn’t reachable at the default address,
server = puppet
, set theserver
setting to your Puppet master’s hostname with the following command:puppet config set server <MASTER FDQN> --section main
.For other settings you might want to change, see a list of agent-related settings.
-
Start the
puppet
service:sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
. -
(Optional) To see a sample of Puppet agent’s output and verify any changes you may have made to your configuration settings in step 5, manually launch and watch a Puppet run:
sudo /opt/puppetlabs/bin/puppet agent --test
-
Sign certificates on the certificate authority (CA) master.
On the Puppet master:
- Run
sudo /opt/puppetlabs/bin/puppet cert list
to see any outstanding requests. - Run
sudo /opt/puppetlabs/bin/puppet cert sign <NAME>
to sign a request.
As each Puppet agent runs for the first time, it submits a certificate signing request (CSR) to the CA Puppet master. You must log into that server to check for and sign certificates. After an agent’s certificate is signed, it regularly fetches and applies configuration catalogs from the Puppet master.
- Run