Skip to content

Commit

Permalink
(PE-38818) Removing experimental and private from add_replica (#478)
Browse files Browse the repository at this point in the history
* (PE-38818) Removing experimental and private from add_replica

* Updating Reference.md

---------

Co-authored-by: Neil Anderson <neil.anderson@perforce.com>
  • Loading branch information
2 people authored and CoMfUcIoS committed Sep 10, 2024
1 parent 4d1ba66 commit 46cf060
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 11 deletions.
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

0 comments on commit 46cf060

Please sign in to comment.