Skip to content

Commit

Permalink
only need to not push the config files with the keys
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Feb 26, 2024
1 parent f44a31b commit 30da419
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
.Rhistory
.RData
.Ruserdata
config
config/jhub/config.yaml
config/dhub/dconfig2.yaml

/.quarto/
.DS_Store
11 changes: 11 additions & 0 deletions config/Azure-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: Azure-managed-disk
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-premium-custom
resources:
requests:
storage: 10Gi
3 changes: 3 additions & 0 deletions config/_NOPUSHTOGITHUB
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dconfig2.yaml (dhub) and config.yaml (jhub) has the keys for OAuth and IP for the hub.

Actually nothing all that bad would happen, but why expose that to the bots.
98 changes: 98 additions & 0 deletions config/dhub/dconfig2-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
jupyterhub:
# custom:
# singleuser:
# extraVolumeMounts:
# - name: home
# mountPath: /home/jovyan/shared
hub:
config:
GitHubOAuthenticator:
client_id: xxxxxxx
client_secret: xxxxxxx
oauth_callback_url: https://dhub.opensci.live/hub/oauth_callback
allowed_organizations:
- nmfs-opensci:DaskHub
scope:
- read:org
Authenticator:
admin_users:
- eeholmes
JupyterHub:
authenticator_class: github
KubeSpawner:
working_dir: /home/jovyan
allowNamedServers: true
networkPolicy:
enabled: false
readinessProbe:
enabled: false
proxy:
https:
enabled: true
hosts:
- dhub.opensci.live
letsencrypt:
contactEmail: [email protected]
singleuser:
startTimeout: 3600
defaultUrl: /lab
# Defines the default image
storage:
capacity: 100Gi
extraVolumes:
- name: jupyterhub-shared
persistentVolumeClaim:
claimName: daskhub-pvc
extraVolumeMounts:
- name: jupyterhub-shared
mountPath: /home/jovyan/shared
image:
name: openscapes/python
tag: 6ee57a9
profileList:
- display_name: "4 CPU / 32 GB RAM"
description: &profile_list_description "Start a container with at least a chosen share of capacity on a node of this type"
default: true
slug: small
profile_options:
image: &profile_options_image
display_name: Image
choices:
python:
display_name: Openscapes python image
slug: python
default: true
kubespawner_override:
image: openscapes/python:6ee57a9
pyrbase:
display_name: Py-R base image
slug: pyrbase
kubespawner_override:
image: eeholmes/py-rocket-base:20240116
iopython:
display_name: Python with tensorflow
slug: iopython
kubespawner_override:
image: eeholmes/iopython:20230714
iorocker:
display_name: R with sdmTMB
slug: iorocker
kubespawner_override:
image: eeholmes/iorocker:20230729
rocker:
display_name: Openscapes R image
slug: rocker
kubespawner_override:
image: openscapes/rocker:a7596b5
kubespawner_override:
cpu_limit: null
mem_limit: null
node_selector:
topology.kubernetes.io/zone: westus2-1
node.kubernetes.io/instance-type: Standard_D8s_v3
dask-gateway:
gateway:
extraConfig:
idle: |-
# timeout after 30 minutes of inactivity
c.KubeClusterConfig.idle_timeout = 1800
10 changes: 10 additions & 0 deletions config/dhub/jupyterhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

helm repo add dask https://helm.dask.org
helm repo update

helm upgrade --cleanup-on-fail \
--render-subchart-notes dhub dask/daskhub \
--namespace dhub \
--version=2024.1.1 \
--values dconfig2.yaml
14 changes: 14 additions & 0 deletions config/dhub/pv-azurefilenfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: daskhub-shared
labels:
type: nfs
spec:
capacity:
storage: 2Ti
accessModes:
- ReadWriteMany
nfs:
server: 10.224.0.4
path: https://daskhubnfs.file.core.windows.net/daskhub-shared
14 changes: 14 additions & 0 deletions config/dhub/pvc-azurefilenfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: daskhub-shared
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 2Ti
selector:
matchLabels:
type: nfs

0 comments on commit 30da419

Please sign in to comment.