Skip to content
Snippets Groups Projects
Commit 3ff2c60e authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

Merge branch 'ebrains-23-02-with-site-config' into 'ebrains-23-02'

Add a site-config

See merge request technical-coordination/project-internal/devops/platform/ebrains-spack-builds!329
parents 9b4dc82d b57aa5c0
No related branches found
No related tags found
No related merge requests found
__pycache__
*.pyc
*.err
*.out
.spack-env/
spack.lock
......@@ -4,6 +4,7 @@ stages:
variables:
SPACK_VERSION: v0.18.1
BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/tc/ebrains-spack-build-env/okd:okd_22.12
SYSTEMNAME: ebrainslab
# start an OpenShift Job that will build the Spack environment
.deploy-build-environment:
......@@ -185,6 +186,7 @@ build-spack-env-on-runner:
- spack compiler find
- spack repo add .
- spack env create $SPACK_DEV_ENV spack.yaml
- cp -r site-config $SPACK_ROOT/var/spack/environments/$SPACK_DEV_ENV/
- spack env activate $SPACK_DEV_ENV
- spack install -y -j2 --fresh --test root
after_script:
......@@ -260,8 +262,8 @@ sync-gitlab-spack-instance:
- spack repo list
# activate and update environment (and create it, if it doesn't exist)
- spack env list | grep -q $SPACK_NFS_ENV && echo "Environment created already" || spack env create $SPACK_NFS_ENV $CI_PROJECT_DIR/spack.yaml
- cp -r -t $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/ $CI_PROJECT_DIR/{site-config,spack.yaml}
- spack env activate $SPACK_NFS_ENV
- cp $CI_PROJECT_DIR/spack.yaml $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/spack.yaml
# There is a known spack bug (https://github.com/spack/spack/issues/29447) in installing test dependencies for installation tests. The workaround suggested
# in the issue is to NOT concretize separately, but simply remove the .lock file and let the enironment be concretized by the spack install command:
- rm $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/spack.lock || echo "No spack.lock file"
......
......@@ -39,6 +39,8 @@ spec:
mountPath: /srv
command: ["/usr/local/bin/deploy-build-env.sh", "$OP", "$INSTALLATION_ROOT", "$SPACK_VERSION", "$SPACK_ENV", "$BRANCH", "$RELEASE_NAME", "$LAB_KERNEL_ROOT"]
env:
- name: SYSTEMNAME
value: ebrainslab
- name: GITLAB_USER
valueFrom:
secretKeyRef:
......
......@@ -49,7 +49,7 @@ then
fi
# update and activate environment
cp $EBRAINS_REPO/spack.yaml $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/spack.yaml
cp -r -t $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/ $EBRAINS_REPO/{site-config,spack.yaml}
spack env activate $EBRAINS_SPACK_ENV
# There is a known spack bug (https://github.com/spack/spack/issues/29447) in installing test dependencies
# for installation tests. The workaround suggested in the issue is to NOT concretize separately, but simply
......
# exclude all files to allow sites to add own configs
*/
# un-exclude the configs tracked in this repository
!g100
!jurecadc
!jusuf
# Site specific config for Spack
Usually the machine name is available in an environment variable like
`$SYSTEMNAME`, `$HPC_SYSTEM` or equivalent to load local base configuration.
The environment base `spack.yaml` then includes all files in the specific
folder:
```yaml
spack:
include:
- site-config/$SYSTEMNAME
```
You can check the overlay is working by
```bash
spack env activate .
spack config blame config
```
Some system specific entries should be governed by the site-specific
envrionment config.
compilers:
- compiler:
spec: gcc@11.3.0
paths:
cc: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gcc
cxx: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/g++
f77: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gfortran
fc: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gfortran
flags: {}
operating_system: rocky8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@8.5.0
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: null
fc: null
flags: {}
operating_system: rocky8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
config:
build_stage:
- $USERSOFTWARE/spack/user-cache/$user/spack-stage
- $tempdir/$user/spack-stage
source_cache: $USERSOFTWARE/spack/source-cache
test_stage: $USERSOFTWARE/spack/user-cache/$user/test
misc_cache: $USERSOFTWARE/spack/user-cache/$user/cache
install_tree:
root: $USERSOFTWARE/install
db_lock_timeout: 10
# `spack external find` with
# Currently Loaded Modules:
# 1) Stages/2023 (S) 2) GCCcore/.11.3.0 (H) 3) zlib/.1.2.12 (H) 4) binutils/.2.38 (H) 5) StdEnv/2023 6) spack/0.19.2
packages:
findutils:
externals:
- spec: findutils@4.6.0
prefix: /usr
groff:
externals:
- spec: groff@1.22.3
prefix: /usr
flex:
externals:
- spec: flex@2.6.1+lex
prefix: /usr
diffutils:
externals:
- spec: diffutils@3.6
prefix: /usr
git:
externals:
- spec: git@2.31.1~tcltk
prefix: /usr
m4:
externals:
- spec: m4@1.4.18
prefix: /usr
texinfo:
externals:
- spec: texinfo@6.5
prefix: /usr
subversion:
externals:
- spec: subversion@1.10.2
prefix: /usr
libtool:
externals:
- spec: libtool@2.4.6
prefix: /usr
binutils:
externals:
- spec: binutils@2.38
prefix: /p/software/jurecadc/stages/2023/software/binutils/2.38-GCCcore-11.3.0
- spec: binutils@2.30.117
prefix: /usr
openssl:
externals:
- spec: openssl@1.1.1k
prefix: /usr
pkgconf:
externals:
- spec: pkgconf@1.4.2
prefix: /usr
automake:
externals:
- spec: automake@1.16.1
prefix: /usr
tar:
externals:
- spec: tar@1.30
prefix: /usr
gmake:
externals:
- spec: gmake@4.2.1
prefix: /usr
openssh:
externals:
- spec: openssh@8.0p1
prefix: /usr
curl:
externals:
- spec: curl@7.61.1+gssapi+ldap+nghttp2
prefix: /usr
git-lfs:
externals:
- spec: git-lfs@2.13.3
prefix: /usr
gawk:
externals:
- spec: gawk@4.2.1
prefix: /usr
coreutils:
externals:
- spec: coreutils@8.30
prefix: /usr
bison:
externals:
- spec: bison@3.0.4
prefix: /usr
autoconf:
externals:
- spec: autoconf@2.69
prefix: /usr
# packages:
# all:
# compiler: [gcc@11.2.0]
# python:
# buildable: False
# version: [3.9.6]
# externals:
# - spec: "python@3.9.6%gcc@11.2.0 arch=linux-rocky8-zen2"
# prefix: /p/software/jurecadc/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/
# openssl:
# buildable: False
# version: [1.1.1k]
# externals:
# - spec: openssl@1.1.1k
# prefix: /p/software/jurecadc/stages/2022/software/OpenSSL/1.1/
# mpi:
# buildable: False
# openmpi:
# externals:
# - spec: "openmpi@4.1.2%gcc@11.2.0 arch=linux-rocky8-zen2"
# prefix: /p/software/jurecadc/stages/2022/software/OpenMPI/4.1.2-GCC-11.2.0/
spack:
include:
- site-config/$SYSTEMNAME
specs:
# Notebook
- r-irkernel
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment