Skip to content

Commit

Permalink
Update createInfoCenterOnOKD.sh script
Browse files Browse the repository at this point in the history
Change-Id: Ife84b78c41be5ee012722ff58d02fef0651ec765
  • Loading branch information
fredg02 committed Jun 14, 2023
1 parent f7a8b35 commit 0f2ccd9
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions infoCenter/createInfoCenterOnOKD.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,32 @@ set -o pipefail

# Parameters:
release_name="${1:-}"
url="${2:-}"
sha256="${2:-}"

# Verify inputs
if [[ -z "${release_name}" ]]; then
printf "ERROR: a release name must be given.\n"
exit 1
fi

if [[ -z "${url}" ]]; then
printf "ERROR: a url to the infocenter archive on SimRel JIPP must be given.\n"
if [[ -z "${sha256}" ]]; then
printf "ERROR: a sha256 must be given.\n"
exit 1
fi


pushd docker/
wget -N "${url}"
./build_infocenter_docker_img.sh "${release_name}"
popd

pushd k8s/
./createInfoCenter_yaml.sh "${release_name}"
./createInfoCenter_yaml.sh "${release_name}" "${sha256}"
./deployInfoCenter.sh "${release_name}"
popd

#TODO: actually check when pods are online
# oc get pods -n infocenter | grep "infocenter-${release_name}"
echo "Wait for pods to start..."
sleep 30
oc get pods -n infocenter

#TODO: do you want to remove the oldest infocenter?
oldest_release_name=""
oc delete deployment "infocenter-${oldest_release_name}" -n infocenter
oc delete service "infocenter-${oldest_release_name}" -n infocenter
oc delete route "infocenter-${oldest_release_name}" -n infocenter

0 comments on commit 0f2ccd9

Please sign in to comment.