-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PE-39577) Optimise legacy compiler support
This commit: - Adds the `node_group_unpin` task. - `node_group_unpin` task is called in the convert plan to remove legacy compilers from from the PE Master node group. - Legacy compilers `pp_auth_role` changed to `legacy_compiler`. - Changes the PEADM config to use the PE Certificate Authority node group. - Removes peadm_legacy_compiler extension.
- Loading branch information
petergmurphy
committed
Jan 30, 2025
1 parent
26c3ddf
commit e372ad3
Showing
12 changed files
with
198 additions
and
76 deletions.
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 |
---|---|---|
@@ -1,72 +1,71 @@ | ||
# @api private | ||
class peadm::setup::legacy_compiler_group ( | ||
String[1] $primary_host, | ||
Optional[String] $internal_compiler_a_pool_address = undef, | ||
Optional[String] $internal_compiler_b_pool_address = undef, | ||
Optional[String] $internal_compiler_a_pool_address = undef, | ||
Optional[String] $internal_compiler_b_pool_address = undef, | ||
) { | ||
Node_group { | ||
purge_behavior => none, | ||
} | ||
|
||
node_group { 'PE Legacy Compiler': | ||
parent => 'PE Master', | ||
rule => ['and', | ||
['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], | ||
['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], | ||
], | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, | ||
'puppetdb_port' => [8081], | ||
ensure => 'present', | ||
parent => 'PE Master', | ||
purge_behavior => 'classes', | ||
rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, | ||
'puppetdb_port' => [8081], | ||
'replication_mode' => 'none', | ||
'code_manager_auto_configure' => true, | ||
}, | ||
}, | ||
} | ||
|
||
node_group { 'PE Legacy Compiler Group A': | ||
ensure => 'present', | ||
parent => 'PE Legacy Compiler', | ||
rule => ['and', | ||
['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], | ||
ensure => 'present', | ||
parent => 'PE Legacy Compiler', | ||
purge_behavior => 'classes', | ||
rule => ['and', | ||
['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], | ||
['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'A'], | ||
['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], | ||
], | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
'puppetdb_host' => [$internal_compiler_b_pool_address, $internal_compiler_a_pool_address].filter |$_| { $_ }, | ||
'puppetdb_port' => [8081], | ||
}, | ||
}, | ||
data => { | ||
# Workaround for GH-118 | ||
data => { | ||
'puppet_enterprise::profile::master::puppetdb' => { | ||
'ha_enabled_replicas' => [], | ||
}, | ||
}, | ||
} | ||
|
||
node_group { 'PE Legacy Compiler Group B': | ||
ensure => 'present', | ||
parent => 'PE Legacy Compiler', | ||
rule => ['and', | ||
['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], | ||
ensure => 'present', | ||
parent => 'PE Legacy Compiler', | ||
purge_behavior => 'classes', | ||
rule => ['and', | ||
['=', ['trusted', 'extensions', 'pp_auth_role'], 'legacy_compiler'], | ||
['=', ['trusted', 'extensions', peadm::oid('peadm_availability_group')], 'B'], | ||
['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'true'], | ||
], | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
classes => { | ||
'puppet_enterprise::profile::master' => { | ||
'puppetdb_host' => [$internal_compiler_a_pool_address, $internal_compiler_b_pool_address].filter |$_| { $_ }, | ||
'puppetdb_port' => [8081], | ||
}, | ||
}, | ||
data => { | ||
# Workaround for GH-118 | ||
data => { | ||
'puppet_enterprise::profile::master::puppetdb' => { | ||
'ha_enabled_replicas' => [], | ||
}, | ||
}, | ||
} | ||
|
||
node_group { 'PE Compiler': | ||
rule => ['and', ['=', ['trusted', 'extensions', peadm::oid('peadm_legacy_compiler')], 'false']], | ||
rule => ['=', ['trusted', 'extensions', 'pp_auth_role'], 'pe_compiler'], | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.