Skip to content

Commit

Permalink
Merge pull request #887 from sgibson91/redeploy-carbonplan-azure
Browse files Browse the repository at this point in the history
  • Loading branch information
sgibson91 authored Dec 10, 2021
2 parents e26c5cd + e5584c5 commit 6688499
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 85 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: carbonplan-azure
name: azure.carbonplan
provider: kubeconfig
kubeconfig:
file: secrets/carbonplan-azure.yaml
file: secrets/azure.carbonplan.yaml
support:
config:
prometheus:
Expand Down Expand Up @@ -30,11 +30,18 @@ hubs:
config: &carbonPlanHubConfig
basehub:
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: 2i2ccarbonplanhubstorage.file.core.windows.net
# Trailing slash is important!
baseShareName: /2i2ccarbonplanhubstorage/homes/
jupyterhub:
custom:
homepage:
Expand All @@ -53,6 +60,22 @@ hubs:
name: Carbon Plan
url: https://carbonplan.org
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: carbonplan/cmip6-downscaling-single-user
tag: latest
Expand Down Expand Up @@ -103,12 +126,6 @@ hubs:
mem_guarantee: 2000G
node_selector:
hub.jupyter.org/node-size: Standard_M182s_v2
storage:
type: none
extraVolumes:
- name: home
persistentVolumeClaim:
claimName: home-azurefile
scheduling:
userPlaceholder:
enabled: false
Expand Down Expand Up @@ -144,18 +161,6 @@ hubs:
- jhamman
- norlandrhagen
admin_users: *users
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}}"
},
]
dask-gateway:
traefik:
resources:
Expand All @@ -181,7 +186,6 @@ hubs:
limits:
cpu: 2
memory: 4Gi
# TODO: figure out a replacement for userLimits.
- name: prod
domain: prod.azure.carbonplan.2i2c.cloud
template: daskhub
Expand Down
49 changes: 27 additions & 22 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 @@ -111,15 +128,3 @@ hubs:
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}}"
},
]
Loading

0 comments on commit 6688499

Please sign in to comment.