Install agents with the install script
You can use the install script for *nix, Windows, and macOS nodes. The install script installs and configures the agent on target nodes using installation packages from the Puppet Enterprise (PE) package management repo.
The agent install script performs these actions:
- Detects the operating system on which it's running, sets up an
apt
,yum
, orzipper
repo that refers back to the primary server, and then pulls down and installs thepuppet-agent
packages. If the install script can't find agent packages corresponding to the agent's platform, it fails with an error telling you whichpe_repo
class you need to declare on the primary server (in the console at Node Groups > PE Master > Classes). - Downloads a plug-in tarball from the primary server. This feature is controlled
by the
pe_repo::enable_bulk_pluginsync
andpe_repo::enable_windows_bulk_pluginsync
settings, which are set totrue
(enabled) by default.Depending on how many modules you have installed, bulk plug-in sync can improve agent installation speed. However, if your primary server runs on a different platform than your agent nodes, bulk plug-in sync might be less beneficial. The plug-in tarball is based on the plug-ins running on the primary server's agent, which might not match the plug-ins required for agents on other platforms. - Creates a basic
puppet.conf
file containing the node's configuration settings. This file is stored at/etc/puppetlabs/puppet/puppet.conf
. - Kicks off a Puppet run.
Use the install script
If you're
installing an agent with a different OS than your primary server, you must
declare the corresponding pe_repo
class on the primary server,
such as pe_repo::platform::el_7_x86_64
. Declare these classes
in the console at Node Groups > PE Master > Classes.
If your primary server is airgapped or uses a proxy server
to access the internet, before installing agents, you must specify
pe_repo::http_proxy_host
and
pe_repo::http_proxy_port
in the PE
Master node group's pe_repo
class. For information about how to download agent installation packages through
a proxy, see Configure proxies.
- In the PE console, go to Nodes > Add nodes > Install agents.
- Under Manual installation, copy the command corresponding with your node's OS. You can use the *nix nodes script for *nix and macOS nodes.
- Launch the install script by running the command you copied. For Windows nodes, run the command in an
administrative PowerShell window.If the install script can't find agent packages corresponding to the agent's OS, it fails with an error telling you which
pe_repo::platform
class you need to declare on the primary server (at Node Groups > PE Master > Classes). - Run
puppet agent -t
to add the node to the node inventory and generate the CSR. - Accept the CSR as explained in Managing certificate signing requests.