Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mkdir -p agility-charts && cd agility-charts
export AGILITY_VERSION=3.8690.37

Store the B-Yond License on a temporary directory

Code Block
export BYOND_LICENSE_PATH="/tmp/license.token"
vi ${BYOND_LICENSE_PATH}

Verify curl, jq and helm are available on your laptop (UNIX command)

Code Block
red='\033[0;31m'
green='\033[0;32m'
clear='\033[0m'
if ! command -v jqcurl 2>&1 > /dev/null; then echo -e "${red}jqcurl.............................ERROR. Please install it before continuing${clear}"; else echo -e "${green}jqcurl.............................OK${clear}"; fi; if ! command -v helmjq 2>&1 > /dev/null; then echo -e "${red}helmjq.............................ERROR. Please install it before continuing${clear}"; else echo -e "${green}helmjq.............................OK${clear}"; fi

Ensure jq and helm binaries meet the required version.

Pull the charts:

Code Block
export OCI_USERNAME=$(jq -rR 'split(".") | .; if ! command -v helm 2>&1 > /dev/null; then echo -e "${red}helm...........................ERROR. Please install it before continuing${clear}"; else echo -e "${green}helm...........................OK${clear}"; fi

Ensure curl, jq and helm binaries meet the required version.

Obtain a valid token from the B-Yond License:

Code Block
if cat ${BYOND_LICENSE_PATH} | base64 --decode > /dev/null 2>&1; then
  export TOKEN=$(curl --silent --location --request POST "https://agility-central.b-yond.com/ao/auth/realms/agility/protocol/openid-connect/token" \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --header "Authorization: Basic $(cat ${BYOND_LICENSE_PATH} | tr -d '\n')" \
    --data-urlencode 'grant_type=client_credentials' | jq -r '.access_token')
  if [[ -z "${TOKEN}" ]]; then echo -e "ERROR: Issues getting token from agility-central.b-yond.com"; fi
else
  export TOKEN=$(cat ${BYOND_LICENSE_PATH})
fi

From the TOKEN, obtain the necessary credentials

Code Block
export OCI_USERNAME=$(echo ${TOKEN} | jq -rR 'split(".") | .[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=") | @base64d | fromjson | .imagePullSecret | fromjson | .auths."iad.ocir.io" | .username' ${BYOND_LICENSE_PATH})
export OCI_AUTH_TOKEN=$(echo ${TOKEN} | jq -rR 'split(".") | .[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=") | @base64d | fromjson | .imagePullSecret | fromjson | .auths."iad.ocir.io" | .password' ${BYOND_LICENSE_PATH})
export OCI_EMAIL=$(echo ${TOKEN} | jq -rR 'split(".") | .[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=") | @base64d | fromjson | .imagePullSecret | fromjson | .auths."iad.ocir.io" | .email' ${BYOND_LICENSE_PATH})

)

Pull the charts:

Code Block
rm -rf {agility-system,agility-services,agility}

helm registry login -u "${OCI_USERNAME}" -p "${OCI_AUTH_TOKEN}" iad.ocir.io

helm pull --untar --untardir ./ --version "${AGILITY_VERSION}" oci://iad.ocir.io/idhyugs3p9e3/agility/helm-charts/agility-system
helm pull --untar --untardir ./ --version "${AGILITY_VERSION}" oci://iad.ocir.io/idhyugs3p9e3/agility/helm-charts/agility-services
helm pull --untar --untardir ./ --version "${AGILITY_VERSION}" oci://iad.ocir.io/idhyugs3p9e3/agility/helm-charts/agility

...