Typically, when you enable a replica using
puppet infrastructure enable replica, the configuration tool automatically sets the same communication parameters for all agents. In geo-diverse installations, with load balancers or compile masters in multiple locations, you must manually configure agent communication settings so that agents fail over to the appropriate load balancer or compile master.
--skip-agent-configflag when you enable a replica, for example:
puppet infrastructure enable replica example.puppet.com --skip-agent-config
To manually configure which load balancer or compile master agents communicate with, use one of these options:
- CSR attributes
For each node, include a CSR attribute that identifies the location of the node, for example
Create child groups off of the PE Agent node group for each location.
In each child node group, include the
puppet_enterprise::profile::agentmodule and set the
server_listparameter to the appropriate load balancer or compile master hostname.
In each child node group, add a rule that uses the trusted fact created from the CSR attribute.
For each node or group of nodes, create a key/value pair that sets the
puppet_enterprise::profile::agent::server_listparameter to be used by the PE Agent node group.
- Custom method that sets the