Skip to content
Snippets Groups Projects
Commit ee9cc871 authored by Jithu Murugan's avatar Jithu Murugan
Browse files

Merge branch 'esd-spack-installation' into...

Merge branch 'esd-spack-installation' into VT-70-function-Migrate-Spack-env-setup-into-ESD-repo-with-buildcache
parents 8b660f42 baa6e9d9
No related branches found
No related tags found
Pipeline #59501 failed with stages
in 47 minutes and 21 seconds
.env 0 → 100644
BUILDCACHE_OCI_HOST=""
BUILDCACHE_OCI_PASSWORD=""
BUILDCACHE_OCI_PROJECT=""
BUILDCACHE_OCI_USERNAME=""
CONCRETIZE_OCI_HOST=""
CONCRETIZE_OCI_PASSWORD=""
CONCRETIZE_OCI_PROJECT=""
CONCRETIZE_OCI_USERNAME""
# ~~Yashchiki~~Koutakia # Dedal
For now, this repository provides helpers for the EBRAINS container image build flow. This repository provides functionalities to easily ```managed spack environments``` and ```helpers for the container image build flow```.
The lowest spack version which should be used with this library is v0.22.0 The lowest ```spack version``` compatible with this library is ```v0.23.0```.
This repository also provied CLI interface. For more informations, after installing this library, call dedal --help.
**Setting up the needed environment variables**
The ````<checkout path>\dedal\.env```` file contains the environment variables required for OCI registry used for caching.
Ensure that you edit the ````<checkout path>\dedal\.env```` file to match your environment.
The following provides an explanation of the various environment variables:
# OCI Registry Configuration Sample for concretization caches
# =============================
# The following variables configure the Harbor docker OCI registry (EBRAINS) used for caching.
# The hostname of the OCI registry. e.g. docker-registry.ebrains.eu
CONCRETIZE__OCI_HOST="docker-registry.ebrains.eu"
# The project name in the Docker registry.
CONCRETIZE__OCI_PROJECT="concretize_caches"
# The username used for authentication with the Docker registry.
CONCRETIZE__OCI_USERNAME="robot$concretize-cache-test+user"
# The password used for authentication with the Docker registry.
CONCRETIZE__OCI_HOST="###ACCESS_TOKEN###"
# OCI Registry Configuration Sample for binary caches
# =============================
# The following variables configure the Harbor docker OCI registry (EBRAINS) used for caching.
# The hostname of the OCI registry. e.g. docker-registry.ebrains.eu
BUILDCACHE_OCI_HOST="docker-registry.ebrains.eu"
# The project name in the Docker registry.
BUILDCACHE_OCI_PROJECT="binary-cache-test"
# The username used for authentication with the Docker registry.
BUILDCACHE_OCI_USERNAME="robot$binary-cache-test+user"
# The password used for authentication with the Docker registry.
BUILDCACHE_OCI_HOST="###ACCESS_TOKEN###"
For both concretization and binary caches, the cache version can be changed via the attributes ```cache_version_concretize``` and ```cache_version_build```.
The default values are ```v1```.
...@@ -12,8 +12,8 @@ class SpackOperationUseCache(SpackOperation): ...@@ -12,8 +12,8 @@ class SpackOperationUseCache(SpackOperation):
This class uses caching for the concretization step and for the installation step. This class uses caching for the concretization step and for the installation step.
""" """
def __init__(self, spack_config: SpackConfig = SpackConfig(), cache_version_concretize='cache', def __init__(self, spack_config: SpackConfig = SpackConfig(), cache_version_concretize='v1',
cache_version_build='cache'): cache_version_build='v1'):
super().__init__(spack_config, logger=get_logger(__name__)) super().__init__(spack_config, logger=get_logger(__name__))
self.cache_dependency = BuildCacheManager(os.environ.get('CONCRETIZE_OCI_HOST'), self.cache_dependency = BuildCacheManager(os.environ.get('CONCRETIZE_OCI_HOST'),
os.environ.get('CONCRETIZE_OCI_PROJECT'), os.environ.get('CONCRETIZE_OCI_PROJECT'),
......
import os import os
ebrains_spack_builds_git = 'https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/ebrains-spack-builds.git' ebrains_spack_builds_git = 'https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/ebrains-spack-builds.git'
SPACK_VERSION = "0.22.0" SPACK_VERSION = "0.23.0"
SPACK_ENV_ACCESS_TOKEN = os.getenv("SPACK_ENV_ACCESS_TOKEN") SPACK_ENV_ACCESS_TOKEN = os.getenv("SPACK_ENV_ACCESS_TOKEN")
test_spack_env_git = f'https://oauth2:{SPACK_ENV_ACCESS_TOKEN}@gitlab.ebrains.eu/ri/projects-and-initiatives/virtualbraintwin/tools/test-spack-env.git' test_spack_env_git = f'https://oauth2:{SPACK_ENV_ACCESS_TOKEN}@gitlab.ebrains.eu/ri/projects-and-initiatives/virtualbraintwin/tools/test-spack-env.git'
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