|
32 | 32 |
|
33 | 33 | # Common Configuration
|
34 | 34 | String $console_password,
|
35 |
| - String $version = '2019.7.0', |
| 35 | + String $version = '2019.8.5', |
36 | 36 | Array[String] $dns_alt_names = [ ],
|
37 | 37 | Hash $pe_conf_data = { },
|
38 | 38 |
|
|
235 | 235 | }
|
236 | 236 | }
|
237 | 237 |
|
238 |
| - # Get the master installation up and running. The installer will |
239 |
| - # "fail" because PuppetDB can't start, if puppetdb_database_target |
240 |
| - # is set. That's expected. |
241 |
| - $shortcircuit_puppetdb = !($puppetdb_database_target.empty) |
242 |
| - without_default_logging() || { |
243 |
| - out::message("Starting: task peadm::pe_install on ${master_target[0].name}") |
244 |
| - run_task('peadm::pe_install', $master_target, |
245 |
| - _catch_errors => $shortcircuit_puppetdb, |
246 |
| - tarball => $upload_tarball_path, |
247 |
| - peconf => '/tmp/pe.conf', |
248 |
| - puppet_service_ensure => 'stopped', |
249 |
| - shortcircuit_puppetdb => $shortcircuit_puppetdb, |
250 |
| - ) |
251 |
| - out::message("Finished: task peadm::pe_install on ${master_target[0].name}") |
252 |
| - } |
| 238 | + # Get the master installation up and running. The installer will "fail" |
| 239 | + # because PuppetDB can't start, if puppetdb_database_target is set. That's |
| 240 | + # expected, and handled by the task's install_extra_large parameter. |
| 241 | + run_task('peadm::pe_install', $master_target, |
| 242 | + tarball => $upload_tarball_path, |
| 243 | + peconf => '/tmp/pe.conf', |
| 244 | + puppet_service_ensure => 'stopped', |
| 245 | + install_extra_large => ($arch['architecture'] == 'extra-large'), |
| 246 | + ) |
253 | 247 |
|
254 | 248 | parallelize($master_targets) |$target| {
|
255 | 249 | if $r10k_private_key {
|
|
312 | 306 | action => 'file-sync commit',
|
313 | 307 | )
|
314 | 308 |
|
315 |
| - parallelize($agent_installer_targets) |$target| { |
| 309 | + parallelize($agent_installer_targets + $database_targets) |$target| { |
316 | 310 | $common_install_flags = [
|
317 | 311 | '--puppet-service-ensure', 'stopped',
|
318 | 312 | "main:dns_alt_names=${dns_alt_names_csv}",
|
319 | 313 | "main:certname=${target.peadm::target_name()}",
|
320 | 314 | ]
|
321 | 315 |
|
322 |
| - if ($target in $compiler_a_targets) { |
| 316 | + # Database targets don't need agent installed, they just need to run Puppet |
| 317 | + if ($target in $database_targets) { |
| 318 | + run_task('peadm::puppet_runonce', $target) |
| 319 | + } |
| 320 | + # Everything else needs an agent installed and cert signed |
| 321 | + elsif ($target in $compiler_a_targets) { |
323 | 322 | run_task('peadm::agent_install', $target,
|
324 | 323 | server => $master_target.peadm::target_name(),
|
325 | 324 | install_flags => $common_install_flags + [
|
|
347 | 346 | )
|
348 | 347 | }
|
349 | 348 |
|
350 |
| - # Ensure certificate requests have been submitted |
351 |
| - run_task('peadm::submit_csr', $target) |
352 |
| - # TODO: come up with an intelligent way to validate that the expected CSRs |
353 |
| - # have been submitted and are available for signing, prior to signing them. |
354 |
| - # For now, waiting a short period of time is necessary to avoid a small race. |
355 |
| - ctrl::sleep(5) |
356 |
| - run_task('peadm::sign_csr', $master_target, { 'certnames' => [$target.name] } ) |
357 |
| - run_task('peadm::puppet_runonce', $target) |
| 349 | + # Ensure certificate requests have been submitted, then run Puppet |
| 350 | + unless ($target in $database_targets) { |
| 351 | + run_task('peadm::submit_csr', $target) |
| 352 | + run_task('peadm::sign_csr', $master_target, { 'certnames' => [$target.name] } ) |
| 353 | + run_task('peadm::puppet_runonce', $target) |
| 354 | + } |
358 | 355 | }
|
359 | 356 |
|
360 |
| - run_task('peadm::puppet_runonce', $database_targets ) |
361 |
| - |
362 | 357 | # The puppetserver might be in the middle of a restart after the Puppet run,
|
363 | 358 | # so we check the status by calling the api and ensuring the puppetserver is
|
364 | 359 | # taking requests before proceeding. It takes two runs to fully finish
|
|
0 commit comments