Skip to content
Merged
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 11 additions & 1 deletion rhdp/README.md
Original file line number Diff line number Diff line change
@@ -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



6 changes: 4 additions & 2 deletions rhdp/rhdp-cluster-define.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 11 additions & 1 deletion rhdp/wrapper.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 "---------------------"
Expand Down
Loading