diff --git a/plans/subplans/configure.pp b/plans/subplans/configure.pp index bccc0503..a6d32dfb 100644 --- a/plans/subplans/configure.pp +++ b/plans/subplans/configure.pp @@ -2,7 +2,7 @@ # # @summary Configure first-time classification and DR setup # -# @param compiler_pool_address +# @param compiler_pool_address # The service address used by agents to connect to compilers, or the Puppet # service. Typically this is a load balancer. # @param internal_compiler_a_pool_address @@ -107,6 +107,11 @@ } if $arch['disaster-recovery'] { + $topology = $arch['architecture']? { + 'standard' => 'mono', + default => 'mono-with-compile', + } + # Run the PE Replica Provision run_task('peadm::provision_replica', $primary_target, replica => $replica_target.peadm::certname(), @@ -116,6 +121,7 @@ # probably gets "starting", but fails out because that's not "running". # Can remove flag when that issue is fixed. legacy => true, + topology => $topology, ) } diff --git a/tasks/provision_replica.json b/tasks/provision_replica.json index 8d1b44da..e4e7f0de 100644 --- a/tasks/provision_replica.json +++ b/tasks/provision_replica.json @@ -5,6 +5,11 @@ "type": "String", "description": "The name of the replica to provision" }, + "topology": { + "type": "String", + "description": "The topology of PE installation", + "default": "mono-with-compile" + }, "token_file": { "type": "Optional[String]", "description": "The name of the token-file for auth" diff --git a/tasks/provision_replica.sh b/tasks/provision_replica.sh index 73161810..8eadb2ec 100755 --- a/tasks/provision_replica.sh +++ b/tasks/provision_replica.sh @@ -18,6 +18,11 @@ else export TOKEN_FILE="$PT_token_file" fi +if [ "$PT_topology" = "mono" ] ; then + AGENT_CONFIG="" +else + AGENT_CONFIG="--skip-agent-config" +fi set -e @@ -28,8 +33,8 @@ if [ "$PT_legacy" = "false" ]; then puppet infrastructure provision replica "$PT_replica" \ --color false \ --yes --token-file "$TOKEN_FILE" \ - --skip-agent-config \ - --topology mono-with-compile \ + $AGENT_CONFIG \ + --topology "$PT_topology" \ --enable elif [ "$PT_legacy" = "true" ]; then @@ -45,8 +50,8 @@ elif [ "$PT_legacy" = "true" ]; then puppet infrastructure enable replica "$PT_replica" \ --color false \ --yes --token-file "$TOKEN_FILE" \ - --skip-agent-config \ - --topology mono-with-compile + $AGENT_CONFIG \ + --topology "$PT_topology" else exit 1