A Spack environment for testing ACCESS-NRI infrastructure.
Branch protections should be set up on main
and the special backport/*.*
branches, which are used for backporting of fixes to major releases (the YEAR.MONTH
portion of the YEAR.MONTH.MINOR
version) of models.
There are a few secrets and variables that must be set at the repository level.
BUILD_DB_CONNECTION_STR
: A postgresql connection url to the release provenance databaseGH_COMMIT_CHECK_TOKEN
: GitHub Token that allows workflows to run based on workflow-authored commits (in the case where a user uses!bump
commands in PRs that bumps the version of the model)
BUILD_DB_PACKAGES
: List ofspack
packages that are model components that will be uploaded to the release provenance databaseNAME
: which corresponds to the model name - which is usually the repository nameCONFIG_VERSIONS_SCHEMA_VERSION
: Version of theconfig/versions.json
schema used in this repositorySPACK_YAML_SCHEMA_VERSION
: Version of the ACCESS-NRI-stylespack.yaml
schema used in this repository
GitHub Environments are sets of variables and secrets that are used specifically to deploy software, and hence have more security requirements for their use.
Currently, we have two Environments per deployment target - one for Release
and one for Prerelease
. Our current list of deployment targets and Environments can be found in this deployment configuration file in build-cd
.
In order to deploy to a given deployment target:
- Environments with the name of the deployment target must be created in this repository and have the associated secrets/variables set (see below)
- There must be a
Prerelease
Environment associated with theRelease
Environment. For example, if we are deploying toSUPERCOMPUTER
, we require Environments with the namesSUPERCOMPUTER
,SUPERCOMPUTER Prerelease
.
When setting the environment up, remember to require sign off by a member of ACCESS-NRI when deploying as a Release
.
Regarding the secrets and variables that must be created:
HOST
: The deployment location SSH HostHOST_DATA
: The deployment location SSH Host for data transfer (may be the same asHOST
)SSH_KEY
: A SSH Key that allows access to the aboveHOST
/HOST_DATA
USER
: A Username to login to the aboveHOST
/HOST_DATA
DEPLOYMENT_TARGET
: Name of the deployment target for logging purposesSPACK_INSTALLS_ROOT_LOCATION
: Path to the directory that contains all versions of a deployment ofspack
. For example, if/some/apps/spack
is theSPACK_INSTALLS_ROOT_LOCATION
, that directory will contain directories like0.20
,0.21
,0.22
, which in turn contain an install ofspack
,spack-packages
andspack-config
SPACK_YAML_LOCATION
: Path to a directory that will contain thespack.yaml
from this repository during deployment- (Optional)
SPACK_INSTALL_PARALLEL_JOBS
: Explicit number of parallel jobs for the installation of the given model. Must be either of the form--jobs N
or unset (for the default--jobs 16
).