|
15 | 15 | plan peadm::action::configure (
|
16 | 16 | # Standard
|
17 | 17 | Peadm::SingleTargetSpec $primary_host,
|
18 |
| - Optional[Peadm::SingleTargetSpec] $primary_replica_host = undef, |
| 18 | + Optional[Peadm::SingleTargetSpec] $replica_host = undef, |
19 | 19 |
|
20 | 20 | # Large
|
21 | 21 | Optional[TargetSpec] $compiler_hosts = undef,
|
22 | 22 |
|
23 | 23 | # Extra Large
|
24 |
| - Optional[Peadm::SingleTargetSpec] $puppetdb_database_host = undef, |
25 |
| - Optional[Peadm::SingleTargetSpec] $puppetdb_database_replica_host = undef, |
| 24 | + Optional[Peadm::SingleTargetSpec] $primary_postgresql_host = undef, |
| 25 | + Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef, |
26 | 26 |
|
27 | 27 | # Common Configuration
|
28 | 28 | String $compiler_pool_address = $primary_host.peadm::certname(),
|
|
38 | 38 |
|
39 | 39 | # Convert inputs into targets.
|
40 | 40 | $primary_target = peadm::get_targets($primary_host, 1)
|
41 |
| - $primary_replica_target = peadm::get_targets($primary_replica_host, 1) |
42 |
| - $puppetdb_database_replica_target = peadm::get_targets($puppetdb_database_replica_host, 1) |
| 41 | + $replica_target = peadm::get_targets($replica_host, 1) |
| 42 | + $replica_postgresql_target = peadm::get_targets($replica_postgresql_host, 1) |
43 | 43 | $compiler_targets = peadm::get_targets($compiler_hosts)
|
44 |
| - $puppetdb_database_target = peadm::get_targets($puppetdb_database_host, 1) |
| 44 | + $primary_postgresql_target = peadm::get_targets($primary_postgresql_host, 1) |
45 | 45 |
|
46 | 46 | # Ensure input valid for a supported architecture
|
47 | 47 | $arch = peadm::assert_supported_architecture(
|
48 | 48 | $primary_host,
|
49 |
| - $primary_replica_host, |
50 |
| - $puppetdb_database_host, |
51 |
| - $puppetdb_database_replica_host, |
| 49 | + $replica_host, |
| 50 | + $primary_postgresql_host, |
| 51 | + $replica_postgresql_host, |
52 | 52 | $compiler_hosts,
|
53 | 53 | )
|
54 | 54 |
|
|
60 | 60 | ).first['content']
|
61 | 61 |
|
62 | 62 | run_task('peadm::mkdir_p_file', peadm::flatten_compact([
|
63 |
| - $primary_replica_target, |
| 63 | + $replica_target, |
64 | 64 | $compiler_targets,
|
65 | 65 | ]),
|
66 | 66 | path => '/etc/puppetlabs/puppet/hiera.yaml',
|
|
79 | 79 |
|
80 | 80 | class { 'peadm::setup::node_manager':
|
81 | 81 | primary_host => $primary_target.peadm::certname(),
|
82 |
| - primary_replica_host => $primary_replica_target.peadm::certname(), |
83 |
| - puppetdb_database_host => $puppetdb_database_target.peadm::certname(), |
84 |
| - puppetdb_database_replica_host => $puppetdb_database_replica_target.peadm::certname(), |
| 82 | + replica_host => $replica_target.peadm::certname(), |
| 83 | + primary_postgresql_host => $primary_postgresql_target.peadm::certname(), |
| 84 | + replica_postgresql_host => $replica_postgresql_target.peadm::certname(), |
85 | 85 | compiler_pool_address => $compiler_pool_address,
|
86 | 86 | internal_compiler_a_pool_address => $internal_compiler_a_pool_address,
|
87 | 87 | internal_compiler_b_pool_address => $internal_compiler_b_pool_address,
|
|
92 | 92 | if $arch['disaster-recovery'] {
|
93 | 93 | # Run the PE Replica Provision
|
94 | 94 | run_task('peadm::provision_replica', $primary_target,
|
95 |
| - primary_replica => $primary_replica_target.peadm::certname(), |
96 |
| - token_file => $token_file, |
| 95 | + replica => $replica_target.peadm::certname(), |
| 96 | + token_file => $token_file, |
97 | 97 |
|
98 | 98 | # Race condition, where the provision command checks PuppetDB status and
|
99 | 99 | # probably gets "starting", but fails out because that's not "running".
|
100 | 100 | # Can remove flag when that issue is fixed.
|
101 |
| - legacy => true, |
| 101 | + legacy => true, |
102 | 102 | )
|
103 | 103 | }
|
104 | 104 |
|
105 | 105 | # Run Puppet everywhere to pick up last remaining config tweaks
|
106 | 106 | run_task('peadm::puppet_runonce', peadm::flatten_compact([
|
107 | 107 | $primary_target,
|
108 |
| - $puppetdb_database_target, |
| 108 | + $primary_postgresql_target, |
109 | 109 | $compiler_targets,
|
110 |
| - $primary_replica_target, |
111 |
| - $puppetdb_database_replica_target, |
| 110 | + $replica_target, |
| 111 | + $replica_postgresql_target, |
112 | 112 | ]))
|
113 | 113 |
|
114 | 114 | # Deploy an environment if a deploy environment is specified
|
|
121 | 121 | # Ensure Puppet agent service is running now that configuration is complete
|
122 | 122 | run_command('systemctl start puppet', peadm::flatten_compact([
|
123 | 123 | $primary_target,
|
124 |
| - $primary_replica_target, |
125 |
| - $puppetdb_database_target, |
126 |
| - $puppetdb_database_replica_target, |
| 124 | + $replica_target, |
| 125 | + $primary_postgresql_target, |
| 126 | + $replica_postgresql_target, |
127 | 127 | $compiler_targets,
|
128 | 128 | ]))
|
129 | 129 |
|
|
0 commit comments