Skip to content

Commit

Permalink
Merge pull request #5362 from jnywong/nmfs-openscapes-workshop
Browse files Browse the repository at this point in the history
[nmfs openscapes] Add workshop hub
  • Loading branch information
jnywong authored Jan 10, 2025
2 parents 2f64673 + e16a8bd commit 3ed22aa
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config/clusters/nmfs-openscapes/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ hubs:
- common.values.yaml
- prod.values.yaml
- enc-prod.secret.values.yaml
- name: workshop
display_name: "NOAA Fisheries Openscapes Workshop"
domain: workshop.nmfs-openscapes.2i2c.cloud
helm_chart: basehub
helm_chart_values_files:
- common.values.yaml
- workshop.values.yaml
- enc-workshop.secret.values.yaml
19 changes: 19 additions & 0 deletions config/clusters/nmfs-openscapes/enc-workshop.secret.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
jupyterhub:
hub:
config:
DummyAuthenticator:
password: ENC[AES256_GCM,data:3fSTbTvq8yXs2YET,iv:dU4LtV1RhpOZuUQaJHzqS8P1+HGD+R+cJ4oQ1tnpYXE=,tag:pAdFNCegRhiD0xf7Mry23A==,type:str]
sops:
kms: []
gcp_kms:
- resource_id: projects/two-eye-two-see/locations/global/keyRings/sops-keys/cryptoKeys/similar-hubs
created_at: "2025-01-09T15:19:55Z"
enc: CiUA4OM7eGez8KDuQZXma3aE2ZS9b3HenoeE9zJDAt9k+DMfqFVMEkkAnGhyNvSoFbF+zxcX/4id6Slvrld7haauv8LWoKhnKNroAKcT7U9aEqy80YJrXAMKJeuaWBgcTZUtpulxNqhb5FltsbNX8eY1
azure_kv: []
hc_vault: []
age: []
lastmodified: "2025-01-09T15:19:56Z"
mac: ENC[AES256_GCM,data:09FmkRMmYDcnX4fJTVhCLkUqjDsYI11kX9iU5Ys8d839Dyk5Ff0KkXDWtQ3B7f98O+8dyarh4dxDMdwzB8NgacHfOgWpEQtofsPv3vW9hgKxOnBA1tNSYLoD3BNBQkJrQjx3gJ5sQE4W5PC6+lN4T0Dy66x/NF1A2lef7yrAODY=,iv:wozq2/LMLvr9gYCQO4BV0Z6urJL+c+HYKuRAKnRmMx8=,tag:Wglf2mmx/jO+JfT4fEb9Iw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.1
185 changes: 185 additions & 0 deletions config/clusters/nmfs-openscapes/workshop.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
nfs:
pv:
serverIP: 10.100.92.26

jupyterhub:
custom:
2i2c:
add_staff_user_ids_to_admin_users: false
jupyterhubConfigurator:
enabled: false
homepage:
gitRepoBranch: "username-and-password-homepage"
ingress:
hosts: [workshop.nmfs-openscapes.2i2c.cloud]
tls:
- hosts: [workshop.nmfs-openscapes.2i2c.cloud]
secretName: https-auto-tls
hub:
allowNamedServers: true
config:
JupyterHub:
authenticator_class: dummy
Authenticator:
enable_auth_state: false
admin_users: []
singleuser:
defaultUrl: /lab
nodeSelector:
2i2c/hub-name: workshop
extraEnv:
SCRATCH_BUCKET: s3://nmfs-openscapes-scratch-workshop/$(JUPYTERHUB_USER)
PERSISTENT_BUCKET: s3://nmfs-openscapes-persistent-workshop/$(JUPYTERHUB_USER)
profileList:
- display_name: Default
description: Choose image and resource allocation
default: true
profile_options: &profile_options
image: &profile_options_image
display_name: Image
choices:
python:
display_name: Py - NASA Openscapes Python 39dffde
slug: python
kubespawner_override:
image: openscapes/python:39dffde
pyrbase:
display_name: Py-R - base image 4.4-3.10
slug: pyrbase
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/py-rocket-base:latest
pyrgeo:
display_name: Py-R - Geospatial - py-rocket-geospatial latest
slug: pyrgeo
default: true
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/py-rocket-geospatial:latest
pyrgeo2:
display_name: Py-R - Geospatial + QGIS, Panoply, CWUtils - py-rocket-geospatial-2 latest
slug: pyrgeo2
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/py-rocket-geospatial-2:latest
coastwatch:
display_name: Py-R - CoastWatch - coastwatch latest
slug: coastwatch
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/coastwatch:latest
aomlomics:
display_name: Py - Tourmaline Snakemake workflow for QIIME 2 v.2023.5
slug: aomlomics
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/aomlomics-jh:latest
iorocker:
display_name: R - Geospatial w sdmTMB - r-geospatial-sdm latest
slug: rgeospatialsdm
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/r-geospatial-sdm:latest
echopype:
display_name: Py - Echopype with pangeo - image-acoustics latest
slug: echopype
kubespawner_override:
image: ghcr.io/nmfs-opensci/image-acoustics:latest
arcgis:
display_name: Py - ArcGIS Python 3.9
slug: arcgis
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/arcgis:latest
cboettig:
display_name: Py-R - NASA TOPS - boettiger-lab nasa-tops latest
slug: cboettig
kubespawner_override:
image: ghcr.io/boettiger-lab/nasa-tops:latest
vast:
display_name: R - VAST with TMB - vast latest
kubespawner_override:
image: ghcr.io/nmfs-opensci/container-images/vast:latest
pace:
display_name: Py - PACE image with OCSSW tools
slug: pace
kubespawner_override:
image: quay.io/pacehackweek/pace-2024:latest
unlisted_choice:
enabled: True
display_name: "Custom image"
validation_regex: "^.+:.+$"
validation_message: "Must be a publicly available docker image, of form <image-name>:<tag>"
kubespawner_override:
image: "{value}"
requests: &profile_options_resource_allocation
display_name: Resource Allocation
choices:
# choices generated by combining:
# - deployer generate resource-allocation choices r7i.xlarge
# - deployer generate resource-allocation choices r7i.4xlarge --num-allocations=2
mem_1_9:
display_name: 1.9 GB RAM, upto 3.7 CPUs
kubespawner_override:
mem_guarantee: 1991244775
mem_limit: 1991244775
cpu_guarantee: 0.2328125
cpu_limit: 3.725
node_selector:
node.kubernetes.io/instance-type: r5.xlarge
default: true
mem_3_7:
display_name: 3.7 GB RAM, upto 3.7 CPUs
kubespawner_override:
mem_guarantee: 3982489550
mem_limit: 3982489550
cpu_guarantee: 0.465625
cpu_limit: 3.725
node_selector:
node.kubernetes.io/instance-type: r5.xlarge
mem_7_4:
display_name: 7.4 GB RAM, upto 3.7 CPUs
kubespawner_override:
mem_guarantee: 7964979101
mem_limit: 7964979101
cpu_guarantee: 0.93125
cpu_limit: 3.725
node_selector:
node.kubernetes.io/instance-type: r5.xlarge
mem_14_8:
display_name: 14.8 GB RAM, upto 3.7 CPUs
kubespawner_override:
mem_guarantee: 15929958203
mem_limit: 15929958203
cpu_guarantee: 1.8625
cpu_limit: 3.725
node_selector:
node.kubernetes.io/instance-type: r5.xlarge
mem_29_7:
display_name: 29.7 GB RAM, upto 3.7 CPUs
kubespawner_override:
mem_guarantee: 31859916406
mem_limit: 31859916406
cpu_guarantee: 3.725
cpu_limit: 3.725
node_selector:
node.kubernetes.io/instance-type: r5.xlarge
mem_60_6:
display_name: 60.6 GB RAM, upto 15.6 CPUs
kubespawner_override:
mem_guarantee: 65094448840
mem_limit: 65094448840
cpu_guarantee: 7.8475
cpu_limit: 15.695
node_selector:
node.kubernetes.io/instance-type: r5.4xlarge
mem_121_2:
display_name: 121.2 GB RAM, upto 15.6 CPUs
kubespawner_override:
mem_guarantee: 130188897681
mem_limit: 130188897681
cpu_guarantee: 15.695
cpu_limit: 15.695
node_selector:
node.kubernetes.io/instance-type: r5.4xlarge

jupyterhub-home-nfs:
eks:
enabled: true
volumeId: vol-07154b7def3b80b96
quotaEnforcer:
hardQuota: "4" # in GB
path: "/export/workshop"
18 changes: 18 additions & 0 deletions eksctl/nmfs-openscapes.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ local notebookNodes = [
labels+: { "2i2c/hub-name": "prod" },
tags+: { "2i2c:hub-name": "prod" },
},
{
instanceType: "r5.xlarge",
namePrefix: "nb-workshop",
labels+: { "2i2c/hub-name": "workshop" },
tags+: { "2i2c:hub-name": "workshop" },
},
{
instanceType: "r5.4xlarge",
namePrefix: "nb-staging",
Expand All @@ -49,6 +55,12 @@ local notebookNodes = [
labels+: { "2i2c/hub-name": "prod" },
tags+: { "2i2c:hub-name": "prod" },
},
{
instanceType: "r5.4xlarge",
namePrefix: "nb-workshop",
labels+: { "2i2c/hub-name": "workshop" },
tags+: { "2i2c:hub-name": "workshop" },
},
{
instanceType: "r5.16xlarge",
namePrefix: "nb-staging",
Expand All @@ -61,6 +73,12 @@ local notebookNodes = [
labels+: { "2i2c/hub-name": "prod" },
tags+: { "2i2c:hub-name": "prod" },
},
{
instanceType: "r5.16xlarge",
namePrefix: "nb-workshop",
labels+: { "2i2c/hub-name": "workshop" },
tags+: { "2i2c:hub-name": "workshop" },
},
];
local daskNodes = [];

Expand Down
22 changes: 21 additions & 1 deletion terraform/aws/projects/nmfs-openscapes.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ ebs_volumes = {
type = "gp3"
name_suffix = "prod"
tags = { "2i2c:hub-name" : "prod" }
}
},
"workshop" = {
size = 128
type = "gp3"
name_suffix = "workshop"
tags = { "2i2c:hub-name" : "workshop" }
},
}

user_buckets = {
Expand All @@ -33,12 +39,20 @@ user_buckets = {
"delete_after" : 7,
"tags" : { "2i2c:hub-name" : "prod" },
},
"scratch-workshop" : {
"delete_after" : 7,
"tags" : { "2i2c:hub-name" : "workshop" },
},
"persistent-staging" : {
"tags" : { "2i2c:hub-name" : "staging" },
},
"persistent" : {
"tags" : { "2i2c:hub-name" : "prod" },
},
"persistent-workshop" : {
"delete_after" : null,
"tags" : { "2i2c:hub-name" : "workshop" },
},
}

hub_cloud_permissions = {
Expand All @@ -48,6 +62,12 @@ hub_cloud_permissions = {
"prod" : {
bucket_admin_access : ["scratch", "persistent"],
},
"workshop" : {
bucket_admin_access : [
"scratch-workshop",
"persistent-workshop",
],
},
}

active_cost_allocation_tags = [
Expand Down

0 comments on commit 3ed22aa

Please sign in to comment.