Skip to content

Commit

Permalink
ci: add xroot based tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kofemann committed Aug 24, 2023
1 parent 7b4d639 commit b5e8dd5
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 17 deletions.
38 changes: 38 additions & 0 deletions .ci/init-grid-ui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

# fail on error
set -e

AUTOCA_URL=https://ci.dcache.org/ca

yum -q install -y openssl libtool-ltdl glibmm24 libxslt epel-release
yum -q install -y fetch-crl

rpm -i https://www.desy.de/~tigran/ca_dCacheORG-3.0-6.noarch.rpm
rpm -i https://linuxsoft.cern.ch/wlcg/centos7/x86_64/desy-voms-all-1.0.0-1.noarch.rpm

rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_USERTrustRSACertificationAuthority-1.122-1.noarch.rpm
rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_ResearchandEducationTrustRSARootCA-1.122-1.noarch.rpm
rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_GEANTeScienceSSLCA4-1.122-1.noarch.rpm
rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_USERTrustECCCertificationAuthority-1.122-1.noarch.rpm
rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_GEANTeScienceSSLECCCA4-1.122-1.noarch.rpm
rpm -i https://repository.egi.eu/sw/production/cas/1/current/RPMS/ca_GEANTTCSAuthenticationRSACA4B-1.122-1.noarch.rpm


curl --silent https://raw.githubusercontent.com/kofemann/autoca/v1.0-py2/pyclient/autoca-client -o autoca-client && chmod a+x autoca-client
./autoca-client -n -k userkey.pem -c usercert.pem https://ci.dcache.org/ca "Kermit the frog"

. /cvmfs/grid.cern.ch/centos7-umd4-ui-4_200423/etc/profile.d/setup-c7-ui-example.sh
export LD_LIBRARY_PATH=/cvmfs/grid.cern.ch/centos7-umd4-ui-4_200423/usr/lib64/dcap:$LD_LIBRARY_PATH

# Since we rely on our dCache.org CA, which is not present
# in CVMFS, we need to manually alter X509_CERT_DIR to
# a local path that contains the CACerts from CVMFS and
# additionally the dCache.org CACerts
export X509_CERT_DIR=/etc/grid-security/certificates
export X509_VOMS_DIR=/etc/grid-security/vomsdir/

/usr/sbin/fetch-crl

arcproxy -C usercert.pem -K userkey.pem -T ${X509_CERT_DIR} --vomses=${VOMS_USERCONF} --vomsdir=${X509_VOMS_DIR} --voms=desy
arcproxy -I
14 changes: 1 addition & 13 deletions .ci/run-grid-tests.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#!/bin/sh

AUTOCA_URL=https://ci.dcache.org/ca

yum -q install -y openssl libtool-ltdl glibmm24
rpm -i https://www.desy.de/~tigran/ca_dCacheORG-3.0-6.noarch.rpm
rpm -i https://linuxsoft.cern.ch/wlcg/centos7/x86_64/desy-voms-all-1.0.0-1.noarch.rpm

curl --silent https://raw.githubusercontent.com/kofemann/autoca/v1.0-py2/pyclient/autoca-client -o autoca-client && chmod a+x autoca-client
./autoca-client -n -k userkey.pem -c usercert.pem https://ci.dcache.org/ca "Kermit the frog"

. /cvmfs/grid.cern.ch/umd-c7wn-latest/etc/profile.d/setup-c7-wn-example.sh

arcproxy -C usercert.pem -K userkey.pem -T ${X509_CERT_DIR} --vomses=${VOMS_USERCONF} --vomsdir=/etc/grid-security/vomsdir/ --voms=desy
arcproxy -I
. /init-grid-ui.sh

11 changes: 11 additions & 0 deletions .ci/run-xroot-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

. /init-grid-ui.sh

xrdcp -f /etc/profile xroot://store-door-svc:1095//data/testfile

for i in `seq 1 1000`
do
echo "File Nr. $i"
xrdcp -f xroot://store-door-svc:1095//data/testfile /dev/null
done
21 changes: 21 additions & 0 deletions .ci/wn-with-cvmfs-xroot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: xroot-tester
spec:
containers:
- name: tester
image: centos:7
imagePullPolicy: IfNotPresent
command: [ "/bin/sleep", "inf"]
volumeMounts:
- name: cvmfs
mountPath: /cvmfs
# CVMFS automount volumes must be mounted with HostToContainer mount propagation.
mountPropagation: HostToContainer
volumes:
- name: cvmfs
persistentVolumeClaim:
claimName: cvmfs


19 changes: 15 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,26 @@ deploy_dcache_helm:
grid_tests:
stage: testing
extends: .kubernetes_image
allow_failure: true
script:
- kubectl -n $K8S_NAMESPACE create -f .ci/cvmfs-volume-storageclass-pvc.yaml
- kubectl -n $K8S_NAMESPACE create -f .ci/wn-with-cvmfs.yaml
- kubectl -n $K8S_NAMESPACE apply -f .ci/cvmfs-volume-storageclass-pvc.yaml
- kubectl -n $K8S_NAMESPACE apply -f .ci/wn-with-cvmfs.yaml
- while ! kubectl -n $K8S_NAMESPACE wait --for=condition=Ready pod grid-tester; do sleep 1; done
- kubectl -n $K8S_NAMESPACE exec grid-tester -- ls /cvmfs/grid.cern.ch/umd-c7wn-latest/etc/profile.d/setup-c7-wn-example.sh
- kubectl -n $K8S_NAMESPACE cp .ci/run-grid-tests.sh grid-tester:/run-grid-tests.sh
- kubectl -n $K8S_NAMESPACE cp .ci/init-grid-ui.sh grid-tester:/init-grid-ui.sh
- kubectl -n $K8S_NAMESPACE cp .ci/run-grid-tests.sh grid-tester:/run-grid-tests.sh
- kubectl -n $K8S_NAMESPACE exec grid-tester -- /bin/sh /run-grid-tests.sh

gsi_xroot_tests:
stage: testing
extends: .kubernetes_image
script:
- kubectl -n $K8S_NAMESPACE apply -f .ci/cvmfs-volume-storageclass-pvc.yaml
- kubectl -n $K8S_NAMESPACE apply -f .ci/wn-with-cvmfs-xroot.yaml
- while ! kubectl -n $K8S_NAMESPACE wait --for=condition=Ready pod xroot-tester; do sleep 1; done
- kubectl -n $K8S_NAMESPACE exec xroot-tester -- ls /cvmfs/grid.cern.ch/umd-c7wn-latest/etc/profile.d/setup-c7-wn-example.sh
- kubectl -n $K8S_NAMESPACE cp .ci/init-grid-ui.sh xroot-tester:/init-grid-ui.sh
- kubectl -n $K8S_NAMESPACE cp .ci/run-xroot-tests.sh xroot-tester:/run-xroot-tests.sh
- kubectl -n $K8S_NAMESPACE exec xroot-tester -- /bin/sh /run-xroot-tests.sh

pynfs_tests:
stage: testing
Expand Down

0 comments on commit b5e8dd5

Please sign in to comment.