Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASMHMS-5994 - Fix for FAS Loader for CSM v1.3.2 #14

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
35 changes: 35 additions & 0 deletions CASMHMS-5994_FASLoader/README.md
Original file line number Diff line number Diff line change
@@ -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`
37 changes: 37 additions & 0 deletions CASMHMS-5994_FASLoader/install.sh
Original file line number Diff line number Diff line change
@@ -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}"``

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the backticks on line 27 intentional?

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"