Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change EOS chart used by SWAN #210

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions swan-cern/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ swan:
source /cvmfs/sft.cern.ch/lcg/views/{{ .Values.global.cuda.lcg }}/{{ .Values.global.cuda.platform }}/setup.sh &&
(timeout 20s python3 -c 'import tensorflow' || true) &&
(timeout 20s python3 -c 'import torch' || true)

eos:
deployDaemonSet: &eosDeployDS false
deployCsiDriver: &eosDeployCSI true
useCsiDriver: &eosUseCSI true
eosxd:
resources:
requests:
memory: 1.5G
jupyterhub:
singleuser:
cpu:
Expand Down Expand Up @@ -187,10 +178,6 @@ swan:
timeout: 14400
checkEosAuth: true
hooksDir: /srv/jupyterhub/culler
eos:
deployDaemonSet: *eosDeployDS
deployCsiDriver: *eosDeployCSI
useCsiDriver: *eosUseCSI
spark:
configurationPath: /cvmfs/sft.cern.ch/lcg/etc/hadoop-confext
swanCern:
Expand Down
15 changes: 5 additions & 10 deletions swan/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ dependencies:
- name: jupyterhub
version: 3.1.0
repository: https://jupyterhub.github.io/helm-chart/

- name: fusex
version: 0.1.3
repository: https://registry.cern.ch/chartrepo/eos
condition: eos.deployDaemonSet
- name: eosxd
version: 5.1.27-1
repository: http://registry.cern.ch/chartrepo/cern
condition: eos.deployCsiDriver
- name: eosxd-csi
version: 1.4.2
repository: oci://registry.cern.ch/kubernetes/charts
condition: eosxd-csi.enabled
- name: cvmfs-csi
version: 2.5.0
repository: oci://registry.cern.ch/kubernetes/charts
condition: cvmfs-csi.deployCsiDriver
condition: cvmfs-csi.enabled
24 changes: 2 additions & 22 deletions swan/files/swan_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ def swan_pod_hook(spawner, pod):
)

# Manage EOS access
if get_config("custom.eos.deployDaemonSet", False):
if get_config("custom.eos.enabled", False):
# Access via bind-mount from the host
logging.info("EOS access via DaemonSet")
c.SwanKubeSpawner.volume_mounts.append(
V1VolumeMount(
name='eos',
Expand All @@ -188,26 +187,7 @@ def swan_pod_hook(spawner, pod):
V1Volume(
name='eos',
host_path=V1HostPathVolumeSource(
path='/var/eos'
)
),
)
elif (get_config("custom.eos.deployCsiDriver", False) or \
get_config("custom.eos.useCsiDriver", False)):
# Access via CSI driver (still a bind-mount in practical terms)
logging.info("EOS access via CSI driver")
c.SwanKubeSpawner.volume_mounts.append(
V1VolumeMount(
name='eos',
mount_path='/eos',
mount_propagation='HostToContainer'
),
)
c.SwanKubeSpawner.volumes.append(
V1Volume(
name='eos',
host_path=V1HostPathVolumeSource(
path='/var/eos'
path=get_config("custom.eos.automountHostPath", "/var/eos")
)
),
)
Expand Down
40 changes: 9 additions & 31 deletions swan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,18 @@
# This solution is based on automounting.
#
cvmfs-csi:
enabled: true
automountHostPath: /var/cvmfs-blue
deployCsiDriver: true

#
# EOS access
# - deployDaemonSet deploys EOS fusex pods exposing `/eos` path on the host.
# Access to EOS is provided by bind-mounting `/eos` from the host.
# - deployCsiDriver deploys a cluster-wide storage driver for EOS.
# Access to EOS is provided by persistent volume claims.
# - useCsiDriver has to be used in case the hosting infrastructure provides
# a CSI driver to access EOS (i.e., it is not needed to deploy additional pods).
# Access to EOS is provided by persistent volume claims (identical to deployCsiDriver).
#
# Warning:
# - It is discouraged to enable more than one at once.
# - By setting all to false, access to EOS will not be possible.
# You will need to set `juyterhub.hub.config.SwanKubeSpawner.local_home: true`
# - We deploy a cluster-wide storage driver for EOS, provided by the
# Kubernetes team at CERN (https://gitlab.cern.ch/kubernetes/storage/eosxd-csi).
# This solution is based on automounting.
#
eos:
deployDaemonSet: &eosDeployDS true
deployCsiDriver: &eosDeployCSI false
useCsiDriver: &eosUseCSI false
fusex:
fusex:
hostMountpoint: /var/eos

# Ensure file versions are shown to allow notebook checkpoints
# (the fusex chart already sets this as default)
eosxd:
config:
global:
options:
hide-versions: 0
eosxd-csi:
enabled: &eosEnabled true
automountHostPath: &eosAutomountHostPath /var/eos-blue

#
# JupyterHub
Expand Down Expand Up @@ -200,9 +179,8 @@ jupyterhub:
users: true
checkEosAuth: false
eos:
deployDaemonSet: *eosDeployDS
deployCsiDriver: *eosDeployCSI
useCsiDriver: *eosUseCSI
enabled: *eosEnabled
automountHostPath: *eosAutomountHostPath
# placeholders for swan credentials
swan:
secrets:
Expand Down
Loading