Skip to content

(PE-38818) Removing experimental and private from add_replica #478

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

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 49 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
#### Public Plans

* [`peadm::add_database`](#peadm--add_database)
* [`peadm::add_replica`](#peadm--add_replica): Add or replace a replica host.
Supported use cases:
1: Adding a replica to an existing primary.
2: The existing replica is broken, we have a fresh new VM we want to provision the replica to.
* [`peadm::backup`](#peadm--backup): Backup puppet primary configuration
* [`peadm::backup_ca`](#peadm--backup_ca)
* [`peadm::convert`](#peadm--convert): Convert an existing PE cluster to a PEAdm-managed cluster
Expand All @@ -103,9 +107,6 @@
#### Private Plans

* `peadm::add_compiler`: Add a new compiler to a PE architecture or replace an existing one with new configuration.
* `peadm::add_replica`: Replace a replica host for a Standard or Large architecture.
Supported use cases:
1: The existing replica is broken, we have a fresh new VM we want to provision the replica to.
* `peadm::misc::divert_code_manager`: This plan exists to account for a scenario where a PE XL
* `peadm::modify_cert_extensions`
* `peadm::subplans::component_install`: Install a new PEADM component
Expand Down Expand Up @@ -1604,6 +1605,51 @@ Optional[Enum[



Default value: `undef`

### <a name="peadm--add_replica"></a>`peadm::add_replica`

Add or replace a replica host.
Supported use cases:
1: Adding a replica to an existing primary.
2: The existing replica is broken, we have a fresh new VM we want to provision the replica to.

#### Parameters

The following parameters are available in the `peadm::add_replica` plan:

* [`primary_host`](#-peadm--add_replica--primary_host)
* [`replica_host`](#-peadm--add_replica--replica_host)
* [`replica_postgresql_host`](#-peadm--add_replica--replica_postgresql_host)
* [`token_file`](#-peadm--add_replica--token_file)

##### <a name="-peadm--add_replica--primary_host"></a>`primary_host`

Data type: `Peadm::SingleTargetSpec`

- The hostname and certname of the primary Puppet server

##### <a name="-peadm--add_replica--replica_host"></a>`replica_host`

Data type: `Peadm::SingleTargetSpec`

- The hostname and certname of the replica VM

##### <a name="-peadm--add_replica--replica_postgresql_host"></a>`replica_postgresql_host`

Data type: `Optional[Peadm::SingleTargetSpec]`

- The hostname and certname of the host with the replica PE-PosgreSQL database.
Can be a separate host in an XL architecture, or undef in Standard or Large.

Default value: `undef`

##### <a name="-peadm--add_replica--token_file"></a>`token_file`

Data type: `Optional[String]`

- (optional) the token file in a different location than the default.

Default value: `undef`

### <a name="peadm--backup"></a>`peadm::backup`
Expand Down
12 changes: 4 additions & 8 deletions plans/add_replica.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# This plan is still in development and currently considered experimental.
#
# @api private
#
# @summary Replace a replica host for a Standard or Large architecture.
# @summary Add or replace a replica host.
# Supported use cases:
# 1: The existing replica is broken, we have a fresh new VM we want to provision the replica to.
# 1: Adding a replica to an existing primary.
# 2: The existing replica is broken, we have a fresh new VM we want to provision the replica to.
# @param primary_host - The hostname and certname of the primary Puppet server
# @param replica_host - The hostname and certname of the replica VM
# @param replica_postgresql_host - The hostname and certname of the host with the replica PE-PosgreSQL database.
# @param token_file - (optional) the token file in a different location than the default.
#
# Can be a separate host in an XL architecture, or undef in Standard or Large.
# @param token_file - (optional) the token file in a different location than the default.
plan peadm::add_replica(
# Standard or Large
Peadm::SingleTargetSpec $primary_host,
Expand Down
Loading