From e547974e640f9252a6b176d6349bb6b652b89191 Mon Sep 17 00:00:00 2001 From: Mike Buchmann Date: Mon, 15 May 2023 15:43:38 -0500 Subject: [PATCH] Fix for FAS Loader for CSM v1.3.2 --- CASMHMS-5994_FASLoader/README.md | 35 +++++++++++++++++++++++++++++ CASMHMS-5994_FASLoader/install.sh | 37 +++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 CASMHMS-5994_FASLoader/README.md create mode 100644 CASMHMS-5994_FASLoader/install.sh diff --git a/CASMHMS-5994_FASLoader/README.md b/CASMHMS-5994_FASLoader/README.md new file mode 100644 index 0000000..0aa5395 --- /dev/null +++ b/CASMHMS-5994_FASLoader/README.md @@ -0,0 +1,35 @@ +This will update FAS from version 1.24.0 to version 1.24.1 + +Version 1.24.0 contains an issue with the semver pyhton library that was included +with that release which causes the loader to fail. +Version 1.24.1 is created with the old version of the semver python library. + +**NOTE**: If you are on an airgap machine, you will need to down the FAS v1.24.1 tar file and move it to the machine in the same directory as this install script. + +Example to download FAS v1.24.1 tar file (Use podman instead of docker if needed): + +```bash +docker pull us-docker.pkg.dev/csm-release/csm-docker/stable/cray-firmware-action:1.24.1 +docker save us-docker.pkg.dev/csm-release/csm-docker/stable/cray-firmware-action:1.24.1 > fas-1.24.1.tar +``` + +**NOTE**: If you need to have a proxy to have access to external sites, it needs to be set. +You may need to unset proxy after running script. + +Example of proxy settings: + +```bash +export https_proxy=http://hpeproxy.its.hpecorp.net:443 +export no_proxy=.local +``` + +Run `install.sh` in this directory to install version 1.24.1 of FAS. +**NOTE**: The `cray cli` must be installed and configured for the script to work. + +Once the script completes, check the output and check the version of FAS + +Wait for new FAS pod to start running: +`kubectl -n services get pods | grep fas` + +Check version of FAS (should be 1.24.1) +`cray fas service version list` diff --git a/CASMHMS-5994_FASLoader/install.sh b/CASMHMS-5994_FASLoader/install.sh new file mode 100644 index 0000000..0550de2 --- /dev/null +++ b/CASMHMS-5994_FASLoader/install.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -e +set -x + +currentFASVersion=$(cray fas service version list --format json | jq -r .[]) + +if [ "$currentFASVersion" != "1.24.0" ]; then + echo "This patch updates FAS from 1.24.0 to 1.24.1" + echo "Current FAS Version $currentFASVersion" + exit +fi + +if [ -f "fas-1.24.1.tar" ]; then + podman load -i fas-1.24.1.tar +else + podman pull us-docker.pkg.dev/csm-release/csm-docker/stable/cray-firmware-action:1.24.1 +fi + +https_proxy= + +NEXUS_PASSWORD="$(kubectl -n nexus get secret nexus-admin-credential --template {{.data.password}} | base64 -d)" +NEXUS_USERNAME="$(kubectl -n nexus get secret nexus-admin-credential --template {{.data.username}} | base64 -d)" + +podman push \ + us-docker.pkg.dev/csm-release/csm-docker/stable/cray-firmware-action:1.24.1 \ + docker://registry.local/artifactory.algol60.net/csm-docker/stable/cray-firmware-action:1.24.1 \ + --creds "${NEXUS_USERNAME}:${NEXUS_PASSWORD}"`` + +kubectl -n services get deploy cray-fas -o yaml > fas.yaml +sed -i "s/cray-firmware-action:1.24.0/cray-firmware-action:1.24.1/g" fas.yaml +kubectl replace -f fas.yaml + +echo "FAS v1.24.1 deployed" +echo "Wait for new FAS pod to start running:" +echo " kubectl -n services get pods | grep fas" +echo "Check version of FAS (should be 1.24.1)" +echo " cray fas service version list"