Last active
June 20, 2019 20:48
-
-
Save awgreene/f7b0f10124a11034bd7b19f5f08b360e to your computer and use it in GitHub Desktop.
This script downloads and runs the OpenShift installer associated with the provided tag.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script downloads and runs the OpenShift installer associated with the provided tag. | |
echo 'Select a tag from https://openshift-release.svc.ci.openshift.org to download and run...' | |
read -p 'Openshift Tag: ' TAG | |
oc adm release extract --command=openshift-install registry.svc.ci.openshift.org/ocp/release:$TAG | |
export DIR_NAME=cluster-0 | |
export LOG_LEVEL=debug | |
echo 'Cleaning workspace...' | |
rm -rf $DIR_NAME | |
mkdir $DIR_NAME | |
cp install-config.yaml ./$DIR_NAME/install-config.yaml | |
echo 'Starting installer...' | |
./openshift-install create cluster --dir $DIR_NAME --log-level $LOG_LEVEL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the OpenShift Installer
Prereqs:
Docker:
You must have the docker daemon running on your machine. If you do not, download docker by executing the following steps:
Make sure that docker works with
docker ps
.AWS Account
You must have valid AWS credentials.
Configuring your Installer
?
dropdown toCommand Line Tools
that'll give you anoc login
command to cp/paste in your terminal. Run that command.<YOUR_API_CI_NAME>
with the first part of your redhat email. Example:agreene
in agreene@redhat.com:openshift-pull-secrets.yaml
and place the file in~/dev/openshift/installer
. Add the auth fromreg-svc-ps.yaml
toopenshift-pull-secret.yaml
. Remove all whitespaces and then confirm that it is valid json at https://jsonlint.com../openshift-install create install-config
~/dev/openshift/installer/automated-openshift-installer.sh
.With this, you can now run the script above to deploy any tagged version of openshift.
Running the script
Simply run the following command and specify the image from https://openshift-release.svc.ci.openshift.org/ :
After two days, a reaper will kill your OpenShift Cluster. Run the following command to ensure that all resource have been cleaned up:
You can then rerun the install script above.
Troubleshooting
If you see the following error when running the installer:
Then complete the following steps:
Go To Record Sets
button.