Skip to content

Commit 296e83b

Browse files
authored
feat: provide flexibility by default to the azure region (#41)
Signed-off-by: Chris Butler <[email protected]>
1 parent be1c5e1 commit 296e83b

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ Red Hat a demo platform. This allows easy access for Red Hat associates and part
156156
```
157157
1. Ensure Let's encrypt
158158
1. Run the wrapper install script
159-
1. `sh ./rhdp/wrapper.sh`
159+
1. `bash ./rhdp/wrapper.sh azure-region-code`
160+
2. Where azure region code is `eastasia`, `useast2` etc.
160161
1. You *should* be done
161162
1. You *may* need to recreate the hello world peer-pods depending on timeouts.
162163

rhdp/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# RHDP support
22

33
Red Hat demo platform is a system for employees and red hat partners to generate test infrastructure.
4-
The scripts in this directory help users of that platform automate deployments
4+
The scripts in this directory help users of that platform automate deployments.
5+
6+
## To deploy
7+
8+
1. Stand up the 'Azure Subscription Based Blank Open Environment'
9+
2. Download the credentials
10+
3. Load the credentials into your environment (e.g. using `direnv`)
11+
4. Launch the wrapper script from the repository root directory:
12+
1. `bash ./rhdp/wrapper.sh eastasia`
13+
2. The wrapper script **requires** an azure region code this code SHOULD be the same as what was selected in RHDP
14+
515

616

rhdp/rhdp-cluster-define.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ def print():
8484
rprint("Run openshift install .")
8585

8686

87-
def run(region: Annotated[str, typer.Argument()] = "eastasia"):
88-
"""warpper function for cli parsing as required"""
87+
def run(region: Annotated[str, typer.Argument(help="Azure region code")]):
88+
"""
89+
Region flag requires an azure region key which can be (authoritatively) requested with: "az account list-locations -o table".
90+
"""
8991
validate_dir()
9092
cleanup(pathlib.Path.cwd())
9193
setup_install(

rhdp/wrapper.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
2+
#!/usr/bin/env bash
13
set -e
24

5+
if [ "$#" -ne 1 ]; then
6+
echo "Error: Exactly one argument is required."
7+
echo "Usage: $0 {azure-region-code}"
8+
echo "Example: $0 eastasia"
9+
exit 1
10+
fi
11+
AZUREREGION=$1
12+
313
echo "Run from the root directory of the project"
414
echo "\n"
515
echo "Ensuring azure environment is installed"
@@ -56,7 +66,7 @@ fi
5666
echo "---------------------"
5767
echo "defining cluster"
5868
echo "---------------------"
59-
python3 rhdp/rhdp-cluster-define.py
69+
python3 rhdp/rhdp-cluster-define.py ${AZUREREGION}
6070
echo "---------------------"
6171
echo "cluster defined"
6272
echo "---------------------"

0 commit comments

Comments
 (0)