Skip to content

Commit 361eaef

Browse files
Add the support config and initial staging hub
1 parent b04118f commit 361eaef

File tree

5 files changed

+238
-1
lines changed

5 files changed

+238
-1
lines changed

config/clusters/opensci/cluster.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,19 @@ aws:
55
clusterType: eks
66
clusterName: opensci
77
region: us-west-2
8-
hubs: []
8+
support:
9+
helm_chart_values_files:
10+
- support.values.yaml
11+
- enc-support.secret.values.yaml
12+
hubs:
13+
- name: staging
14+
display_name: "Opensci (staging)"
15+
domain: staging.opensci.2i2c.cloud
16+
helm_chart: basehub
17+
helm_chart_values_files:
18+
# The order in which you list files here is the order the will be passed
19+
# to the helm upgrade command in, and that has meaning. Please check
20+
# that you intend for these files to be applied in this order.
21+
- common.values.yaml
22+
- staging.values.yaml
23+
- enc-staging.secret.values.yaml
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
nfs:
2+
pv:
3+
# from https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html
4+
mountOptions:
5+
- rsize=1048576
6+
- wsize=1048576
7+
- timeo=600
8+
- soft # We pick soft over hard, so NFS lockups don't lead to hung processes
9+
- retrans=2
10+
- noresvport
11+
serverIP: fs-065fcb5bb0ad79b25.efs.us-west-2.amazonaws.com
12+
baseShareName: /
13+
14+
jupyterhub:
15+
custom:
16+
2i2c:
17+
add_staff_user_ids_to_admin_users: true
18+
add_staff_user_ids_of_type: "github"
19+
jupyterhubConfigurator:
20+
enabled: false
21+
homepage:
22+
templateVars:
23+
org:
24+
name: Demo image building with binderhub-service
25+
url: https://2i2c.org
26+
logo_url: https://2i2c.org/media/logo.png
27+
designed_by:
28+
name: 2i2c
29+
url: https://2i2c.org
30+
operated_by:
31+
name: 2i2c
32+
url: https://2i2c.org
33+
funded_by:
34+
name: ""
35+
url: ""
36+
singleuser:
37+
profileList:
38+
- display_name: "Only Profile Available, this info is not shown in the UI"
39+
slug: only-choice
40+
profile_options:
41+
image:
42+
display_name: Image
43+
unlisted_choice: &profile_list_unlisted_choice
44+
enabled: True
45+
display_name: "Custom image"
46+
validation_regex: "^.+:.+$"
47+
validation_message: "Must be a publicly available docker image, of form <image-name>:<tag>"
48+
display_name_in_choices: "Specify an existing docker image"
49+
description_in_choices: "Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc)"
50+
kubespawner_override:
51+
image: "{value}"
52+
choices:
53+
pangeo:
54+
display_name: Pangeo Notebook Image
55+
description: "Python image with scientific, dask and geospatial tools"
56+
kubespawner_override:
57+
image: pangeo/pangeo-notebook:2023.09.11
58+
geospatial:
59+
display_name: Rocker Geospatial
60+
description: "R image with RStudio, the tidyverse & Geospatial tools"
61+
default: true
62+
slug: geospatial
63+
kubespawner_override:
64+
image: rocker/binder:4.3
65+
# Launch into RStudio after the user logs in
66+
default_url: /rstudio
67+
# Ensures container working dir is homedir
68+
# https://github.com/2i2c-org/infrastructure/issues/2559
69+
working_dir: /home/rstudio
70+
scipy:
71+
display_name: Jupyter SciPy Notebook
72+
slug: scipy
73+
kubespawner_override:
74+
image: jupyter/scipy-notebook:2023-06-26
75+
resources:
76+
display_name: Resource Allocation
77+
choices:
78+
mem_3_4:
79+
display_name: 3.4 GB RAM, upto 3.485 CPUs
80+
kubespawner_override:
81+
mem_guarantee: 3662286336
82+
mem_limit: 3662286336
83+
cpu_guarantee: 0.435625
84+
cpu_limit: 3.485
85+
node_selector:
86+
node.kubernetes.io/instance-type: n2-highmem-4
87+
default: true
88+
mem_6_8:
89+
display_name: 6.8 GB RAM, upto 3.485 CPUs
90+
kubespawner_override:
91+
mem_guarantee: 7324572672
92+
mem_limit: 7324572672
93+
cpu_guarantee: 0.87125
94+
cpu_limit: 3.485
95+
node_selector:
96+
node.kubernetes.io/instance-type: n2-highmem-4
97+
mem_13_6:
98+
display_name: 13.6 GB RAM, upto 3.485 CPUs
99+
kubespawner_override:
100+
mem_guarantee: 14649145344
101+
mem_limit: 14649145344
102+
cpu_guarantee: 1.7425
103+
cpu_limit: 3.485
104+
node_selector:
105+
node.kubernetes.io/instance-type: n2-highmem-4
106+
mem_27_3:
107+
display_name: 27.3 GB RAM, upto 3.485 CPUs
108+
kubespawner_override:
109+
mem_guarantee: 29298290688
110+
mem_limit: 29298290688
111+
cpu_guarantee: 3.485
112+
cpu_limit: 3.485
113+
node_selector:
114+
node.kubernetes.io/instance-type: n2-highmem-4
115+
hub:
116+
# Allows for multiple concurrent demos
117+
allowNamedServers: true
118+
services:
119+
binder:
120+
# FIXME: ref https://github.com/2i2c-org/binderhub-service/issues/57
121+
# for something more readable and requiring less copy-pasting
122+
url: http://imagebuilding-demo-binderhub-service:8090
123+
image:
124+
name: quay.io/2i2c/dynamic-image-building-experiment
125+
tag: "0.0.1-0.dev.git.7567.ha4162031"
126+
config:
127+
JupyterHub:
128+
authenticator_class: github
129+
GitHubOAuthenticator:
130+
allowed_organizations:
131+
- 2i2c-demo-hub-access
132+
- ScienceCore
133+
scope:
134+
- read:org
135+
136+
extraConfig:
137+
enable-fancy-profiles: |
138+
from jupyterhub_fancy_profiles import setup_ui
139+
setup_ui(c)
140+
141+
binderhub-service:
142+
nodeSelector:
143+
hub.jupyter.org/node-purpose: core
144+
enabled: true
145+
service:
146+
port: 8090
147+
# The DaemonSet at https://github.com/2i2c-org/binderhub-service/blob/main/binderhub-service/templates/docker-api/daemonset.yaml
148+
# will start a docker-api pod on a user node.
149+
# It starts the [dockerd](https://docs.docker.com/engine/reference/commandline/dockerd/) daemon,
150+
# that will be accessible via a unix socket, mounted by the build.
151+
# The docker-api pod must run on the same node as the builder pods.
152+
dockerApi:
153+
nodeSelector:
154+
hub.jupyter.org/node-purpose: user
155+
tolerations:
156+
# Tolerate tainted jupyterhub user nodes
157+
- key: hub.jupyter.org_dedicated
158+
value: user
159+
effect: NoSchedule
160+
- key: hub.jupyter.org/dedicated
161+
value: user
162+
effect: NoSchedule
163+
config:
164+
BinderHub:
165+
base_url: /services/binder
166+
use_registry: true
167+
# Re-uses the registry created for the `binderhub-staging` hub
168+
# but pushes images under a different prefix
169+
image_prefix: us-central1-docker.pkg.dev/two-eye-two-see/binder-staging-registry/binderhub-service-
170+
KubernetesBuildExecutor:
171+
# Get ourselves a newer repo2docker!
172+
build_image: quay.io/jupyterhub/repo2docker:2023.06.0-8.gd414e99
173+
node_selector:
174+
# Schedule builder pods to run on user nodes only
175+
hub.jupyter.org/node-purpose: user
176+
# The password to the registry is stored encrypted in the hub's encrypted config file
177+
buildPodsRegistryCredentials:
178+
server: "https://us-central1-docker.pkg.dev"
179+
username: "_json_key"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
jupyterhub:
2+
hub:
3+
config:
4+
GitHubOAuthenticator:
5+
client_id: ENC[AES256_GCM,data:s6J6NCDKC+8DWL/G1HfeoS6LvVw=,iv:ppAQJ0Bcp4jR2RM7ZzpjKN8a+lKCAf93m8GxyoemFvY=,tag:xNT4AbtaYEilgTPtOAb+Lw==,type:str]
6+
client_secret: ENC[AES256_GCM,data:690jNdjfNH8tEOmPs8vvsaU1R9Z0ooQIY/EabmqX4bU7CSF6Ho6rOQ==,iv:TXeDQdL4Bzx1Ky0fjg1tNCPhRG1lJra5KvzPkSHMYmE=,tag:m173HByyyMF0CEvt4aJBCw==,type:str]
7+
sops:
8+
kms: []
9+
gcp_kms:
10+
- resource_id: projects/two-eye-two-see/locations/global/keyRings/sops-keys/cryptoKeys/similar-hubs
11+
created_at: "2024-02-22T12:06:32Z"
12+
enc: CiUA4OM7eP01v1Kyb9Ju8g3mAA1U9yPxtdOKulHLakW+cmwRyDweEkkAXoW3JodsyugXQTcoglPT5W4ElfRnz3O0EMdsoNY5DHJiaKFSa6bZUOrbePG1/9R6vA7iPS4ZX1f1kd8iyYIb05255bumCIzo
13+
azure_kv: []
14+
hc_vault: []
15+
age: []
16+
lastmodified: "2024-02-22T12:06:33Z"
17+
mac: ENC[AES256_GCM,data:3SL337k6foIN/veukv1DeYRP4xmSbnhLaEKgujqbjSG2AzBZPngukdhUQ31ExO6/MqcjFpSllicHZPhjtPYcgSbxJfKRM+7zxEofeZqVtJkA3Q1N0J3JigTm483MNTc9l89Rn+JnaKej1ouBaR3O3PD6jjCAowZXpKoSgcrgxPk=,iv:dBfT1g+ZR1kwbp2rNFdekwKlTcpnt4/72ExKybqTJwo=,tag:lzCkerc3rNarGHWy3CfcrQ==,type:str]
18+
pgp: []
19+
unencrypted_suffix: _unencrypted
20+
version: 3.7.3
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
jupyterhub:
2+
ingress:
3+
hosts:
4+
- staging.opensci.2i2c.cloud
5+
tls:
6+
- secretName: https-auto-tls
7+
hosts:
8+
- staging.opensci.2i2c.cloud
9+
hub:
10+
config:
11+
GitHubOAuthenticator:
12+
oauth_callback_url: https://staging.opensci.2i2c.cloud/hub/oauth_callback
13+
services:
14+
binder:
15+
# FIXME: ref https://github.com/2i2c-org/binderhub-service/issues/57
16+
# for something more readable and requiring less copy-pasting
17+
url: https://staging.opensci-binderhub-service:8090

config/clusters/opensci/support.values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
prometheusIngressAuthSecret:
22
enabled: true
33

4+
cluster-autoscaler:
5+
enabled: true
6+
autoDiscovery:
7+
clusterName: opensci
8+
awsRegion: us-west-2
9+
410
prometheus:
511
server:
612
ingress:

0 commit comments

Comments
 (0)