Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support mono topology for standard installation #421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,12 @@ Data type: `String`

The name of the replica to provision

##### `topology`

Data type: `String`

The topology of PE installation

##### `token_file`

Data type: `Optional[String]`
Expand Down
8 changes: 7 additions & 1 deletion plans/subplans/configure.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -111,6 +111,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(),
Expand All @@ -120,6 +125,7 @@
# probably gets "starting", but fails out because that's not "running".
# Can remove flag when that issue is fixed.
legacy => true,
topology => $topology,
)
}

Expand Down
5 changes: 5 additions & 0 deletions tasks/provision_replica.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 9 additions & 4 deletions tasks/provision_replica.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
Loading