diff --git a/README.md b/README.md index ae9ffd69..43a267e6 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,8 @@ Red Hat a demo platform. This allows easy access for Red Hat associates and part ``` 1. Ensure Let's encrypt 1. Run the wrapper install script - 1. `sh ./rhdp/wrapper.sh` + 1. `bash ./rhdp/wrapper.sh azure-region-code` + 2. Where azure region code is `eastasia`, `useast2` etc. 1. You *should* be done 1. You *may* need to recreate the hello world peer-pods depending on timeouts. diff --git a/rhdp/README.md b/rhdp/README.md index b3c5525f..dcb27195 100644 --- a/rhdp/README.md +++ b/rhdp/README.md @@ -1,6 +1,16 @@ # RHDP support Red Hat demo platform is a system for employees and red hat partners to generate test infrastructure. -The scripts in this directory help users of that platform automate deployments +The scripts in this directory help users of that platform automate deployments. + +## To deploy + +1. Stand up the 'Azure Subscription Based Blank Open Environment' +2. Download the credentials +3. Load the credentials into your environment (e.g. using `direnv`) +4. Launch the wrapper script from the repository root directory: + 1. `bash ./rhdp/wrapper.sh eastasia` + 2. The wrapper script **requires** an azure region code this code SHOULD be the same as what was selected in RHDP + diff --git a/rhdp/rhdp-cluster-define.py b/rhdp/rhdp-cluster-define.py index 1f291d32..e9dc4a94 100644 --- a/rhdp/rhdp-cluster-define.py +++ b/rhdp/rhdp-cluster-define.py @@ -84,8 +84,10 @@ def print(): rprint("Run openshift install .") -def run(region: Annotated[str, typer.Argument()] = "eastasia"): - """warpper function for cli parsing as required""" +def run(region: Annotated[str, typer.Argument(help="Azure region code")]): + """ + Region flag requires an azure region key which can be (authoritatively) requested with: "az account list-locations -o table". + """ validate_dir() cleanup(pathlib.Path.cwd()) setup_install( diff --git a/rhdp/wrapper.sh b/rhdp/wrapper.sh index 67b20ebe..ffa19d9c 100644 --- a/rhdp/wrapper.sh +++ b/rhdp/wrapper.sh @@ -1,5 +1,15 @@ + +#!/usr/bin/env bash set -e +if [ "$#" -ne 1 ]; then + echo "Error: Exactly one argument is required." + echo "Usage: $0 {azure-region-code}" + echo "Example: $0 eastasia" + exit 1 +fi +AZUREREGION=$1 + echo "Run from the root directory of the project" echo "\n" echo "Ensuring azure environment is installed" @@ -56,7 +66,7 @@ fi echo "---------------------" echo "defining cluster" echo "---------------------" -python3 rhdp/rhdp-cluster-define.py +python3 rhdp/rhdp-cluster-define.py ${AZUREREGION} echo "---------------------" echo "cluster defined" echo "---------------------"