forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add rucio to the integration_tests.py
- Loading branch information
Showing
3 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Should be called with PGPASSWORD=mysecretpassword | ||
|
||
#!/bin/bash | ||
dbMissing=true; | ||
allDBs=(rucio) | ||
while ${dbMissing}; | ||
do | ||
dbMissing=false; | ||
allExistingDBs=$(psql -U postgres -h rucio-db -p 5432 -c "\l"); | ||
for db in "${allDBs[@]}"; | ||
do | ||
if grep -q "${db}" <<< "${allExistingDBs}"; | ||
then | ||
echo "${db} OK"; | ||
else | ||
echo "${db} not created"; | ||
dbMissing=true; | ||
fi; | ||
done; | ||
if ${dbMissing}; | ||
then | ||
sleep 1; | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,90 @@ volumes: | |
diracx-key-store: | ||
# Volume used to store the jwks of the IAM service | ||
diracx-iam-key-store: | ||
# Volume used to store the rucio config | ||
rucio-server-config: | ||
|
||
services: | ||
rucio-db: | ||
hostname: rucio-db | ||
image: "postgres:15" | ||
environment: | ||
POSTGRES_USER: rucio | ||
POSTGRES_DB: rucio | ||
POSTGRES_PASSWORD: secret | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] | ||
timeout: 10s | ||
start_period: 30s | ||
pull_policy: always | ||
|
||
rucio-wait-for-db: | ||
image: "postgres:15" | ||
container_name: rucio-wait-for-db | ||
environment: | ||
POSTGRES_USER: rucio | ||
POSTGRES_DB: rucio | ||
PGPASSWORD: secret | ||
depends_on: | ||
rucio-db: | ||
condition: service_healthy | ||
command: /home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC/tests/CI/check_rucio_db_initialized.sh | ||
pull_policy: always | ||
|
||
rucio-init: | ||
profiles: | ||
- init | ||
image: rucio/rucio-init:release-36.1.0 | ||
environment: | ||
RUCIO_CFG_DATABASE_DEFAULT: "postgresql://rucio:secret@rucio-db/rucio" | ||
RUCIO_CFG_BOOTSTRAP_USERPASS_IDENTITY: "test-user" | ||
RUCIO_CFG_BOOTSTRAP_USERPASS_PWD: "secret" | ||
RUCIO_CFG_BOOTSTRAP_X509_IDENTITY: "CN=Test User" | ||
RUCIO_CFG_BOOTSTRAP_X509_EMAIL: "[email protected]" | ||
RUCIO_CFG_POLICY_PACKAGE: "dirac_rucio_policy" | ||
RUCIO_CFG_COMMON_EXTRACT_SCOPE: "dirac" | ||
RUCIO_CFG_POLICY_LFN2PFN_ALGORITHM_DEFAULT: "dirac" | ||
PYTHONPATH: /opt/rucio | ||
depends_on: | ||
rucio-db: | ||
condition: service_healthy | ||
volumes: | ||
- rucio-server-config:/opt/rucio/etc/ | ||
- ./rucio_policy:/opt/rucio/dirac_rucio_policy | ||
|
||
rucio-server: | ||
hostname: rucio-server | ||
image: rucio/rucio-server:release-36.1.0 | ||
environment: | ||
RUCIO_ENABLE_SSL: "True" | ||
RUCIO_HTTPD_ENCODED_SLASHES: "True" | ||
RUCIO_HTTPD_GRID_SITE_ENABLED: "True" | ||
depends_on: | ||
rucio-db: | ||
condition: service_healthy | ||
rucio-storage-1: | ||
condition: service_started | ||
volumes: | ||
- rucio-server-config:/opt/rucio/etc/ | ||
- ./certs/hostcert_rucio-server.pem:/etc/grid-security/hostcert.pem:z | ||
- ./certs/hostcert_rucio-server.key.pem:/etc/grid-security/hostkey.pem:z | ||
- ./certs/test_ca.pem:/etc/grid-security/ca.pem:z | ||
- ${RUCIO_REPOSITORY:-/dev/null}:/src/rucio | ||
|
||
rucio-storage-1: | ||
hostname: rucio-storage-1 | ||
image: rucio/xrootd | ||
environment: | ||
XRDPORT: "1094" | ||
volumes: | ||
- ./certs/test_ca.pem:/etc/grid-security/certificates/37cc428d.0 | ||
- ./certs/hostcert_rucio-storage-1.pem:/tmp/xrdcert.pem:z | ||
- ./certs/hostcert_rucio-storage-1.key.pem:/tmp/xrdkey.pem:z | ||
ulimits: | ||
nofile: | ||
soft: 1024 | ||
hard: 2048 | ||
|
||
mysql: | ||
image: ${MYSQL_VER} | ||
container_name: mysql | ||
|