Skip to content

Commit

Permalink
ci: deply test WN with shared cvmfs
Browse files Browse the repository at this point in the history
  • Loading branch information
kofemann committed Aug 11, 2023
1 parent 801358f commit f9622f2
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .ci/cvmfs-storageclass.yaml
@@ -0,0 +1,5 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cvmfs
provisioner: cvmfs.csi.cern.ch
16 changes: 16 additions & 0 deletions .ci/cvmfs-volume-storageclass-pvc.yaml
@@ -0,0 +1,16 @@

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cvmfs
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
# Volume size value has no effect and is ignored
# by the driver, but must be non-zero.
storage: 1
storageClassName: cvmfs


15 changes: 15 additions & 0 deletions .ci/values-cvmfs.yaml
@@ -0,0 +1,15 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# Extra ConfigMaps to create and manage by the chart release.
# These can be used e.g. when defining CVMFS client configuration.
# ConfigMap data supports go-template expressions.
extraConfigMaps:
# /etc/cvmfs/config.d/
cvmfs-csi-config-d: {}
# /etc/cvmfs/default.local
cvmfs-csi-default-local:
default.local: |
CVMFS_USE_GEOAPI=yes
CVMFS_HTTP_PROXY="http://grid-squid01.desy.de:3128;http://grid-squid02.desy.de:3128;http://grid-squid03.desy.de:3128;http://grid-squid04.desy.de:3128;http://grid-squid05.desy.de:3128;http://grid-squid06.desy.de:3128;DIRECT"
21 changes: 21 additions & 0 deletions .ci/wn-with-cvmfs.yaml
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
name: cvmfs-demo
spec:
containers:
- name: demo
image: busybox
imagePullPolicy: IfNotPresent
command: [ "/bin/sh", "-c", "trap : TERM INT; (while true; do sleep 1000; done) & wait" ]
volumeMounts:
- name: cvmfs
mountPath: /cvmfs
# CVMFS automount volumes must be mounted with HostToContainer mount propagation.
mountPropagation: HostToContainer
volumes:
- name: cvmfs
persistentVolumeClaim:
claimName: cvmfs


26 changes: 26 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -317,6 +317,32 @@ deploy_dcache_helm:
- helm repo update
- helm -n ${K8S_NAMESPACE} install --wait --set image.tag=${tag} --set image.repository=gitlab.desy.de:5555/dcache/dcache store dcache/dcache


#
# Grid tests expects cluster-wide cvmfs volumes to be present.
#
# The deployment can be done as:
#
# kubectl create -f ./ci/cvmfs-storageclass.yaml
# helm repo add cern https://registry.cern.ch/chartrepo/cern
# helm repo update
# helm -n dcache-dev-infrastructure install -f .ci/values-cvmfs.yaml cvmfs cern/cvmfs-csi
#
# More info: https://github.com/cvmfs-contrib/cvmfs-csi/tree/master/docs
#
grid_tests:
stage: testing
image: bitnami/kubectl:latest
allow_failure: true
tags:
- kubernetes
- dcache-dev
script:
- kubectl -n $K8S_NAMESPACE create -f .ci/cvmfs-volume-storageclass-pvc.yaml
- kubectl -n $K8S_NAMESPACE create -f .ci/wn-with-cvmfs.yaml
- while ! kubectl -n $K8S_NAMESPACE wait --for=condition=Ready pod cvmfs-demo; do sleep 1; done
- kubectl -n $K8S_NAMESPACE exec cvmfs-demo -- ls /cvmfs/grid.cern.ch/

pynfs_tests:
stage: testing
image: bitnami/kubectl:latest
Expand Down

0 comments on commit f9622f2

Please sign in to comment.