-
Notifications
You must be signed in to change notification settings - Fork 15
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
CRAYSAT-1767: Set cray-sat version in csm-config #2962
Conversation
bf624e7
to
b0faf83
Compare
I didn't realize I didn't get any automatic reviewers. Added reviewers.
|
9b4200e
to
b69fe84
Compare
I realized last week that this is going to require one more change in order to work correctly. Today, the SAT product stream uploads the cray-sat container image to the image registry in Nexus as Formerly only the SAT product stream used to deliver the Ansible that caused the file This will create a backwards compatibility issue. If a newer version of Here are the steps I'm going to take to handle this:
Until I complete those changes, this should not be merged. |
Add an initContainer definition to the values defined for the `csm-config` Helm chart. This initContainer sets the cray-sat image tag to match the version included in the CSM build, so that they are always consistent. The Ansible content in csm-config sets this cray-sat container image tag in the file `/opt/cray/etc/sat/version`, so that the sat-podman wrapper script knows which version of the image to run. Add logic to `release.sh` that inspects the container image tags specified in `docker/index.yaml` and injects those tags for the cray-sat container image and the Alpine Linux container image into the csm-config Helm chart values in the Loftsman manifest. Modify `lib/setup-nexus.sh` to set the `cray-sat` container image version and tag the latest one as `csm-latest`. We are phasing out reliance on this `csm-latest` tag, but it is still the default used by the sat-podman wrapper script if the file `/opt/cray/etc/sat/version` does not exist. Modify `lib/setup-nexus.sh` to also write the tag of the `cray-sat` image to `/opt/cray/etc/sat/version` as well. This is only executed on `ncn-m001`, but that is sufficient for bootstrapping. When the CSM layer of the CFS configuration is applied, this file will be set on all master and worker management nodes. Test Description: Only tested one piece at a time so far.
Update `lib/setup-nexus.sh` to ensure the directory `/opt/cray/etc/sat` exists before writing to the `version` file in that directory. On an upgrade, this directory should already exist because it will have been created by management node personalization performed by CFS. However, on a fresh install, this script is executed on the PIT, and this directory will not exist. In fact, in that case, `sat` is not even installed on the PIT, so writing to this file won't affect anything, but it also won't hurt anything.
Use the rolling tag of `alpine:3` instead of `alpine:3.18` since we do not depend on any particular functionality specific to a version of the `alpine` container in its usage in the `csm-config` Helm chart's initContainer.
Update the `sysmgmt.yaml` Loftsman manifest to specify the latest 1.17.0 version of the `csm-config` Helm chart. This is the newly published release which includes the `csm.ncn.sat` role which is being modified by the `initContainer` which is being used here.
The cray-sat image now publishes to csm-docker, and this is where the newer 3.0.0 version of cray-sat-podman expects it to be uploaded to Nexus on the system. Make the following changes: * Download cray-sat from csm-docker. This also has the side effect of uploading to the same path in Nexus upon installation * Change code in `lib/setup-nexus.sh` to tag the image as `csm-latest` in its new location in Nexus * Modify the `yq` command in `release.sh` that reads the `cray-sat` container image version from `docker/index.yaml` * Remove harmless but now unnecessary condition on `sat-docker` path in `build/images/inspect.sh` Test Description: Tested the `yq` command independently to ensure it could still get the version of `cray-sat`.
8b1bc04
to
446d10b
Compare
The actions from my previous comment here have been completed. Here are the PRs, which have been merged:
There is still a PR which should be merged in metal-provision, but it should be timed to merge with this change, so both changes appear in the same CSM 1.6.0 build. Here is that PR: |
Summary and Scope
Add an initContainer definition to the values defined for the
csm-config
Helm chart. This initContainer sets the cray-sat image tag to match the version included in the CSM build, so that they are always consistent. The Ansible content in csm-config sets this cray-sat container image tag in the file/opt/cray/etc/sat/version
, so that the sat-podman wrapper script knows which version of the image to run.Add logic to
release.sh
that inspects the container image tags specified indocker/index.yaml
and injects those tags for the cray-sat container image and the Alpine Linux container image into the csm-config Helm chart values in the Loftsman manifest.Modify
lib/setup-nexus.sh
to set thecray-sat
container image version and tag the latest one ascsm-latest
. We are phasing out reliance on thiscsm-latest
tag, but it is still the default used by the sat-podman wrapper script if the file/opt/cray/etc/sat/version
does not exist. Modifylib/setup-nexus.sh
to also write the tag of thecray-sat
image to/opt/cray/etc/sat/version
as well. This is only executed onncn-m001
, but that is sufficient for bootstrapping. When the CSM layer of the CFS configuration is applied, this file will be set on all master and worker management nodes.Issues and Related PRs
Testing
Tested on:
Test description:
I've done various manual tests of each piece of this.
I have tested that shipping a similar Loftsman manifest on mug does result in the correct content being uploaded to the csm-config-management VCS repository. I have tested the individual
yq
commands andsed
commands added to therelease.sh
script separately outside of their full context.Risks and Mitigations
This adds an initContainer to the
csm-config
Helm chart, and if that fails, the import of the csm-config-management repo to VCS will fail.It's also possible I don't understand the build process fully, and I may have done something incorrectly that won't work due to the ordering of build steps. This should be reviewed carefully.
Pull Request Checklist