Skip to content

Commit

Permalink
add CVMFS deployment and add the volume to the jhub release
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Jul 26, 2024
1 parent 651fed6 commit 3d509be
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 10 deletions.
10 changes: 10 additions & 0 deletions infrastructure/cluster/flux/cvmfs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CVMFS
## CVMFS on the VRE

CERN OpenStack k8s cluster v1.29.2 is deployed with a `cvmfs StorageClass` provisioned by `cvmfs.csi.cern.ch` and the CVMFS CSI (Container Storage Interface) plugin [link to github repository](https://github.com/cvmfs-contrib/cvmfs-csi). Version `cvmfs-csi-v2.3.2` of the CVMFS charts is installed.

To provision a cvmfs volume within any jupyterhub pod:
* Create a `pvc` making use of the cvms `StorageClass`
* Add an `extraVolumes` and an `extraVolumeMounts` in the [JupyterHub release manifest](../jhub/jhub-release.yaml).

The manifests in this directory will also deploy a pod (`cvmfs-client`) to access cvmfs from the cluster.
20 changes: 20 additions & 0 deletions infrastructure/cluster/flux/cvmfs/cvmfs-client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Pod
metadata:
name: cvmfs-client
namespace: jhub
spec:
containers:
- name: idle
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-vre-pvc
32 changes: 32 additions & 0 deletions infrastructure/cluster/flux/cvmfs/cvmfs-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Based on docs and snippets from https://github.com/cvmfs-contrib/cvmfs-csi

# Create StorageClass for provisioning CVMFS automount volumes,
# and a PersistentVolumeClaim that's fulfilled by the StorageClass.

# If Controller plugin is not deployed, follow the example in volume-pv-pvc.yaml.

# Notes for the VRE cluster.
# StorageClass is not needed because is already deployed when starting the cluster.
# Othersiwe, have a look to the documentation on the link above
# ---
# apiVersion: storage.k8s.io/v1
# kind: StorageClass
# metadata:
# name: cvmfs
# provisioner: cvmfs.csi.cern.ch
# ---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cvmfs-vre-pvc
namespace: jhub
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
19 changes: 9 additions & 10 deletions infrastructure/cluster/flux/jhub/jhub-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ spec:
- kind: ConfigMap
name: jhub-profiles
valuesKey: values.yaml
#targetPath: singleuser.profileList

values:
proxy:
Expand Down Expand Up @@ -147,18 +146,18 @@ spec:
type: static
static:
pvcName: jhub-vre-singleuser-preprovisioned-manila-pvc # manually added an existing share (refer to jhub-storage.yaml)
# extraVolumes:
# - name: cvmfs-cern-instance
# persistentVolumeClaim:
# claimName: cvmfs
extraVolumes:
- name: cvmfs-vre
persistentVolumeClaim:
claimName: cvmfs-vre-pvc
# - name: eulake-cern-eos-rse # mounts the EOS RSE needed for the Rucio JupiterLab extension
# hostPath:
# path: /var/eos/eulake # This is pointing to /eos/eulake/escape/data, defined on the eosxd/configmap
# extraVolumeMounts:
# - name: cvmfs-cern-instance
# mountPath: /cvmfs
# # CVMFS automount volumes must be mounted with HostToContainer mount propagation.
# mountPropagation: HostToContainer
extraVolumeMounts:
- name: cvmfs-vre
mountPath: /cvmfs
# CVMFS automount volumes must be mounted with HostToContainer mount propagation.
mountPropagation: HostToContainer
# - name: eulake-cern-eos-rse # mounts the EOS RSE needed for the Rucio JupiterLab extension
# mountPath: /eos/cern-eos-rse
# mountPropagation: HostToContainer
Expand Down

0 comments on commit 3d509be

Please sign in to comment.