Skip to content

Commit eeb3233

Browse files
ragingraCoMfUcIoS
authored andcommitted
(PE-38817) Adding docs for add replica (#477)
Co-authored-by: Neil Anderson <[email protected]>
1 parent aa10c39 commit eeb3233

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

documentation/add_replica.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Add Replica
2+
3+
- [Add Replica](#Add-replica)
4+
- [Introduction](#Introduction)
5+
- [Adding Replica to Standard or Large infrastructure](#Adding-Replica-to-Standard-or-Large-infrastructure)
6+
- [Adding Replica to Extra Large infrastructure](#Adding-Replica-to-Extra-Large-infrastructure)
7+
- [Running the `add_replica` plan](#running-the-add_replica-plan)
8+
- [Parameters](#parameters)
9+
10+
## Introduction
11+
12+
The `peadm::add_replica` plan is designed to setup disaster recovery of a Primary Puppet Enterprise server. This is acheived through adding a primary replica to your system. Although this plan doesn't change your PE architcture, adding DR does depend on the structure of your current architecture.
13+
14+
In the case of Standard and Large installations, DR can be acheiveived by simply utilising this plan and adding the primary replica. In the case of an Extra Large infrastructure which includes an external DB, a replica DB is also required. This can be done with the `peadm::add_database` plan. For more detail see [Adding External Databases with peadm::add_database](expanding.md#adding-external-databases-with-peadmadd_database).
15+
16+
Please note, to setup a replica you must have code manager configured. To learn more about code manager, please see [Puppet Docs](help.puppet.com).
17+
18+
...
19+
20+
## Adding Replica to Standard or Large infrastructure
21+
As seen below, this is an example of the required paramaters to add a primary replica. These paramaters can be passed in-line or as a params file.
22+
23+
```json
24+
{
25+
"primary_host": "pe-core-0.lab1.puppet.vm",
26+
"replica_host": "pe-replica-0.lab1.puppet.vm"
27+
}
28+
```
29+
30+
## Adding Replica to Extra Large infrastructure
31+
In the below example, we have already have an external DB and a replica of it. This means that we should pass in the additional parameter of the replicas hostname.
32+
33+
```json
34+
{
35+
"primary_host": "pe-xl-core-0.lab1.puppet.vm",
36+
"compiler_host": "pe-xl-replica-0.lab1.puppet.vm",
37+
"replica_postgresql_host": "pe-xl-postgresql-replica-0.lab1.puppet.vm"
38+
}
39+
```
40+
41+
## Running the `add_replica` plan
42+
43+
```
44+
bolt plan run peadm::add_replica --params @params.json
45+
```
46+
47+
The plan performs the following steps:
48+
49+
1. Installs Puppet Agent on the new replica host.
50+
2. Updates classifications with new replica configuration.
51+
3. Provisons the infrastructre replica with PE.
52+
53+
## Parameters
54+
55+
### `primary_host`
56+
57+
- **Type:** `Peadm::SingleTargetSpec`
58+
- **Description:**
59+
The hostname and certname of the primary Puppet server .
60+
61+
### `replica_host`
62+
63+
- **Type:** `Peadm::SingleTargetSpec`
64+
- **Description:**
65+
The hostname and certname of the replica VM.
66+
67+
### `primary_postgresql_host`
68+
69+
- **Type:** `Optional[Peadm::SingleTargetSpec]`
70+
- **Description:**
71+
The target specification for the primary PostgreSQL host that the new replica will synchronize with. This is the database server from which the replica will replicate data.
72+
73+
### `token_file`
74+
75+
- **Type:** `Optional[String]`
76+
- **Description:**
77+
Path to token file, only required if located in a non-default location.
78+
79+
80+
81+
## Replica promotion and Replica replacement
82+
83+
Please see the notes on these scenarios in [automated Recovery](automated_recovery.md#recover-from-failed-primary-puppet-server)
84+

documentation/expanding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ An external PE-PostgreSQL server is the component which separates the Extra Larg
3232

3333
### Add an external PE-PostgreSQL server in all scenarios
3434

35-
bolt plan run peadm::add_database -t <new-postgres-server-fqdn> primary_host=<primary-server-fqdn>:w
35+
bolt plan run peadm::add_database -t <new-postgres-server-fqdn> primary_host=<primary-server-fqdn>
3636

3737
## Enable Disaster Recovery and Add a Replica with peadm::add_replica
3838

0 commit comments

Comments
 (0)