Skip to content

Commit d23e7dc

Browse files
(PE-41176) make migrate plan public
1 parent cfd08fe commit d23e7dc

File tree

4 files changed

+65
-6
lines changed

4 files changed

+65
-6
lines changed

REFERENCE.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Supported use cases:
113113
* [`peadm::backup_ca`](#peadm--backup_ca)
114114
* [`peadm::convert`](#peadm--convert): Convert an existing PE cluster to a PEAdm-managed cluster
115115
* [`peadm::install`](#peadm--install): Install a new PE cluster
116+
* [`peadm::migrate`](#peadm--migrate): Migrate a PE installation to new host(s)
116117
* [`peadm::modify_certificate`](#peadm--modify_certificate): Modify the certificate of one or more targets
117118
* [`peadm::replace_failed_postgresql`](#peadm--replace_failed_postgresql): Replaces a failed PostgreSQL host
118119
* [`peadm::restore`](#peadm--restore): Restore puppet primary configuration
@@ -124,7 +125,6 @@ Supported use cases:
124125
#### Private Plans
125126

126127
* `peadm::convert_compiler_to_legacy`
127-
* `peadm::migrate`: Migrate a PE primary server to a new host - Note: this plan is a work in progress and it
128128
* `peadm::misc::divert_code_manager`: This plan exists to account for a scenario where a PE XL
129129
* `peadm::modify_cert_extensions`
130130
* `peadm::subplans::component_install`: Install a new PEADM component
@@ -2393,6 +2393,65 @@ Data type: `String`
23932393

23942394
Default value: `'1y'`
23952395

2396+
### <a name="peadm--migrate"></a>`peadm::migrate`
2397+
2398+
Migrate a PE installation to new host(s)
2399+
2400+
#### Parameters
2401+
2402+
The following parameters are available in the `peadm::migrate` plan:
2403+
2404+
* [`old_primary_host`](#-peadm--migrate--old_primary_host)
2405+
* [`new_primary_host`](#-peadm--migrate--new_primary_host)
2406+
* [`upgrade_version`](#-peadm--migrate--upgrade_version)
2407+
* [`replica_host`](#-peadm--migrate--replica_host)
2408+
* [`primary_postgresql_host`](#-peadm--migrate--primary_postgresql_host)
2409+
* [`replica_postgresql_host`](#-peadm--migrate--replica_postgresql_host)
2410+
2411+
##### <a name="-peadm--migrate--old_primary_host"></a>`old_primary_host`
2412+
2413+
Data type: `Peadm::SingleTargetSpec`
2414+
2415+
The existing PE primary server that will be migrated from
2416+
2417+
##### <a name="-peadm--migrate--new_primary_host"></a>`new_primary_host`
2418+
2419+
Data type: `Peadm::SingleTargetSpec`
2420+
2421+
The new server that will become the PE primary server
2422+
2423+
##### <a name="-peadm--migrate--upgrade_version"></a>`upgrade_version`
2424+
2425+
Data type: `Optional[String]`
2426+
2427+
Optional version to upgrade to after migration is complete
2428+
2429+
Default value: `undef`
2430+
2431+
##### <a name="-peadm--migrate--replica_host"></a>`replica_host`
2432+
2433+
Data type: `Optional[Peadm::SingleTargetSpec]`
2434+
2435+
Optional new replica server to be added to the cluster
2436+
2437+
Default value: `undef`
2438+
2439+
##### <a name="-peadm--migrate--primary_postgresql_host"></a>`primary_postgresql_host`
2440+
2441+
Data type: `Optional[Peadm::SingleTargetSpec]`
2442+
2443+
Optional new primary PostgreSQL server to be added to the cluster
2444+
2445+
Default value: `undef`
2446+
2447+
##### <a name="-peadm--migrate--replica_postgresql_host"></a>`replica_postgresql_host`
2448+
2449+
Data type: `Optional[Peadm::SingleTargetSpec]`
2450+
2451+
Optional new replica PostgreSQL server to be added to the cluster
2452+
2453+
Default value: `undef`
2454+
23962455
### <a name="peadm--modify_certificate"></a>`peadm::modify_certificate`
23972456

23982457
Certificates can be modified by adding extensions, removing extensions, or

plans/add_compilers.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
# Get current peadm config to determine where to setup additional rules for
2626
# compiler's secondary PuppetDB instances
2727
$peadm_config = run_task('peadm::get_peadm_config', $primary_target).first.value
28-
28+
#output peadm_config
29+
out::message("peadm_config is ${peadm_config}")
30+
out::message("param is ${peadm_config['params']}")
2931
if $primary_postgresql_host == undef {
3032
# get the external PostgreSQL host for the specified availability group
3133
$external_postgresql_host = $avail_group_letter ? {

plans/migrate.pp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# @api private
2-
# @summary Migrate a PE primary server to a new host - Note: this plan is a work in progress and it
3-
# is not recommended to be used until it is fully implemented and supported
1+
# @summary Migrate a PE installation to new host(s)
42
#
53
# @param old_primary_host
64
# The existing PE primary server that will be migrated from
@@ -33,7 +31,6 @@
3331
})
3432

3533
# pre-migration checks
36-
out::message('This plan is a work in progress and it is not recommended to be used until it is fully implemented and supported')
3734
peadm::assert_supported_bolt_version()
3835
if $upgrade_version and $upgrade_version != '' and !empty($upgrade_version) {
3936
$permit_unsafe_versions = false

plans/replace_failed_postgresql.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
# Get current peadm config before making modifications
3636
$peadm_config = run_task('peadm::get_peadm_config', $primary_host).first.value
37+
out::message("peadm_config is ${peadm_config}")
3738
$compilers = $peadm_config['params']['compilers']
3839

3940
# Bail if we are not running this against an XL deployment with DR enabled - the parameters also enforce this to some extent

0 commit comments

Comments
 (0)