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

Enable NFS home directory for UToronto #94

Merged
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
51 changes: 28 additions & 23 deletions config/hubs/utoronto.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ hubs:
enabled: false
config: &utorontoHubConfig
azureFile:
enabled: true
nfs:
enabled: false
shareCreator:
enabled: false
nfs:
enabled: true
pv:
# Recommended options from the Azure Portal UI for mounting the share
mountOptions:
- vers=4
- minorversion=1
- sec=sys
serverIP: 2i2cutorontohubstorage.file.core.windows.net
# Trailing slash is important!
baseShareName: /2i2cutorontohubstorage/homes/
jupyterhub:
custom:
homepage:
Expand All @@ -52,15 +59,25 @@ hubs:
name: University of Toronto
url: https://www.utoronto.ca/
singleuser:
initContainers:
# Need to explicitly fix ownership here, since Azure File doesn't do anonuid
- name: volume-mount-ownership-fix
image: busybox
command:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && ls -lhd /home/jovyan",
]
securityContext:
runAsUser: 0
volumeMounts:
- name: home
mountPath: /home/jovyan
subPath: "{username}"
image:
name: quay.io/2i2c/utoronto-image
tag: 83a724f5b829
storage:
type: none
extraVolumes:
- name: home
persistentVolumeClaim:
claimName: home-azurefile
scheduling:
userPlaceholder:
enabled: false
Expand Down Expand Up @@ -110,16 +127,4 @@ hubs:
username_claim: oid
login_service: "University of Toronto ID"
oauth_callback_url: https://staging.utoronto.2i2c.cloud/hub/oauth_callback
tenant_id: 78aac226-2f03-4b4d-9037-b46d56c55210
extraConfig:
10-dynamic-subpath: |
import os
pod_namespace = os.environ['POD_NAMESPACE']
# FIXME: This isn't setting up _shared dirs properly
c.KubeSpawner.volume_mounts = [
{
"mountPath": "/home/jovyan",
"name": "home",
"subPath": f"{pod_namespace}/{{username}}"
},
]
tenant_id: 78aac226-2f03-4b4d-9037-b46d56c55210
5 changes: 4 additions & 1 deletion terraform/azure/projects/utoronto.tfvars
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
tenant_id = "78aac226-2f03-4b4d-9037-b46d56c55210"
subscription_id = "ead3521a-d994-4a44-a68d-b16e35642d5b"
resourcegroup_name = "2i2c-utoronto-cluster"

storage_protocol = "NFS"

ssh_pub_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQJ4h39UYNi1wybxAH+jCFkNK2aqRcuhDkQSMx0Hak5xkbt3KnT3cOwAgUP1Vt/SjhltSTuxpOHxiAKCRnjwRk60SxKhUNzPHih2nkfYTmBBjmLfdepDPSke/E0VWvTDIEXz/L8vW8aI0QGPXnXyqzEDO9+U1buheBlxB0diFAD3vEp2SqBOw+z7UgrGxXPdP+2b3AV+X6sOtd6uSzpV8Qvdh+QAkd4r7h9JrkFvkrUzNFAGMjlTb0Lz7qAlo4ynjEwzVN2I1i7cVDKgsGz9ZG/8yZfXXx+INr9jYtYogNZ63ajKR/dfjNPovydhuz5zQvQyxpokJNsTqt1CiWEUNj georgiana@georgiana"

global_container_registry_name = "2i2cutorontohubregistry"
global_storage_account_name = "2i2cutorontohubstorage"
global_storage_account_name = "2i2cutorontohubstorage"

location = "canadacentral"

Expand Down