Skip to content

Commit 39d5f7d

Browse files
CoMfUcIoSragingraAaronShannon
authored
Adding support for legacy compilers (#448) (#495)
* Adding support for legacy compilers (#448) * Adding support for legacy compilers * Adding inventoryfile to test upgrade legacy workflow * feat(documentation): add instructions for converting compilers to legacy This commit introduces a new section in the `convert.md` documentation. It provides instructions on how to convert compilers to legacy compilers for Puppet Enterprise installations using puppetlabs-peadm version 3.21 or later, as well as for versions prior to 3.21. The new section includes specific commands to run and references to other relevant documentation. * Fixing lint and regenerating referencemd * PE-38772 Node groups added for legacy compilers (#455) * Fixing typo for parameter in docs --------- Co-authored-by: Ioannis Karasavvaidis <[email protected]> Co-authored-by: Neil Anderson <[email protected]> Co-authored-by: Aaron Shannon <[email protected]> * Updating groups to cover ha scenarios * PE-38768 classify compilers task added (#467) * (PE-38767) Adding legacy compilers to get_peadm_config (#456) Added legacy compilers section, and updated compilers with legacy compilers oid Co-authored-by: Neil Anderson <[email protected]> * (PE-38770) Install Plan accepts legacy_compilers key (#474) * feat(peadm): add support for legacy compilers - Added `legacy_compilers` parameter to `peadm::install`, `peadm::subplans::install`, and `peadm::subplans::configure` plans. - Updated `peadm::assert_supported_architecture` function to handle `legacy_compilers`. - Modified various plans to include `legacy_compilers` in the installation and configuration processes. - Updated documentation to reflect the changes and added examples for `legacy_compilers`. This change allows the PEADM module to support legacy compilers in addition to the standard compilers. * feat(assert_supported_architecture): normalize and combine compiler variables - Normalize `$legacy_compilers` and `$compiler_hosts` to arrays, handling both strings and arrays. - Combine the normalized arrays into `$all_compilers`. - Set `$has_compilers` to `undef` if `$all_compilers` is empty, otherwise set it to `true`. - Update tests to cover scenarios with both `compiler_hosts` and `legacy_compilers`. This change ensures that the function correctly handles different types for compiler variables and improves robustness. * Updated REFERENCE.md to document the new parameter. Renamed the variable `legacy_targets` to `legacy_compiler_targets` across multiple plans for better clarity and consistency. This change affects the following plans: - convert_compiler_to_legacy.pp - subplans/configure.pp - subplans/install.pp The new variable name more accurately reflects its purpose, which is to target legacy compiler hosts. * docs(install): correct grammar in installation requirements section Corrected the grammar in the installation requirements section by changing "Puppets must not be installed" to "Puppet must not be installed" for clarity and accuracy. * (PE-38771) Convert plan accepts legacy compilers key in params.json (#476) * feat(convert): add support for legacy compilers - Introduced `legacy_compilers` parameter to handle legacy compiler hosts. - Added logic to filter and categorize legacy compiler targets. - Updated certificate modification steps to include legacy compiler targets with appropriate extensions. * feat(convert): ensure all targets are up-to-date post conversion - Added a step to run puppet on all targets after restarting services. - Ensures all targets are fully up-to-date after conversion. * docs(convert): update documentation for PEADM module - Corrected the module name from 'peadm' to 'PEADM' for consistency. - Added 'legacy_compilers' section in the example JSON parameters. - Improved clarity in the description of the `begin_at_step` parameter. - Fixed minor grammatical issues in the instructions for converting compilers to legacy. * - Updated REFERENCE.md to include the new parameter. * feat(convert): add check for legacy compilers (#483) - Introduced a new task `check_legacy_compilers.rb` to verify legacy compilers. - Updated `convert.pp` to run the new task and display warnings if legacy compilers are detected. * fix: update messaging for legacy compilers check - Clarified the message indicating which legacy compilers are classified as Puppet primary nodes. - Improved the remediation message to specify that the upgrade cannot proceed until the compilers are no longer classified as Puppet primary nodes. * fix: clarify legacy compilers upgrade message - Updated the message to specify that the upgrade can only proceed if the compilers are no longer recognized as Puppet primary nodes. * chore(workflow): update test-upgrade-legacy.yaml for compiler versions Updated the compiler versions in the test-upgrade-legacy.yaml GitHub workflow from 2023.6.0 and 2023.7.0 to 2023.7.0 and 2023.8.0. Also, made formatting changes for consistency. * chore(workflow): add console_password to test-upgrade-legacy.yaml Added the console_password parameter to the test-upgrade-legacy.yaml GitHub workflow to ensure the console password is passed securely from secrets. * refactor(plan): remove PuppetDB service stop commands in convert_compiler_to_legacy.pp Removed the commands to stop Puppet and PuppetDB services when the remove_pdb parameter is true in the convert_compiler_to_legacy plan. This simplifies the plan and avoids unnecessary service stops. * fix(setup): correct variable reference for internal compiler pool address - Updated the variable reference for `internal_compiler_b_pool_address` and `internal_compiler_a_pool_address` in `peadm::setup::legacy_compiler_group` class. - Ensured the correct scope is used for the variables. - Added missing newline at the end of the file. - Added logic to stop and disable `pe-puppetdb` service if `remove_pdb` is true in `convert_compiler_to_legacy` plan. * Adding internal compiler address params to convert legacy compilers, and added trusted cert along with internal compiler address * Matching internal compiler address param types * Adding require node_manager_yaml to legacy_compiler_group * Introduced a puppet run before node_groups defs * fix(setup): update puppetdb_host to use internal compiler pool addresses - Replaced `${trusted['certname']}` with `$internal_compiler_a_pool_address` and `$internal_compiler_b_pool_address` in `puppetdb_host` for `puppet_enterprise::profile::master` class. - Applied `.filter |$_| { $_ }` to ensure non-empty values. - Removed lint ignore comments for single quote string with variables. This change ensures that the correct internal compiler pool addresses are used for the `puppetdb_host` configuration. * docs: update upgrade_with_legacy_compilers.md with remove_pdb parameter info - Added information about the `remove_pdb` parameter to the documentation. - Updated `convert_compiler_to_legacy` plan to set `remove_pdb` default to `true`. This change provides clarity on how to retain PuppetDB service on converted compilers. * fix(workflow): correct indentation for ssh-debugging input in test-upgrade-legacy.yaml - Added missing `inputs` key for `ssh-debugging` under `workflow_dispatch`. This change ensures proper YAML structure for the workflow configuration. * chore(workflow): update test-upgrade-legacy.yaml name for clarity - Changed workflow name to "Upgrade PE with one legacy compiler (test)" for better identification. fix(convert_compiler_to_legacy): ensure proper handling of legacy compilers - Added architecture validation for supported architectures. - Split legacy compiler targets into groups A and B based on availability group or cluster. - Modified certificate extensions for legacy compilers. - Ensured proper stopping of PuppetDB service on legacy compilers when `remove_pdb` is true. - Updated node manager YAML and legacy compiler group setup to include internal compiler pool addresses. - Adjusted Puppet run tasks to include all compiler targets. These changes improve the handling and configuration of legacy compilers during the upgrade process. * feat(convert_compiler_to_legacy): update parameter types and improve formatting - Changed `remove_pdb` parameter type to `Optional[Boolean]` for better flexibility. - Improved alignment and formatting of parameters and variables for better readability. - Updated `$compiler_targets` assignment to use `peadm::get_targets` for consistency. * feat(workflow): enhance test-upgrade-legacy with SSH config and grouping - Added SSH configuration setup to ensure stable connections. - Grouped preparation and conversion steps for better readability in logs. * fix: handle undefined certname in convert_compiler_to_legacy plan - Updated `primary_host` to handle cases where `certname` is undefined. - Added conditional logic to default to `$primary_target` if `certname` is undefined. * fix(workflow): downgrade test-upgrade-legacy version to 2021.7.9 - Changed the `version` in the test-upgrade-legacy workflow from 2023.7.0 to 2021.7.9. - Ensured compatibility with older versions for testing purposes. * fix(workflow): update architecture in test-upgrade-legacy to large-with-dr - Changed the `architecture` in the test-upgrade-legacy workflow from `large-with-two-compilers` to `large-with-dr`. - Updated the `version` from `2021.7.9` to `2023.7.0`. * Fix Conflicts * feat(plan): run puppet agent on all nodes after installation - Added a task to run the puppet agent on all nodes after the installation plan. * fix(plan): remove redundant puppet agent run task - Removed the redundant task to run the puppet agent on all nodes after installation. - Simplified the install_test_cluster plan by eliminating unnecessary steps. * feat(plans): gather certificate extension information in convert_compiler_to_legacy plan - Added a step to gather certificate extension information from all systems using the `peadm::cert_data` task. - This information is used to filter legacy compiler targets based on availability group. This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used. * feat(convert_compiler_to_legacy): gather certificate extension information - Added steps to gather certificate extension information from all systems using the `peadm::cert_data` task. - Updated variable names for clarity and consistency. - Filtered legacy compiler targets based on availability group using the gathered certificate data. This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used. * feat(convert_compiler_to_legacy): gather certificate extension information - Updated `puppetdb_host` to include both internal compiler pool addresses. - Modified `convert_compiler_to_legacy` plan to gather certificate extension information from legacy targets using the `peadm::cert_data` task. - Adjusted filtering of legacy compiler targets based on availability group using the gathered certificate data. This enhancement improves the accuracy of the conversion process by ensuring that the correct certificate data is used. * feat(convert_compiler_to_legacy): gather certificate extension information - Added steps to apply `peadm::setup::node_manager_yaml` class on the primary target. - Ensured `primary_host` is set correctly based on the primary target's certname. - Improved the setup process by gathering certificate extension information. This enhancement ensures that the correct certificate data is used, improving the accuracy of the conversion process. * feat(convert_compiler_to_legacy): gather certificate extension information - Added steps to apply `peadm::setup::legacy_compiler_group` class with internal compiler pool addresses. - Ensured `primary_host` is set correctly based on the primary target's certname. - Removed redundant application of `peadm::setup::node_manager_yaml` and `peadm::setup::legacy_compiler_group` classes. This enhancement ensures that the correct certificate data is used, improving the accuracy of the conversion process. - Deleted `.github/workflows/test-upgrade-legacy.yaml` file. - Removed workflow for testing PE upgrade with one legacy compiler. This change simplifies the CI configuration by removing an outdated or unnecessary workflow. * docs: update documentation for converting and upgrading legacy compilers - Updated the version reference from 3.21 to 3.25 in the upgrade documentation. - Added instructions for using the `peadm::convert_compiler_to_legacy` plan. - Removed outdated steps for updating certificate extensions and converting legacy compilers. - Simplified the upgrade process description for Puppet Enterprise using puppetlabs-peadm module 3.25 or later. --------- Co-authored-by: Neil Anderson <[email protected]> Co-authored-by: Neil Anderson <[email protected]> Co-authored-by: Aaron Shannon <[email protected]>
1 parent 9cbef67 commit 39d5f7d

25 files changed

+910
-123
lines changed

README.md

+29-30
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use PEADM to deploy and manage PE installations for standard, large, and
99
#### Table of contents
1010

1111
- [Puppet Enterprise Administration Module (PEADM)](#puppet-enterprise-pe-administration-adm-module)
12-
- [Table of contents](#table-of-contents)
12+
- [Table of contents](#table-of-contents)
1313
- [Support](#support)
1414
- [Overview](#overview)
1515
- [What PEADM affects](#what-peadm-affects)
@@ -24,14 +24,14 @@ You can use PEADM to deploy and manage PE installations for standard, large, and
2424

2525
PEADM is a supported PE module. If you are a PE customer with the standard or premium support service, you can contact [Support](https://portal.perforce.com/s/topic/0TO4X000000DbNgWAK/puppet) or your Technical Account Manager for assistance.
2626

27-
2827
## Overview
2928

3029
This is the standard workflow for installing PEADM.
3130

3231
1. [Install Bolt](https://www.puppet.com/docs/bolt/latest/bolt_installing) on a jump host.
3332
2. To create a Bolt project that includes the PEADM module, run:</br>`mkdir <YOUR_PROJECT> && cd <YOUR_PROJECT> && bolt project init <YOUR_PROJECT> --modules puppetlabs-peadm`
3433
3. In the Bolt project directory, update the `inventory.yaml` file with connection information for the servers you plan to use for hosting PE infrastructure. For example:
34+
3535
```yaml
3636
---
3737
groups:
@@ -55,56 +55,55 @@ groups:
5555
5656
### What PEADM affects
5757
58-
* The `peadm::install` plan adds a number of custom original identifier (OID) trusted facts to the certificates of deployed PE infrastructure nodes. These trusted facts are used by PEADM plans to identify nodes that host PE infrastructure components.
59-
* Depending on the scale of your architecture, up to four node groups may be created to configure `puppet_enterprise` class parameters for the following PE infrastructure components:
60-
* The primary server
61-
* The primary server replica
62-
* PostgreSQL nodes (database servers)
63-
* Compilers (compiler hosts are designated as belonging to availability group A or B)
58+
- The `peadm::install` plan adds a number of custom original identifier (OID) trusted facts to the certificates of deployed PE infrastructure nodes. These trusted facts are used by PEADM plans to identify nodes that host PE infrastructure components.
59+
- Depending on the scale of your architecture, up to four node groups may be created to configure `puppet_enterprise` class parameters for the following PE infrastructure components:
60+
- The primary server
61+
- The primary server replica
62+
- PostgreSQL nodes (database servers)
63+
- Compilers (compiler hosts are designated as belonging to availability group A or B)
6464

6565
### What PEADM does not affect
6666

67-
* PEADM does not impact regular PE operations. After using it to deploy a new PE installation or upgrade an existing one, PEADM is not required until you want to use it to upgrade PE or expand your installation.
68-
* Using PEADM to install PE or upgrade PE does not prevent you from using documented PE procedures such as setting up disaster recovery or performing a manual upgrade.
67+
- PEADM does not impact regular PE operations. After using it to deploy a new PE installation or upgrade an existing one, PEADM is not required until you want to use it to upgrade PE or expand your installation.
68+
- Using PEADM to install PE or upgrade PE does not prevent you from using documented PE procedures such as setting up disaster recovery or performing a manual upgrade.
6969

7070
### Requirements
7171

72-
* PEADM is compatible with Puppet Enterprise 2019.8.1 or newer versions.
73-
* PEADM requires [Bolt](https://www.puppet.com/docs/bolt/latest/bolt_installing) version 3.17.0 or newer and works on operating systems supported by Bolt.
74-
**Note:** You can use PEADM to install Puppet Enterprise (PE) onto any operating system platform that is supported by the specific PE version you want to install. To review operating system platforms supported by specific PE versions, refer to the PE documentation.
75-
* To successfully convert your current PE installation to a PEADM-managed installation, ensure that the PE setting for editing classifier configuration data is enabled. This setting is enabled by default on new PE installations, but it could be disabled if the relevant configuration was removed from your global hiera.yaml file. See the [PE docs](https://www.puppet.com/docs/pe/latest/config_console.html#enable_console_configuration_data) for more information.
72+
- PEADM is compatible with Puppet Enterprise 2019.8.1 or newer versions.
73+
- PEADM requires [Bolt](https://www.puppet.com/docs/bolt/latest/bolt_installing) version 3.17.0 or newer and works on operating systems supported by Bolt.
74+
**Note:** You can use PEADM to install Puppet Enterprise (PE) onto any operating system platform that is supported by the specific PE version you want to install. To review operating system platforms supported by specific PE versions, refer to the PE documentation.
75+
- To successfully convert your current PE installation to a PEADM-managed installation, ensure that the PE setting for editing classifier configuration data is enabled. This setting is enabled by default on new PE installations, but it could be disabled if the relevant configuration was removed from your global hiera.yaml file. See the [PE docs](https://www.puppet.com/docs/pe/latest/config_console.html#enable_console_configuration_data) for more information.
7676

7777
## Usage
7878

7979
For instructions on using PEADM plans, see the following PEADM docs:
8080

81-
* [Install](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/install.md)
82-
* [Upgrade](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/upgrade.md)
83-
* [Convert](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/convert.md)
84-
* [Status](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/status.md)
81+
- [Install](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/install.md)
82+
- [Upgrade](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/upgrade.md)
83+
- [Convert](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/convert.md)
84+
- [Status](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/status.md)
8585

8686
## Reference
8787

8888
To understand which architecture is right for you, see the following information on the Puppet documentation site:
8989

90-
* [PE architectures](https://puppet.com/docs/pe/latest/choosing_an_architecture.html)
91-
* [PE multi-region reference architectures](https://puppet.com/docs/patterns-and-tactics/latest/reference-architectures/pe-multi-region-reference-architectures.html)
92-
90+
- [PE architectures](https://puppet.com/docs/pe/latest/choosing_an_architecture.html)
91+
- [PE multi-region reference architectures](https://puppet.com/docs/patterns-and-tactics/latest/reference-architectures/pe-multi-region-reference-architectures.html)
9392

9493
To learn more about the PEADM module and its uses, see the following PEADM docs:
9594

96-
* [Recovery procedures](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/recovery.md)
97-
* [Architectures](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/architectures.md)
98-
* [Expanding deployment](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/expanding.md)
99-
* [Classification](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/classification.md)
100-
* [Testing](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/pre_post_checks.md)
101-
* [Docker based examples](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/docker_examples.md)
102-
* [Release process](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/release_process.md)
95+
- [Recovery procedures](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/recovery.md)
96+
- [Architectures](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/architectures.md)
97+
- [Expanding deployment](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/expanding.md)
98+
- [Classification](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/classification.md)
99+
- [Testing](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/pre_post_checks.md)
100+
- [Docker based examples](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/docker_examples.md)
101+
- [Release process](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/release_process.md)
103102

104103
## Getting help
105104

106-
* If you find a bug, you can [create a GitHub issue](https://github.com/puppetlabs/puppetlabs-peadm/issues).
107-
* For PE customers using PEADM and experiencing outages or other issues, [contact the Support team](https://portal.perforce.com/s/topic/0TO4X000000DbNgWAK/puppet).
105+
- If you find a bug, you can [create a GitHub issue](https://github.com/puppetlabs/puppetlabs-peadm/issues).
106+
- For PE customers using PEADM and experiencing outages or other issues, [contact the Support team](https://portal.perforce.com/s/topic/0TO4X000000DbNgWAK/puppet).
108107

109108
## License
110109

REFERENCE.md

+43-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
* `peadm::setup::convert_node_manager`: Used during the peadm::convert plan
1212
* `peadm::setup::convert_pre20197`: Defines configuration needed for converting PE 2018
13+
* `peadm::setup::legacy_compiler_group`
1314
* `peadm::setup::node_manager`: Configures PEAdm's required node groups
1415
* `peadm::setup::node_manager_yaml`: Set up the node_manager.yaml file in the temporary Bolt confdir
1516

@@ -55,6 +56,7 @@
5556
* [`backup_classification`](#backup_classification): A task to call the classification api and write to file
5657
* [`cert_data`](#cert_data): Return certificate data related to the Puppet agent
5758
* [`cert_valid_status`](#cert_valid_status): Check primary for valid state of a certificate
59+
* [`classify_compilers`](#classify_compilers): Classify compilers as legacy or non-legacy
5860
* [`code_manager`](#code_manager): Perform various code manager actions
5961
* [`code_manager_enabled`](#code_manager_enabled): Run on a PE primary node to check if Code Manager is enabled.
6062
* [`code_sync_status`](#code_sync_status): A task to confirm code is in sync accross the cluster for clusters with code manager configured
@@ -108,6 +110,7 @@ Supported use cases:
108110

109111
#### Private Plans
110112

113+
* `peadm::convert_compiler_to_legacy`
111114
* `peadm::misc::divert_code_manager`: This plan exists to account for a scenario where a PE XL
112115
* `peadm::modify_cert_extensions`
113116
* `peadm::subplans::component_install`: Install a new PEADM component
@@ -117,6 +120,7 @@ Supported use cases:
117120
* `peadm::subplans::modify_certificate`
118121
* `peadm::subplans::prepare_agent`
119122
* `peadm::uninstall`: Single-entry-point plan for uninstalling Puppet Enterprise
123+
* `peadm::update_compiler_extensions`
120124
* `peadm::util::code_sync_status`
121125
* `peadm::util::copy_file`
122126
* `peadm::util::db_disable_pglogical`
@@ -135,7 +139,7 @@ Type: Puppet Language
135139

136140
Assert that the architecture given is a supported one
137141

138-
#### `peadm::assert_supported_architecture(TargetSpec $primary_host, Variant[TargetSpec, Undef] $replica_host = undef, Variant[TargetSpec, Undef] $primary_postgresql_host = undef, Variant[TargetSpec, Undef] $replica_postgresql_host = undef, Variant[TargetSpec, Undef] $compiler_hosts = undef)`
142+
#### `peadm::assert_supported_architecture(TargetSpec $primary_host, Variant[TargetSpec, Undef] $replica_host = undef, Variant[TargetSpec, Undef] $primary_postgresql_host = undef, Variant[TargetSpec, Undef] $replica_postgresql_host = undef, Variant[TargetSpec, Undef] $compiler_hosts = undef, Variant[TargetSpec, Undef] $legacy_compilers = undef)`
139143

140144
The peadm::assert_supported_architecture function.
141145

@@ -171,6 +175,12 @@ Data type: `Variant[TargetSpec, Undef]`
171175

172176

173177

178+
##### `legacy_compilers`
179+
180+
Data type: `Variant[TargetSpec, Undef]`
181+
182+
183+
174184
### <a name="peadm--assert_supported_bolt_version"></a>`peadm::assert_supported_bolt_version`
175185

176186
Type: Puppet Language
@@ -1055,6 +1065,20 @@ Data type: `String`
10551065

10561066
The certifcate name to check validation of
10571067

1068+
### <a name="classify_compilers"></a>`classify_compilers`
1069+
1070+
Classify compilers as legacy or non-legacy
1071+
1072+
**Supports noop?** false
1073+
1074+
#### Parameters
1075+
1076+
##### `compiler_hosts`
1077+
1078+
Data type: `Array[String]`
1079+
1080+
List of FQDNs of compilers
1081+
10581082
### <a name="code_manager"></a>`code_manager`
10591083

10601084
Perform various code manager actions
@@ -1798,6 +1822,7 @@ The following parameters are available in the `peadm::convert` plan:
17981822
* [`primary_host`](#-peadm--convert--primary_host)
17991823
* [`replica_host`](#-peadm--convert--replica_host)
18001824
* [`compiler_hosts`](#-peadm--convert--compiler_hosts)
1825+
* [`legacy_compilers`](#-peadm--convert--legacy_compilers)
18011826
* [`primary_postgresql_host`](#-peadm--convert--primary_postgresql_host)
18021827
* [`replica_postgresql_host`](#-peadm--convert--replica_postgresql_host)
18031828
* [`compiler_pool_address`](#-peadm--convert--compiler_pool_address)
@@ -1826,6 +1851,14 @@ Data type: `Optional[TargetSpec]`
18261851

18271852

18281853

1854+
Default value: `undef`
1855+
1856+
##### <a name="-peadm--convert--legacy_compilers"></a>`legacy_compilers`
1857+
1858+
Data type: `Optional[TargetSpec]`
1859+
1860+
1861+
18291862
Default value: `undef`
18301863

18311864
##### <a name="-peadm--convert--primary_postgresql_host"></a>`primary_postgresql_host`
@@ -1911,6 +1944,7 @@ The following parameters are available in the `peadm::install` plan:
19111944
* [`primary_host`](#-peadm--install--primary_host)
19121945
* [`replica_host`](#-peadm--install--replica_host)
19131946
* [`compiler_hosts`](#-peadm--install--compiler_hosts)
1947+
* [`legacy_compilers`](#-peadm--install--legacy_compilers)
19141948
* [`primary_postgresql_host`](#-peadm--install--primary_postgresql_host)
19151949
* [`replica_postgresql_host`](#-peadm--install--replica_postgresql_host)
19161950
* [`console_password`](#-peadm--install--console_password)
@@ -2027,6 +2061,14 @@ Data type: `Optional[TargetSpec]`
20272061

20282062

20292063

2064+
Default value: `undef`
2065+
2066+
##### <a name="-peadm--install--legacy_compilers"></a>`legacy_compilers`
2067+
2068+
Data type: `Optional[TargetSpec]`
2069+
2070+
2071+
20302072
Default value: `undef`
20312073

20322074
##### <a name="-peadm--install--primary_postgresql_host"></a>`primary_postgresql_host`

documentation/convert.md

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Convert infrastructure for use with the peadm module
1+
# Convert infrastructure for use with the PEADM module
22

3-
The peadm::convert plan can be used to adopt manually deployed infrastructure for use with peadm, or to adopt infrastructure deployed with an older version of peadm.
3+
The peadm::convert plan can be used to adopt manually deployed infrastructure for use with PEADM or to adopt infrastructure deployed with an older version of peadm.
44

55
## Convert an Existing Deployment
66

@@ -14,19 +14,36 @@ Prepare to run the plan against all servers in the PE infrastructure, using a pa
1414
"pe-xl-compiler-0.lab1.puppet.vm",
1515
"pe-xl-compiler-1.lab1.puppet.vm"
1616
],
17-
18-
"compiler_pool_address": "puppet.lab1.puppet.vm",
17+
"legacy_compilers": [
18+
"pe-xl-legacy-compiler-0.lab1.puppet.vm",
19+
"pe-xl-legacy-compiler-1.lab1.puppet.vm"
20+
],
21+
"compiler_pool_address": "puppet.lab1.puppet.vm"
1922
}
2023
```
2124

22-
See the [install](install.md#reference-architectures) documentation for a list of supported architectures. Note that for convert, *all infrastructure being converted must already be functional*; you cannot use convert to add new systems to the infrastructure, nor can you use it to change your architecture.
25+
See the [install](install.md#reference-architectures) documentation for a list of supported architectures. Note that for convert, _all infrastructure being converted must already be functional_; you cannot use convert to add new systems to the infrastructure, nor can you use it to change your architecture.
2326

2427
```
25-
bolt plan run peadm::convert --params @params.json
28+
bolt plan run peadm::convert --params @params.json
2629
```
2730

2831
## Retry or resume plan
2932

3033
This plan is broken down into steps. Normally, the plan runs through all the steps from start to finish. The name of each step is displayed during the plan run, as the step begins.
3134

32-
The `begin_at_step` parameter can be used to facilitate re-running this plan after a failed attempt, skipping past any steps that already completed successfully on the first try and picking up again at the step specified. The step name to resume at can be read from the previous run logs. A full list of available values for this parameter can be viewed by running `bolt plan show peadm::convert`.
35+
The `begin_at_step` parameter can be used to facilitate re-running this plan after a failed attempt, skipping past any steps that were already completed successfully on the first try and picking up again at the step specified. The step name to resume can be read from the previous run logs. A full list of available values for this parameter can be viewed by running `bolt plan show peadm::convert`.
36+
37+
## Convert compilers to legacy
38+
39+
### Puppet Enterprise installed with puppetlabs-peadm version 3.21 or later
40+
41+
To convert compilers to legacy compilers use the `peadm::convert_compiler_to_legacy` plan. This plan will create the needed Node group and Classifier rules to make compilers legacy. Also will add certificate extensions to those nodes.
42+
43+
```shell
44+
bolt plan run peadm::convert_compiler_to_legacy legacy_hosts=compiler1.example.com,compiler2.example.com primary_host=primary.example.com
45+
```
46+
47+
### Puppet Enterprise installed with puppetlabs-peadm version prior to 3.21
48+
49+
Follow Steps 1 to 3 in the [Upgrade Puppet Enterprise with legacy compilers](upgrade_with_legacy_compilers.md) documentation.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Convert compilers to legacy
2+
3+
### Puppet Enterprise installed with puppetlabs-peadm version 3.25 or later
4+
5+
To convert compilers to legacy compilers use the `peadm::convert_compiler_to_legacy` plan. This plan will create the needed Node group and Classifier rules to make compilers legacy. Also will add certificate extensions to those nodes.
6+
7+
```shell
8+
bolt plan run peadm::convert_compiler_to_legacy legacy_hosts=compiler1.example.com,compiler2.example.com primary_host=primary.example.com
9+
```

0 commit comments

Comments
 (0)