-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PE-38817) Adding docs for add replica #477
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Add Replica | ||
|
||
- [Add Replica](#Add-replica) | ||
- [Introduction](#Introduction) | ||
- [Adding Replica to Standard or Large infrastructure](#Adding-Replica-to-Standard-or-Large-infrastructure) | ||
- [Adding Replica to Extra Large infrastructure](#Adding-Replica-to-Extra-Large-infrastructure) | ||
- [Running the `add_replica` plan](#running-the-add_replica-plan) | ||
- [Parameters](#parameters) | ||
|
||
## Introduction | ||
|
||
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. | ||
|
||
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). | ||
|
||
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). | ||
|
||
... | ||
|
||
## Adding Replica to Standard or Large infrastructure | ||
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. | ||
|
||
```json | ||
{ | ||
"primary_host": "pe-core-0.lab1.puppet.vm", | ||
"replica_host": "pe-replica-0.lab1.puppet.vm" | ||
} | ||
``` | ||
|
||
## Adding Replica to Extra Large infrastructure | ||
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. | ||
|
||
```json | ||
{ | ||
"primary_host": "pe-xl-core-0.lab1.puppet.vm", | ||
"compiler_host": "pe-xl-replica-0.lab1.puppet.vm", | ||
"replica_postgresql_host": "pe-xl-postgresql-replica-0.lab1.puppet.vm" | ||
} | ||
``` | ||
|
||
## Running the `add_replica` plan | ||
|
||
``` | ||
bolt plan run peadm::add_replica --params @params.json | ||
``` | ||
|
||
The plan performs the following steps: | ||
|
||
1. Installs Puppet Agent on the new replica host. | ||
2. Updates classifications with new replica configuration. | ||
3. Provisons the infrastructre replica with PE. | ||
|
||
## Parameters | ||
|
||
### `primary_host` | ||
|
||
- **Type:** `Peadm::SingleTargetSpec` | ||
- **Description:** | ||
The hostname and certname of the primary Puppet server . | ||
|
||
### `replica_host` | ||
|
||
- **Type:** `Peadm::SingleTargetSpec` | ||
- **Description:** | ||
The hostname and certname of the replica VM. | ||
|
||
### `primary_postgresql_host` | ||
|
||
- **Type:** `Optional[Peadm::SingleTargetSpec]` | ||
- **Description:** | ||
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. | ||
|
||
### `token_file` | ||
|
||
- **Type:** `Optional[String]` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we maybe change this to Stdlib::Absolutepath instead of string? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we need an absolute path here then yes we should. |
||
- **Description:** | ||
Path to token file, only required if located in a non-default location. | ||
|
||
|
||
|
||
## Replica promotion and Replica replacement | ||
|
||
Please see the notes on these scenarios in [automated Recovery](automated_recovery.md#recover-from-failed-primary-puppet-server) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we could get this from getpeadmconfig and remove the param?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, raise a ticket for this.