ctao-bdms-clients 0.2.1__tar.gz → 0.3.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.gitignore +4 -0
- ctao_bdms_clients-0.3.0rc1/.gitlab-ci.yml +60 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/Dockerfile +1 -1
- ctao_bdms_clients-0.3.0rc1/Makefile +20 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/PKG-INFO +5 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/aiv-config.yml +1 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/Chart.yaml +4 -4
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/Makefile +1 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/README.md +40 -14
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/scripts/bootstrap_rucio/wait_for_rucio.sh +1 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/bootstrap_jobs.yaml +60 -88
- ctao_bdms_clients-0.3.0rc1/chart/templates/ingestion-daemon.yaml +168 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/tests/test_jobs.yaml +1 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/values.yaml +66 -9
- ctao_bdms_clients-0.3.0rc1/docs/changes/111.api.rst +1 -0
- ctao_bdms_clients-0.3.0rc1/docs/changes/113.optimization.rst +1 -0
- ctao_bdms_clients-0.3.0rc1/docs/changes/122.feature.rst +1 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/pyproject.toml +7 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/_version.py +2 -2
- ctao_bdms_clients-0.3.0rc1/src/bdms/acada_ingest_cli.py +400 -0
- ctao_bdms_clients-0.3.0rc1/src/bdms/acada_ingestion.py +946 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/conftest.py +132 -12
- ctao_bdms_clients-0.3.0rc1/src/bdms/tests/test_acada_ingest_cli.py +279 -0
- ctao_bdms_clients-0.3.0rc1/src/bdms/tests/test_acada_ingestion.py +1718 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_dpps_rel_0_0.py +6 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/utils.py +11 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/ctao_bdms_clients.egg-info/PKG-INFO +5 -1
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/ctao_bdms_clients.egg-info/SOURCES.txt +7 -0
- ctao_bdms_clients-0.3.0rc1/src/ctao_bdms_clients.egg-info/entry_points.txt +2 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/ctao_bdms_clients.egg-info/requires.txt +4 -0
- ctao_bdms_clients-0.2.1/.gitlab-ci.yml +0 -46
- ctao_bdms_clients-0.2.1/Makefile +0 -11
- ctao_bdms_clients-0.2.1/src/bdms/acada_ingestion.py +0 -479
- ctao_bdms_clients-0.2.1/src/bdms/tests/test_acada_ingestion.py +0 -526
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.codespell-ignores +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.dockerignore +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.flake8 +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.gitmodules +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/.pre-commit-config.yaml +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/CHANGES.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/LICENSE +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/MANIFEST.in +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/README.md +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/aiv-config-dependencies.yml +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/scripts/bootstrap_rucio/setup_rucio.sh +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/scripts/certificates/install_ca.sh +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/_helpers.tpl +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/_helpers_cert.tpl +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/configmap.yaml +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/prepuller.yaml +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/chart/templates/test_storages.yaml +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/Makefile +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/changelog.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/changes/template.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/chart.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/conf.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/data_ingestion_acada.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/data_transfers.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/getting_started.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/index.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/reference/acada_ingestion.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/reference/index.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/bdms_repos_interaction.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/certificates.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/fts.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/index.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/rucio_configuration.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/docs/server_setup/storage_elements.rst +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/env_template +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/report/inspection.tex +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/report/performance_verification.tex +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/report/preamble.tex +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/setup.cfg +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/sonar-project.properties +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/__init__.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/extract_fits_metadata.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/__init__.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_basic_rucio_functionality.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_extract_fits_metadata.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_file_replicas.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_metadata.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/tests/test_onsite_storage.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/bdms/version.py +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/ctao_bdms_clients.egg-info/dependency_links.txt +0 -0
- {ctao_bdms_clients-0.2.1 → ctao_bdms_clients-0.3.0rc1}/src/ctao_bdms_clients.egg-info/top_level.txt +0 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
include:
|
2
|
+
- project: 'cta-computing/dpps/aiv/dpps-aiv-toolkit'
|
3
|
+
ref: 1e9b640800ac73c215ce59df01330085d05b335e
|
4
|
+
file: 'ci-functions.yml'
|
5
|
+
- "aiv-config.yml"
|
6
|
+
|
7
|
+
|
8
|
+
variables:
|
9
|
+
CHART_LOCATION: chart
|
10
|
+
CHART_NAME: bdms
|
11
|
+
CHART_EXTRA_VALUES: "--set dev.client_image_tag=${DOCKER_TAG} --set acada_ingest.image.tag=${DOCKER_TAG}"
|
12
|
+
DOCKER_IMAGE_CONTEXT: '${CI_PROJECT_DIR}'
|
13
|
+
RUCIO_VERSION: "35.4.1"
|
14
|
+
RUCIO_TAG: "release-${RUCIO_VERSION}"
|
15
|
+
|
16
|
+
stages:
|
17
|
+
- prepare
|
18
|
+
- lint
|
19
|
+
- build
|
20
|
+
- sign
|
21
|
+
- tests
|
22
|
+
- sonarqube
|
23
|
+
- publish
|
24
|
+
- report
|
25
|
+
- changelog
|
26
|
+
|
27
|
+
k8s-integration-tests:
|
28
|
+
# override from toolkit to add .env file with CI secrets
|
29
|
+
script:
|
30
|
+
- echo -e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY\nMINIO_SECRET_KEY=$MINIO_SECRET_KEY\n" > .env
|
31
|
+
- ${MAKE} test-chart 2>&1 | tee test-output.log
|
32
|
+
|
33
|
+
k8s-integration-tests-with-upgrade:
|
34
|
+
extends: k8s-integration-tests
|
35
|
+
script:
|
36
|
+
- echo -e "MINIO_ACCESS_KEY=$MINIO_ACCESS_KEY\nMINIO_SECRET_KEY=$MINIO_SECRET_KEY\n" > .env
|
37
|
+
- ${MAKE} test-chart 2>&1 | tee test-output.log
|
38
|
+
- find -name Chart.lock -delete
|
39
|
+
# seconds test, upgrades current cluster
|
40
|
+
- ${MAKE} test-chart 2>&1 | tee test-output.log
|
41
|
+
|
42
|
+
|
43
|
+
build:
|
44
|
+
variables:
|
45
|
+
CI_HARBOR_REGISTRY_IMAGE: '${HARBOR_HOST}/dpps/bdms-client:${DOCKER_TAG}'
|
46
|
+
KANIKO_EXTRA_ARGS: --build-arg RUCIO_TAG=${RUCIO_TAG}
|
47
|
+
|
48
|
+
build-ingestion-daemon:
|
49
|
+
extends: build
|
50
|
+
variables:
|
51
|
+
CI_HARBOR_REGISTRY_IMAGE: '${HARBOR_HOST}/dpps/bdms-ingestion-daemon:${DOCKER_TAG}'
|
52
|
+
KANIKO_EXTRA_ARGS: --build-arg RUCIO_TAG=${RUCIO_TAG}
|
53
|
+
|
54
|
+
hadolint:
|
55
|
+
rules:
|
56
|
+
- when: never
|
57
|
+
|
58
|
+
sign:
|
59
|
+
rules:
|
60
|
+
- when: never
|
@@ -20,7 +20,7 @@ ARG RUCIO_TAG
|
|
20
20
|
# server and daemons use root, clients use "user", switch to root, install, then back
|
21
21
|
USER root
|
22
22
|
COPY --from=builder /tmp/dist/ /tmp/dist/
|
23
|
-
RUN dnf install -y --setopt=install_weak_deps=False git \
|
23
|
+
RUN dnf install -y --setopt=install_weak_deps=False git procps \
|
24
24
|
&& python3 -m pip install --no-cache-dir /tmp/dist/ctao_bdms* \
|
25
25
|
&& dnf autoremove -y \
|
26
26
|
&& dnf clean all
|
@@ -0,0 +1,20 @@
|
|
1
|
+
###
|
2
|
+
# TODO: duplicate in config?
|
3
|
+
export CHART_NAME=bdms
|
4
|
+
export CHART_LOCATION=chart
|
5
|
+
include dpps-aiv-toolkit/Makefile
|
6
|
+
|
7
|
+
|
8
|
+
# TODO: move this to kit
|
9
|
+
export TEST_ARTIFACTS_PATH ?= $(PWD)
|
10
|
+
export TEST_REPORT_CONFIG ?= $(PWD)/aiv-config.yml
|
11
|
+
export TEX_CONTENT_PATH ?= $(PWD)/report
|
12
|
+
|
13
|
+
build-dev-server-images:
|
14
|
+
# TODO: should it be a separate image? it should have a different name
|
15
|
+
docker build . -t harbor.cta-observatory.org/dpps/bdms-ingestion-daemon:dev
|
16
|
+
./kind -n $(KUBECLUSTER) load docker-image \
|
17
|
+
harbor.cta-observatory.org/dpps/bdms-ingestion-daemon:dev
|
18
|
+
|
19
|
+
|
20
|
+
dev: build-dev-server-images
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ctao-bdms-clients
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0rc1
|
4
4
|
Summary: Client module for the CTAO DPPS Bulk Data Management System
|
5
5
|
Author-email: Georgios Zacharis <georgios.zacharis@inaf.it>, Stefano Gallozzi <Stefano.gallozzi@inaf.it>, Michele Mastropietro <michele.mastropietro@inaf.it>, Syed Anwar Ul Hasan <syedanwarul.hasan@cta-consortium.org>, Maximilian Linhoff <maximilian.linhoff@cta-observatory.org>, Volodymyr Savchenko <Volodymyr.Savchenko@epfl.ch>
|
6
6
|
License-Expression: BSD-3-Clause
|
@@ -13,6 +13,10 @@ Requires-Dist: astropy<8.0.0a0,>=6.0.1
|
|
13
13
|
Requires-Dist: ctao-bdms-rucio-policy~=0.1.0
|
14
14
|
Requires-Dist: rucio-clients~=35.7.0
|
15
15
|
Requires-Dist: protozfits>=2.7.2
|
16
|
+
Requires-Dist: watchdog>=6.0.0
|
17
|
+
Requires-Dist: filelock>=3.18.0
|
18
|
+
Requires-Dist: prometheus-client>=0.22.1
|
19
|
+
Requires-Dist: ruamel.yaml
|
16
20
|
Provides-Extra: test
|
17
21
|
Requires-Dist: pytest; extra == "test"
|
18
22
|
Requires-Dist: pytest-cov; extra == "test"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
apiVersion: v2
|
2
2
|
name: bdms
|
3
3
|
version: 0.1.0
|
4
|
-
appVersion:
|
4
|
+
appVersion: dev
|
5
5
|
description: A Helm chart for the bdms project
|
6
6
|
type: application
|
7
7
|
keywords:
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
- name: postgresql
|
19
19
|
condition: postgresql.enabled
|
20
20
|
version: 15.5.10
|
21
|
-
repository: oci://
|
21
|
+
repository: oci://harbor.cta-observatory.org/proxy_cache/bitnamicharts
|
22
22
|
|
23
23
|
- name: rucio-server
|
24
24
|
version: 35.0.0
|
@@ -30,10 +30,10 @@ dependencies:
|
|
30
30
|
|
31
31
|
- name: cert-generator-grid
|
32
32
|
condition: cert-generator-grid.enabled
|
33
|
-
version: v2.
|
33
|
+
version: v2.1.0
|
34
34
|
repository: oci://harbor.cta-observatory.org/dpps
|
35
35
|
|
36
36
|
- name: fts
|
37
37
|
condition: fts.enabled
|
38
|
-
version: v0.3.
|
38
|
+
version: v0.3.1
|
39
39
|
repository: oci://harbor.cta-observatory.org/dpps
|
@@ -11,5 +11,5 @@ publish:
|
|
11
11
|
reset:
|
12
12
|
helm delete bdms || true
|
13
13
|
kubectl delete secrets bdms-rucio-server bdms-rucio-server-tls bdms-server-cafile bdms-server-hostcert bdms-server-hostkey dppsuser-certkey || true
|
14
|
-
kubectl delete job generate-certificates configure-
|
14
|
+
kubectl delete job generate-certificates configure-rucio test-rucio || true
|
15
15
|
kubectl delete pvc data-bdms-postgresql-0 || true
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# bdms
|
2
2
|
|
3
|
-
    
|
4
4
|
|
5
5
|
A Helm chart for the bdms project
|
6
6
|
|
@@ -14,16 +14,41 @@ A Helm chart for the bdms project
|
|
14
14
|
|
15
15
|
| Repository | Name | Version |
|
16
16
|
|------------|------|---------|
|
17
|
-
| oci://harbor.cta-observatory.org/dpps | cert-generator-grid | v2.
|
18
|
-
| oci://harbor.cta-observatory.org/dpps | fts | v0.3.
|
17
|
+
| oci://harbor.cta-observatory.org/dpps | cert-generator-grid | v2.1.0 |
|
18
|
+
| oci://harbor.cta-observatory.org/dpps | fts | v0.3.1 |
|
19
19
|
| oci://harbor.cta-observatory.org/dpps | rucio-daemons | 35.0.0 |
|
20
20
|
| oci://harbor.cta-observatory.org/dpps | rucio-server | 35.0.0 |
|
21
|
-
| oci://
|
21
|
+
| oci://harbor.cta-observatory.org/proxy_cache/bitnamicharts | postgresql | 15.5.10 |
|
22
22
|
|
23
23
|
## Values
|
24
24
|
|
25
25
|
| Key | Type | Default | Description |
|
26
26
|
|-----|------|---------|-------------|
|
27
|
+
| acada_ingest.daemon.config.check_interval | float | `1` | |
|
28
|
+
| acada_ingest.daemon.config.data_path | string | `"/storage-1/"` | |
|
29
|
+
| acada_ingest.daemon.config.disable_metrics | bool | `false` | |
|
30
|
+
| acada_ingest.daemon.config.lock_file | string | `"/storage-1/bdms_ingest.lock"` | |
|
31
|
+
| acada_ingest.daemon.config.log_file | string | `nil` | The path to the log file, if not specified, logs to stdout |
|
32
|
+
| acada_ingest.daemon.config.log_level | string | `"DEBUG"` | The logging level for the ingestion daemon |
|
33
|
+
| acada_ingest.daemon.config.metrics_port | int | `8000` | The port for the Prometheus metrics server |
|
34
|
+
| acada_ingest.daemon.config.offsite_copies | int | `2` | |
|
35
|
+
| acada_ingest.daemon.config.polling_interval | float | `1` | |
|
36
|
+
| acada_ingest.daemon.config.rse | string | `"STORAGE-1"` | |
|
37
|
+
| acada_ingest.daemon.config.scope | string | `"test_scope_persistent"` | |
|
38
|
+
| acada_ingest.daemon.config.vo | string | `"ctao.dpps.test"` | |
|
39
|
+
| acada_ingest.daemon.config.workers | int | `4` | |
|
40
|
+
| acada_ingest.daemon.replicas | int | `0` | The number of replicas of the ingestion daemon to run, set to 0 to disable the daemon |
|
41
|
+
| acada_ingest.daemon.service.enabled | bool | `true` | |
|
42
|
+
| acada_ingest.daemon.service.type | string | `"ClusterIP"` | |
|
43
|
+
| acada_ingest.image.repository | string | `"harbor.cta-observatory.org/dpps/bdms-ingestion-daemon"` | The container image repository for the ingestion daemon |
|
44
|
+
| acada_ingest.securityContext.fsGroup | int | `0` | |
|
45
|
+
| acada_ingest.securityContext.runAsGroup | int | `0` | |
|
46
|
+
| acada_ingest.securityContext.runAsUser | int | `0` | The security context for the ingestion daemon, it defines the user and group IDs under which the container runs |
|
47
|
+
| acada_ingest.securityContext.supplementalGroups | list | `[]` | |
|
48
|
+
| acada_ingest.volumeMounts[0].mountPath | string | `"/storage-1/"` | |
|
49
|
+
| acada_ingest.volumeMounts[0].name | string | `"storage-1-data"` | |
|
50
|
+
| acada_ingest.volumes[0].name | string | `"storage-1-data"` | |
|
51
|
+
| acada_ingest.volumes[0].persistentVolumeClaim.claimName | string | `"storage-1-pvc"` | |
|
27
52
|
| auth.authRucioHost | string | `"rucio-server.local"` | The hostname of the Rucio authentication server. It is used by clients and services to authenticate with Rucio |
|
28
53
|
| auth.certificate.existingSecret.cert | string | `"tls.crt"` | The key inside the kubernetes secret that stores the TLS certificate |
|
29
54
|
| auth.certificate.existingSecret.enabled | bool | `true` | Use an existing kubernetes (K8s) secret for certificates instead of creating new ones |
|
@@ -33,18 +58,20 @@ A Helm chart for the bdms project
|
|
33
58
|
| auth.certificate.letsencrypt.enabled | bool | `false` | Enables SSL/TLS certificate provisioning using Let's encrypt |
|
34
59
|
| bootstrap.image.repository | string | `"harbor.cta-observatory.org/dpps/bdms-rucio-server"` | The container image for bootstrapping Rucio (initialization, configuration) with the CTAO Rucio policy package installed |
|
35
60
|
| bootstrap.image.tag | string | `"35.7.0-v0.2.0"` | The specific image tag to use for the bootstrap container |
|
61
|
+
| bootstrap.pg_image.repository | string | `"harbor.cta-observatory.org/proxy_cache/postgres"` | Postgres client image used to wait for db readines during bootstrap |
|
62
|
+
| bootstrap.pg_image.tag | string | `"16.3-bookworm"` | Postgres client image tag used to wait for db readines during bootstrap |
|
36
63
|
| cert-generator-grid.enabled | bool | `true` | |
|
37
64
|
| cert-generator-grid.generatePreHooks | bool | `true` | |
|
38
|
-
| configure | object | `{"extra_script":"# add a scope\nrucio-admin scope add --account root --scope root\nrucio add-container /ctao.dpps.test\n","identities":[{"account":"root","email":"dpps-test@cta-observatory.org","id":"CN=DPPS User","type":"X509"}],"rse_distances":[["STORAGE-1","STORAGE-2",1,1],["STORAGE-2","STORAGE-1",1,1],["STORAGE-1","STORAGE-3",1,1],["STORAGE-3","STORAGE-1",1,1],["STORAGE-2","STORAGE-3",1,1],["STORAGE-3","STORAGE-2",1,1]],"rses":{"STORAGE-1":{"attributes":{"ANY":true,"ONSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-1","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"rse_type":"DISK"},"STORAGE-2":{"attributes":{"ANY":true,"OFFSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-2","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"recreate_if_exists":true},"STORAGE-3":{"attributes":{"ANY":true,"OFFSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-3","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"recreate_if_exists":true}}}` | a list of Rucio Storage Elements (RSE) TODO: make more clear mechanism to handle different upgrade scenarios If there is a conflict between existing configuration, the configuration will fail. In this case, likely the configuration should be deleted and re-created. |
|
39
|
-
| configure.extra_script | string | `"# add a scope\nrucio-admin scope add --account root --scope root\nrucio add-container /ctao.dpps.test\n"` | This script is executed after the Rucio server is deployed and configured. It can be used to perform additional configuration or setup tasks if they currently cannot be done with the chart values. |
|
65
|
+
| configure | object | `{"as_hook":false,"extra_script":"# add a scope\nrucio-admin scope add --account root --scope root || echo \"Scope 'root' already exists\"\nrucio add-container /ctao.dpps.test || echo \"Container /ctao.dpps.test already exists\"\n","identities":[{"account":"root","email":"dpps-test@cta-observatory.org","id":"CN=DPPS User","type":"X509"}],"rse_distances":[["STORAGE-1","STORAGE-2",1,1],["STORAGE-2","STORAGE-1",1,1],["STORAGE-1","STORAGE-3",1,1],["STORAGE-3","STORAGE-1",1,1],["STORAGE-2","STORAGE-3",1,1],["STORAGE-3","STORAGE-2",1,1]],"rses":{"STORAGE-1":{"attributes":{"ANY":true,"ONSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-1","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"rse_type":"DISK"},"STORAGE-2":{"attributes":{"ANY":true,"OFFSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-2","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"recreate_if_exists":true},"STORAGE-3":{"attributes":{"ANY":true,"OFFSITE":true,"fts":"https://bdms-fts:8446"},"limits_by_account":{"root":-1},"protocols":[{"domains":{"lan":{"delete":1,"read":1,"write":1},"wan":{"delete":1,"read":1,"third_party_copy_read":1,"third_party_copy_write":1,"write":1}},"extended_attributes":"None","hostname":"rucio-storage-3","impl":"rucio.rse.protocols.gfal.Default","port":1094,"prefix":"//rucio","scheme":"root"}],"recreate_if_exists":true}}}` | a list of Rucio Storage Elements (RSE) TODO: make more clear mechanism to handle different upgrade scenarios If there is a conflict between existing configuration, the configuration will fail. In this case, likely the configuration should be deleted and re-created. |
|
66
|
+
| configure.extra_script | string | `"# add a scope\nrucio-admin scope add --account root --scope root || echo \"Scope 'root' already exists\"\nrucio add-container /ctao.dpps.test || echo \"Container /ctao.dpps.test already exists\"\n"` | This script is executed after the Rucio server is deployed and configured. It can be used to perform additional configuration or setup tasks if they currently cannot be done with the chart values. |
|
40
67
|
| configure.rse_distances | list | `[["STORAGE-1","STORAGE-2",1,1],["STORAGE-2","STORAGE-1",1,1],["STORAGE-1","STORAGE-3",1,1],["STORAGE-3","STORAGE-1",1,1],["STORAGE-2","STORAGE-3",1,1],["STORAGE-3","STORAGE-2",1,1]]` | A list of RSE distance specifications, each a list of 4 values: source RSE, destination RSE, distance (integer), and ranking (integer) |
|
41
|
-
|
|
68
|
+
| configure_rucio | bool | `true` | This will configure the rucio server with the storages |
|
42
69
|
| database | object | `{"default":"postgresql://rucio:XcL0xT9FgFgJEc4i3OcQf2DMVKpjIWDGezqcIPmXlM@bdms-postgresql:5432/rucio"}` | Databases Credentials used by Rucio to access the database. If postgresql subchart is deployed, these credentials should match those in postgresql.global.postgresql.auth. If postgresql subchart is not deployed, an external database must be provided |
|
43
70
|
| database.default | string | `"postgresql://rucio:XcL0xT9FgFgJEc4i3OcQf2DMVKpjIWDGezqcIPmXlM@bdms-postgresql:5432/rucio"` | The Rucio database connection URI |
|
44
71
|
| dev.client_image_tag | string | `nil` | |
|
45
|
-
| dev.mount_repo | bool | `true` |
|
46
|
-
| dev.n_test_jobs | int | `
|
47
|
-
| dev.run_tests | bool | `true` |
|
72
|
+
| dev.mount_repo | bool | `true` | mount the repository into the container, useful for development and debugging |
|
73
|
+
| dev.n_test_jobs | int | `1` | number of jobs to use for pytest |
|
74
|
+
| dev.run_tests | bool | `true` | run tests during helm test (otherwise, the tests can be run manually after exec into the pod) |
|
48
75
|
| dev.sleep | bool | `false` | sleep after test to allow interactive development |
|
49
76
|
| fts.enabled | bool | `true` | Specifies the configuration for FTS test step (FTS server, FTS database, and ActiveMQ broker containers). Enables or disables the deployment of a FTS instance for testing. This is set to 'False' if an external FTS is used |
|
50
77
|
| fts.ftsdb_password | string | `"SDP2RQkbJE2f+ohUb2nUu6Ae10BpQH0VD70CsIQcDtM"` | Defines the password for the FTS database user |
|
@@ -57,10 +84,8 @@ A Helm chart for the bdms project
|
|
57
84
|
| postgresql.global.postgresql.auth.database | string | `"rucio"` | The name of the database to be created and used by Rucio |
|
58
85
|
| postgresql.global.postgresql.auth.password | string | `"XcL0xT9FgFgJEc4i3OcQf2DMVKpjIWDGezqcIPmXlM"` | The password for the database user |
|
59
86
|
| postgresql.global.postgresql.auth.username | string | `"rucio"` | The database username for authentication |
|
87
|
+
| postgresql.image.registry | string | `"harbor.cta-observatory.org/proxy_cache"` | |
|
60
88
|
| prepuller_enabled | bool | `true` | Starts containers with the same image as the one used in the deployment before all volumes are available. Saves time in the first deployment |
|
61
|
-
| rethinkdb.enabled | bool | `false` | |
|
62
|
-
| rethinkdb.storageClassName | string | `nil` | |
|
63
|
-
| rethinkdb.storageSize | string | `"1Gi"` | |
|
64
89
|
| rucio-daemons.config.common.extract_scope | string | `"ctao_bdms"` | |
|
65
90
|
| rucio-daemons.config.database.default | string | `"postgresql://rucio:XcL0xT9FgFgJEc4i3OcQf2DMVKpjIWDGezqcIPmXlM@bdms-postgresql:5432/rucio"` | Specifies the connection URI for the Rucio database, these settings will be written to 'rucio.cfg' |
|
66
91
|
| rucio-daemons.config.messaging-fts3.brokers | string | `"fts-activemq"` | Specifies the message broker used for FTS messaging |
|
@@ -137,7 +162,8 @@ A Helm chart for the bdms project
|
|
137
162
|
| rucio_db.existingSecret.enabled | bool | `false` | If true, the database connection URI is obtained from a kubernetes secret in |
|
138
163
|
| rucio_db.existingSecret.key | string | `"connection"` | The key inside the kubernetes secret that holds the database connection URI |
|
139
164
|
| rucio_db.existingSecret.secretName | string | `"rucio-db"` | The name of the kubernetes secret storing the database connection URI. Its in use only if 'existingSecret.enabled: true' |
|
140
|
-
| safe_to_bootstrap_rucio | bool | `
|
165
|
+
| safe_to_bootstrap_rucio | bool | `false` | This is a destructive operation, it will delete all data in the database |
|
166
|
+
| safe_to_bootstrap_rucio_on_install | bool | `true` | This is will delete all data in the database only on the first install |
|
141
167
|
| server.certificate.existingSecret.cert | string | `"tls.crt"` | The key inside the kubernetes secret that stores the TLS certificate |
|
142
168
|
| server.certificate.existingSecret.enabled | bool | `true` | Use an existing kubernetes (K8s) secret for certificates instead of creating new ones |
|
143
169
|
| server.certificate.existingSecret.key | string | `"tls.key"` | The key inside the kubernetes secret that stores the private key |
|
@@ -1,23 +1,32 @@
|
|
1
1
|
|
2
|
-
{{ if .Values.
|
2
|
+
{{ if .Values.configure_rucio | default false }}
|
3
3
|
---
|
4
4
|
apiVersion: batch/v1
|
5
5
|
kind: Job
|
6
6
|
metadata:
|
7
|
-
name: {{ template "bdms.fullname" . }}-
|
7
|
+
name: {{ template "bdms.fullname" . }}-configure-rucio-{{ .Release.Revision }}
|
8
|
+
{{- if .Values.configure.as_hook }}
|
8
9
|
annotations:
|
9
10
|
"helm.sh/hook": post-install,post-upgrade
|
10
|
-
"helm.sh/hook-weight": "-
|
11
|
+
"helm.sh/hook-weight": "-5"
|
11
12
|
"helm.sh/hook-delete-policy": before-hook-creation
|
13
|
+
{{- end }}
|
12
14
|
spec:
|
13
15
|
backoffLimit: 0
|
14
16
|
template:
|
15
17
|
spec:
|
16
18
|
volumes:
|
17
19
|
{{ include "volumes_cert" . | indent 8 }}
|
20
|
+
resources:
|
21
|
+
requests:
|
22
|
+
memory: "2Gi"
|
23
|
+
cpu: "500m"
|
24
|
+
limits:
|
25
|
+
memory: "8Gi"
|
26
|
+
cpu: "2000m"
|
18
27
|
initContainers:
|
19
28
|
- name: test-connection
|
20
|
-
image:
|
29
|
+
image: {{ .Values.bootstrap.pg_image.repository }}:{{ .Values.bootstrap.pg_image.tag }}
|
21
30
|
command:
|
22
31
|
- /bin/sh
|
23
32
|
- -c
|
@@ -39,92 +48,52 @@ spec:
|
|
39
48
|
secretKeyRef:
|
40
49
|
name: {{ .Release.Name }}-postgresql
|
41
50
|
key: postgres-password
|
42
|
-
|
43
51
|
containers:
|
44
|
-
- name:
|
52
|
+
- name: configure-rucio
|
45
53
|
image: {{ .Values.bootstrap.image.repository }}:{{ .Values.bootstrap.image.tag }}
|
54
|
+
securityContext:
|
55
|
+
runAsUser: 0
|
56
|
+
env:
|
57
|
+
{{ include "env_helm_release" . | indent 8 }}
|
46
58
|
command:
|
47
59
|
- /bin/sh
|
48
60
|
- -c
|
49
61
|
- |
|
50
|
-
set -
|
62
|
+
set -eux -o pipefail
|
51
63
|
|
52
64
|
{{ .Files.Get "scripts/certificates/install_ca.sh" | indent 10 }}
|
65
|
+
|
66
|
+
WAIT_RUCIO_PING=
|
53
67
|
{{ .Files.Get "scripts/bootstrap_rucio/wait_for_rucio.sh" | indent 10 }}
|
54
68
|
|
69
|
+
{{ if or (.Values.safe_to_bootstrap_rucio | default false) (and (.Values.safe_to_bootstrap_rucio_on_install | default false) .Release.IsInstall) }}
|
55
70
|
echo "Running reset database script..."
|
56
71
|
|
57
72
|
python3 /usr/local/rucio/tools/reset_database.py
|
58
73
|
|
74
|
+
{{ if .Release.IsUpgrade }}
|
75
|
+
# bootstrapping the DB while the rucio server is running causes temporarily inconsistent state of the server
|
76
|
+
# so we need to restart the server after the bootstrap
|
59
77
|
curl -LO https://dl.k8s.io/release/v1.33.0/bin/linux/amd64/kubectl -o ./kubectl
|
60
78
|
chmod +x ./kubectl
|
61
79
|
|
62
80
|
# could be also in post-upgrade hook but only if bootstrap was performed
|
63
81
|
./kubectl rollout restart deployment {{ .Release.Name }}-rucio-server
|
82
|
+
{{ end }}
|
64
83
|
|
65
|
-
|
66
|
-
{{ include "volume_mounts_rucio_config" . | indent 8 }}
|
67
|
-
{{ include "volume_mounts_cert" . | indent 8 }}
|
68
|
-
env:
|
69
|
-
{{ include "env_helm_release" . | indent 8 }}
|
70
|
-
- name: POSTGRES_PASSWORD
|
71
|
-
valueFrom:
|
72
|
-
secretKeyRef:
|
73
|
-
name: {{ .Release.Name }}-postgresql
|
74
|
-
key: postgres-password
|
75
|
-
restartPolicy: OnFailure
|
76
|
-
{{ end }}
|
77
|
-
{{ if .Values.configure_test_setup | default false }}
|
78
|
-
---
|
79
|
-
apiVersion: batch/v1
|
80
|
-
kind: Job
|
81
|
-
metadata:
|
82
|
-
name: {{ template "bdms.fullname" . }}-configure-test-rucio
|
83
|
-
annotations:
|
84
|
-
"helm.sh/hook": post-install,post-upgrade
|
85
|
-
"helm.sh/hook-weight": "-5"
|
86
|
-
"helm.sh/hook-delete-policy": before-hook-creation
|
87
|
-
spec:
|
88
|
-
backoffLimit: 0
|
89
|
-
template:
|
90
|
-
spec:
|
91
|
-
volumes:
|
92
|
-
{{ include "volumes_cert" . | indent 8 }}
|
93
|
-
resources:
|
94
|
-
requests:
|
95
|
-
memory: "2Gi"
|
96
|
-
cpu: "500m"
|
97
|
-
limits:
|
98
|
-
memory: "8Gi"
|
99
|
-
cpu: "2000m"
|
100
|
-
containers:
|
101
|
-
- name: configure-test-rucio
|
102
|
-
image: {{ .Values.bootstrap.image.repository }}:{{ .Values.bootstrap.image.tag }}
|
103
|
-
securityContext:
|
104
|
-
runAsUser: 0
|
105
|
-
env:
|
106
|
-
{{ include "env_helm_release" . | indent 8 }}
|
107
|
-
command:
|
108
|
-
- /bin/sh
|
109
|
-
- -c
|
110
|
-
- |
|
111
|
-
set -ex
|
84
|
+
{{ end }}
|
112
85
|
|
113
86
|
# TODO: make or find an image?
|
114
87
|
dnf install -y voms-clients
|
115
88
|
|
116
|
-
|
89
|
+
voms-proxy-init -valid 9999:00 -cert /opt/rucio/etc/usercert.pem -key /opt/rucio/etc/userkey.pem -out /tmp/x509up
|
90
|
+
cp -fv /tmp/x509up /tmp/x509up_u$(id -u)
|
117
91
|
|
118
92
|
WAIT_RUCIO_PING=1
|
119
93
|
{{ .Files.Get "scripts/bootstrap_rucio/wait_for_rucio.sh" | indent 10 }}
|
120
94
|
|
121
95
|
echo "Configuring test rucio setup ..."
|
122
96
|
|
123
|
-
set -eux -o pipefail
|
124
|
-
|
125
|
-
voms-proxy-init -valid 9999:00 -cert /opt/rucio/etc/usercert.pem -key /opt/rucio/etc/userkey.pem -out /tmp/x509up
|
126
|
-
cp -fv /tmp/x509up /tmp/x509up_u$(id -u)
|
127
|
-
|
128
97
|
echo "Configuring identities ..."
|
129
98
|
{{ range .Values.configure.identities -}}
|
130
99
|
rucio-admin -v identity add
|
@@ -135,39 +104,35 @@ spec:
|
|
135
104
|
|
136
105
|
echo "Configuring RSE {{ $rse_name }} ..."
|
137
106
|
|
138
|
-
rucio-admin -v rse add "{{ $rse_name }}"
|
139
|
-
|
140
|
-
# TODO: there is a strange race condition here, where the rse is not yet available
|
141
|
-
# in some sequences it does not happen, depending on the order of the rse creation
|
142
|
-
# this time it started to happen after FTS container was separated?
|
143
|
-
while true; do
|
144
|
-
rucio-admin -v rse info "{{ $rse_name }}" && break
|
145
|
-
sleep 3
|
146
|
-
done
|
107
|
+
if rucio-admin -v rse add "{{ $rse_name }}"; then
|
108
|
+
echo "RSE {{ $rse_name }} created"
|
147
109
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
110
|
+
{{- range $rse_spec.protocols }}
|
111
|
+
rucio-admin -v rse add-protocol \
|
112
|
+
--hostname "{{ .hostname }}" \
|
113
|
+
--scheme {{ .scheme }} \
|
114
|
+
--prefix {{ .prefix }} \
|
115
|
+
--port {{ .port }} \
|
116
|
+
--impl {{ .impl | default "rucio.rse.protocols.gfal.Default" }} \
|
117
|
+
--domain-json '{{ .domains | toJson }}' \
|
118
|
+
"{{ $rse_name }}"
|
119
|
+
{{- end }}
|
158
120
|
|
159
|
-
|
160
|
-
|
161
|
-
|
121
|
+
{{- range $k, $v := $rse_spec.attributes }}
|
122
|
+
rucio-admin rse set-attribute --rse "{{ $rse_name }}" --key "{{ $k }}" --value "{{ $v }}"
|
123
|
+
{{- end }}
|
162
124
|
|
163
125
|
|
164
|
-
|
165
|
-
|
166
|
-
|
126
|
+
{{ range $account, $limit := $rse_spec.limits_by_account }}
|
127
|
+
rucio-admin account set-limits {{ $account }} "{{ $rse_name }}" {{ $limit }}
|
128
|
+
{{ end }}
|
167
129
|
|
168
|
-
|
169
|
-
|
130
|
+
echo "Configuring RSE {{ $rse_name }} done"
|
131
|
+
rucio-admin rse info "{{ $rse_name }}"
|
170
132
|
|
133
|
+
else
|
134
|
+
echo "RSE {{ $rse_name }} already exists, skipping creation and protocols configuration"
|
135
|
+
fi
|
171
136
|
{{- end }}
|
172
137
|
|
173
138
|
{{- range $distance_tuple := .Values.configure.rse_distances }}
|
@@ -176,7 +141,7 @@ spec:
|
|
176
141
|
"{{ index $distance_tuple 0 }}" \
|
177
142
|
"{{ index $distance_tuple 1 }}" \
|
178
143
|
--distance {{ index $distance_tuple 2 }} \
|
179
|
-
--ranking {{ index $distance_tuple 3 }}
|
144
|
+
--ranking {{ index $distance_tuple 3 }} || echo "RSE distance {{ $distance_tuple }} already exists"
|
180
145
|
{{- end }}
|
181
146
|
|
182
147
|
{{- .Values.configure.extra_script | nindent 10 }}
|
@@ -193,6 +158,11 @@ spec:
|
|
193
158
|
runAsUser: 0
|
194
159
|
env:
|
195
160
|
{{ include "env_helm_release" . | indent 8 }}
|
161
|
+
- name: POSTGRES_PASSWORD
|
162
|
+
valueFrom:
|
163
|
+
secretKeyRef:
|
164
|
+
name: {{ .Release.Name }}-postgresql
|
165
|
+
key: postgres-password
|
196
166
|
command:
|
197
167
|
- /bin/sh
|
198
168
|
- -c
|
@@ -230,6 +200,8 @@ spec:
|
|
230
200
|
{{ include "volume_mounts_rucio_config" . | indent 8 }}
|
231
201
|
{{ include "volume_mounts_cert" . | indent 8 }}
|
232
202
|
|
203
|
+
|
204
|
+
# rucio server might restart during initialization for various reasons
|
233
205
|
restartPolicy: Never
|
234
206
|
|
235
207
|
{{ end }}
|