Skip to content

Commit 625b2a0

Browse files
(PE-39789) updates to other files
1 parent 2560e75 commit 625b2a0

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

functions/get_node_group_environment.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#
88
# @see https://www.puppet.com/docs/pe/latest/upgrade_pe#update_environment
99
#
10+
# @author Tim Meusel <tim@bastelfreak.de>
11+
#
1012
function peadm::get_node_group_environment(Peadm::SingleTargetSpec $primary) {
1113
$peconf = peadm::get_pe_conf(get_target($primary))
1214
# if both are set, they need to be set to the same value

manifests/setup/legacy_compiler_group.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
String[1] $primary_host,
44
Optional[String] $internal_compiler_a_pool_address = undef,
55
Optional[String] $internal_compiler_b_pool_address = undef,
6+
String[1] $node_group_environment = 'production',
67
) {
78
Node_group {
89
purge_behavior => none,
10+
environment => $node_group_environment,
911
}
1012

1113
node_group { 'PE Legacy Compiler':

plans/convert_compiler_to_legacy.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Peadm::SingleTargetSpec $primary_host,
44
TargetSpec $legacy_hosts,
55
Optional[Boolean] $remove_pdb = true,
6+
String[1] $node_group_environment = peadm::get_node_group_environment($primary_host),
67
) {
78
$primary_target = peadm::get_targets($primary_host, 1)
89
$convert_legacy_compiler_targets = peadm::get_targets($legacy_hosts)
@@ -34,6 +35,7 @@
3435
},
3536
internal_compiler_a_pool_address => getvar('cluster.params.internal_compiler_a_pool_address'),
3637
internal_compiler_b_pool_address => getvar('cluster.params.internal_compiler_b_pool_address'),
38+
node_group_environment => $node_group_environment,
3739
require => Class['peadm::setup::node_manager_yaml'],
3840
}
3941
}

plans/install.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
'legacy_compilers' => $legacy_compilers,
8686
'primary_postgresql_host' => $primary_postgresql_host,
8787
'replica_postgresql_host' => $replica_postgresql_host,
88+
'node_group_environment' => $node_group_environment,
8889
'version' => $version,
8990
})
9091

plans/upgrade.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
'compiler_hosts' => $compiler_hosts,
7272
'primary_postgresql_host' => $primary_postgresql_host,
7373
'replica_postgresql_host' => $replica_postgresql_host,
74+
'node_group_environment' => $node_group_environment,
7475
'version' => $version,
7576
})
7677

0 commit comments

Comments
 (0)