Provisioning a replica duplicates specific components and services from the master to the replica.
Before you start :
-
Ensure you have a valid admin RBAC token.
-
Start a root session by running sudo su -, this will enable you to run the puppet infrastructure commands.
-
Ensure that the node you're provisioning as a replica is set to use the master as its Puppet Server.
-
On the prospective replica node, in the /etc/puppetlabs/puppet/puppet.conf file's mainsection, set the server variable to the node name of the master.
For example:
[main]
certname = <REPLICA NODE NAME>
server = <MASTER NODE NAME>
-
On the master, as the root user, run puppet infrastructure provision replica <REPLICA NODE NAME>
-
After the provision command completes, services begin syncing from the master to the replica. The amount of time the sync takes depends on the size of your PuppetDB and the capability of your hardware. Typical installations take 10-30 minutes. With large data sets, you can optionally do a manual PuppetDB replication to speed installation.
-
Verify that all services running on the master are also running on the replica (Optional):
-
From the master, run puppet infrastructure status --verbose to verify that the replica is available.
-
From any managed node, run puppet agent -t --noop --server_list=<REPLICA HOSTNAME>. If the replica is correctly configured, the Puppet run succeeds and shows no changed resources.
When provisioning is complete, you must enable the replica to complete your HA configuration.