Skip to content

Commit

Permalink
feat(convert_compiler_to_legacy): gather certificate extension inform…
Browse files Browse the repository at this point in the history
…ation

- 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.
  • Loading branch information
CoMfUcIoS committed Sep 17, 2024
1 parent fdac866 commit e235324
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions plans/convert_compiler_to_legacy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
default => $primary_target.peadm::certname(),
},
}

class { 'peadm::setup::legacy_compiler_group':
primary_host => $primary_target.peadm::certname() ? {
undef => $primary_target,
default => $primary_target.peadm::certname(),
},
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
require => Class['peadm::setup::node_manager_yaml'],
}
}

$replica_host = getvar('cluster.params.replica_host')
Expand Down Expand Up @@ -123,25 +133,6 @@
run_command('puppet resource service pe-puppetdb ensure=stopped enable=false', $convert_legacy_compiler_targets)
}

apply($primary_target) {
class { 'peadm::setup::node_manager_yaml':
primary_host => $primary_target.peadm::certname() ? {
undef => $primary_target,
default => $primary_target.peadm::certname(),
},
}

class { 'peadm::setup::legacy_compiler_group':
primary_host => $primary_target.peadm::certname() ? {
undef => $primary_target,
default => $primary_target.peadm::certname(),
},
internal_compiler_a_pool_address => $cluster['params']['internal_compiler_a_pool_address'],
internal_compiler_b_pool_address => $cluster['params']['internal_compiler_b_pool_address'],
require => Class['peadm::setup::node_manager_yaml'],
}
}

run_task('peadm::puppet_runonce', $convert_legacy_compiler_targets)
run_task('peadm::puppet_runonce', $compiler_targets)
run_task('peadm::puppet_runonce', $primary_target)
Expand Down

0 comments on commit e235324

Please sign in to comment.