Skip to content

Commit 2c4491d

Browse files
committed
support mono topology for standard installation
1 parent ecb07cc commit 2c4491d

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

REFERENCE.md

+6
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,12 @@ Data type: `String`
13891389

13901390
The name of the replica to provision
13911391

1392+
##### `topology`
1393+
1394+
Data type: `String`
1395+
1396+
The topology of PE installation
1397+
13921398
##### `token_file`
13931399

13941400
Data type: `Optional[String]`

plans/subplans/configure.pp

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# @summary Configure first-time classification and DR setup
44
#
5-
# @param compiler_pool_address
5+
# @param compiler_pool_address
66
# The service address used by agents to connect to compilers, or the Puppet
77
# service. Typically this is a load balancer.
88
# @param internal_compiler_a_pool_address
@@ -111,6 +111,11 @@
111111
}
112112

113113
if $arch['disaster-recovery'] {
114+
$topology = $arch['architecture']? {
115+
'standard' => 'mono',
116+
default => 'mono-with-compile',
117+
}
118+
114119
# Run the PE Replica Provision
115120
run_task('peadm::provision_replica', $primary_target,
116121
replica => $replica_target.peadm::certname(),
@@ -120,6 +125,7 @@
120125
# probably gets "starting", but fails out because that's not "running".
121126
# Can remove flag when that issue is fixed.
122127
legacy => true,
128+
topology => $topology,
123129
)
124130
}
125131

tasks/provision_replica.json

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"type": "String",
66
"description": "The name of the replica to provision"
77
},
8+
"topology": {
9+
"type": "String",
10+
"description": "The topology of PE installation",
11+
"default": "mono-with-compile"
12+
},
813
"token_file": {
914
"type": "Optional[String]",
1015
"description": "The name of the token-file for auth"

tasks/provision_replica.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ else
1818
export TOKEN_FILE="$PT_token_file"
1919
fi
2020

21+
if [ "$PT_topology" = "mono" ] ; then
22+
AGENT_CONFIG=""
23+
else
24+
AGENT_CONFIG="--skip-agent-config"
25+
fi
2126

2227
set -e
2328

@@ -28,8 +33,8 @@ if [ "$PT_legacy" = "false" ]; then
2833
puppet infrastructure provision replica "$PT_replica" \
2934
--color false \
3035
--yes --token-file "$TOKEN_FILE" \
31-
--skip-agent-config \
32-
--topology mono-with-compile \
36+
$AGENT_CONFIG \
37+
--topology "$PT_topology" \
3338
--enable
3439

3540
elif [ "$PT_legacy" = "true" ]; then
@@ -45,8 +50,8 @@ elif [ "$PT_legacy" = "true" ]; then
4550
puppet infrastructure enable replica "$PT_replica" \
4651
--color false \
4752
--yes --token-file "$TOKEN_FILE" \
48-
--skip-agent-config \
49-
--topology mono-with-compile
53+
$AGENT_CONFIG \
54+
--topology "$PT_topology"
5055

5156
else
5257
exit 1

0 commit comments

Comments
 (0)