Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 3.51 KB

README.md

File metadata and controls

91 lines (65 loc) · 3.51 KB

CSM Hotfixes

This repo contains hotfixes which are individually packaged and made available to customers. Changes are built and uploaded for each hotfix, if resulting artifact is not yet available at upload location. The resulting artifact URL is evaluated as

https://storage.googleapis.com/csm-release-public/hotfix/<csm_release_dir>/$(<hotfix_dir>/lib/version.sh).tar.gz

for hotfix located in <csm_release_dir>/<hotfix_dir>/.

Hotfix Distributions

Run ./release.sh <csm_release_dir>/<hotfix_dir> to generate a distribution for the specified hotfix.

Hotfix Directory Structure

Each hotfix directory is located under respective CSM release directory: <csm_release_dir>/<hotfix_dir>/. Hotfix directory is expected to contain asset indexes and scripts for applying the hotfix. The following files are used by release.sh to generate hotfix distributions:

  • lib/version.sh: Script generated by the gen-version-sh utility in vendor/github.hpe.com/hpe/hpc-shastarelm-release/lib/release.sh. Use update-version.sh to properly update the version number in this script.

    Note: The build pipeline will only build versions that do not exist in the GCP hotfix bucket.

  • docker/index.yaml: An optional docker index.yaml file that'll be used to skopeo sync docker images to the hotfix's release
  • docker/transform.sh: An optional script to fixup container image repositories
  • helm/index.yaml: An optional helm index.yaml file that contains a list of helm charts to be added to the hotfix's release

Hotfix Usage (install-hotfix.sh)

Every install-hotfix.sh script

ROOTDIR=$(dirname $0)
source "${ROOTDIR}/lib/version.sh"
${ROOTDIR}/lib/setup-nexus.sh

Including those lines at the head of the hotfix will ensure the right libraries and setup is done.

Hotfix - Including RPMs

To include RPMs in your hotfix, please add them to the CSM repository to the respective YAML files ( compute or non-compute ): https://github.com/Cray-HPE/csm/tree/main/rpm/cray/csm

Conventions:

  • README.md: Hotfix documentation; how to apply the hotfix, and any details.
  • lib/setup-nexus.sh: Script for populating Nexus Repositories with any artifacts the hotfix needs; helm charts, rpms, docker images, and etc.
  • lib/install.sh: (boilerplate) A dependency for setup-nexus.sh, enabling the uploadTypically a symlink to the lib/install.sh library from the vendored SHASTARELM/release repo which is used by lib/setup-nexus.sh.
  • install-hotfix.sh: Applies the hotfix. (if dependencies are needed for a hotfix, then this runs after setup-nexus.sh)

Hotfix Usage

Typically, for a hotfix with dependencies (helm charts, docker images, or RPMs) the execution order for a user would be:

  • lib/setup-nexus.sh
  • lib/install.sh

For hotfixes without dependencies, lib/install.sh is all that is required.

Vendored Repositories

The following Git repositories are vendored (using git vendor) into the CSM repository:

  • release references SHASTARELM/release - Shared tooling for generating releases and facilitating installation. Vendor master branch:

    $ git vendor update release master
  • shasta-cfg references SHASTA-CFG/stable - Default chart customizations and sealed secrets. Vendor master branch:

    $ git vendor update shasta-cfg master