Skip to content

Commit

Permalink
New compose file suitable to develop VOMS
Browse files Browse the repository at this point in the history
The idea is to have a service for each platform, client and server,
which mounts the source read-only. The build can then be done
off-source and installed locally.
  • Loading branch information
giacomini committed Apr 12, 2024
1 parent 991251a commit 94cedc2
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 16 deletions.
16 changes: 16 additions & 0 deletions compose/assets/dev-scripts/prepare-dev-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ -z "${VOMS_SRC}" ]; then
echo "Set the VOMS_SRC environment variable to point to the VOMS sources. Exiting..."
exit 1
fi

docker compose -f compose/docker-compose.dev.yml up -d

uid=$(id -u)
gid=$(id -g)

for service in testsuite voms-7-stable voms-7-beta voms-9-beta; do
docker compose -f compose/docker-compose.dev.yml exec $service sudo groupmod -g ${gid} test
docker compose -f compose/docker-compose.dev.yml exec $service sudo usermod -u ${uid} test
done
109 changes: 93 additions & 16 deletions compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,108 @@
version: '3.5'

volumes:
vscode-server:
dotlocal:
trustanchors:
cabundle:
voms-src:
driver: local
driver_opts:
o: bind
type: none
device: ${VOMS_SRC}

services:
testsuite-init:
image: italiangrid/voms-testsuite-centos7

db:
image: mariadb:10.11.2
init: true

volumes:
- ./assets/db:/home/mysql/
- ./assets/scripts:/scripts/

environment:
- MYSQL_ROOT_PASSWORD=pwd
- MYSQL_USER=user
- MYSQL_PASSWORD=pwd

voms-7-stable:
image: italiangrid/voms:centos7-stable
init: true

environment:
- TZ=Europe/Rome

volumes:
- ./assets/scripts:/scripts
- ./assets/vomsdir/:/etc/grid-security/vomsdir
- ./assets/conf/vo0.conf:/etc/voms/vo.0/voms.conf
- ./assets/conf/vo1.conf:/etc/voms/vo.1/voms.conf
- voms-src:/voms-src:ro

command: ["sleep", "infinity"]

privileged: true

networks:
default:
aliases:
- voms-7-stable.test.example

voms-7-beta:
image: italiangrid/voms:centos7-beta
init: true

environment:
- TZ=Europe/Rome

volumes:
- vscode-server:/home/test/.vscode-server
- dotlocal:/home/test/.local
command: sudo chown -R test:test /home/test/.vscode-server /home/test/.local
- ./assets/scripts:/scripts
- ./assets/vomsdir/:/etc/grid-security/vomsdir
- ./assets/conf/vo0.conf:/etc/voms/vo.0/voms.conf
- ./assets/conf/vo1.conf:/etc/voms/vo.1/voms.conf
- voms-src:/voms-src:ro

command: ["sleep", "infinity"]

privileged: true

networks:
default:
aliases:
- voms-7-beta.test.example

voms-9-beta:
image: italiangrid/voms:centos9-beta
init: true

environment:
- TZ=Europe/Rome

volumes:
- ..:/voms-testsuite
- ./assets/scripts:/scripts
- ./assets/vomsdir/:/etc/grid-security/vomsdir
- ./assets/conf/vo0.conf:/etc/voms/vo.0/voms.conf
- ./assets/conf/vo1.conf:/etc/voms/vo.1/voms.conf
- voms-src:/voms-src:ro

command: ["sleep", "infinity"]

privileged: true

networks:
default:
aliases:
- voms-9-beta.test.example

testsuite:
image: italiangrid/voms-testsuite-centos7

depends_on:
- testsuite-init
init: true

environment:
- TZ=Europe/Rome
- X509_USER_PROXY=/tmp/x509up_u501

volumes:
- vscode-server:/home/test/.vscode-server
- dotlocal:/home/test/.local
- ..:/home/test/voms-testsuite:cached
- ..:/voms-testsuite
- voms-src:/voms-src:ro
- ./assets/vomses:/etc/vomses
- ./assets/vomsdir:/etc/grid-security/vomsdir

Expand Down

0 comments on commit 94cedc2

Please sign in to comment.