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

Add new hub 2i2c-imagebuilding-demo with binderhub-service enabled #2699

Merged
merged 17 commits into from
Jul 18, 2023
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
8 changes: 8 additions & 0 deletions config/clusters/2i2c/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ hubs:
helm_chart_values_files:
- binder-staging.values.yaml
- enc-binder-staging.secret.values.yaml
- name: imagebuilding-demo
display_name: "2i2c image building demo"
domain: imagebuilding-demo.2i2c.cloud.2i2c.cloud
helm_chart: basehub
helm_chart_values_files:
- basehub-common.values.yaml
- imagebuilding-demo.values.yaml
- enc-imagebuilding-demo.secret.values.yaml
- name: demo
display_name: "2i2c demo"
domain: demo.2i2c.cloud
Expand Down
23 changes: 23 additions & 0 deletions config/clusters/2i2c/enc-imagebuilding-demo.secret.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
binderhub-service:
buildPodsRegistryCredentials:
password: ENC[AES256_GCM,data:4qQby5ze18JvIyJZH+UO/fUTXb790fXQsdfqj9SqINGg4KVTWuRq5ubAhJIH2vVeCY2dYDT4OYP6vx8hKKZZKeec4NvypFsgEJHp38bQwSX4Bo13vdd2hMXtpqbG8uZh/L1gE/VJx4Jn/F1zyETyJcmLo1gRg7F2t0wBlH7GaQ0kr2+HYKphP73EJ+WAPx3FtlEp26OsxtwCRBIsdmX6eXbyScsPTFpTpZORy0wlC9Lqne+jgYQubs07lx5pKjDcXweEhj9/7DPff04sUep7v1Ww9GpuW8QRI3r7Hx0zh3/Cl+sjrdOMxpnHfQYFRRdoanF8tQCrsaaRicQAftpMLtfm8KDMWXh4kJMfCw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W+njwR1iAr83k7XLYVZ4237uhmVixZwEkFDZ5+iRNWN03sfNzOgdZdOvziXirpGduWjVZeCYn0tb6BJTJy4kfXms+B2oDQZXpzAzq/znjGIyOYjC9odNfpYmBxZHdBzxoLMeCSRxBTydaFIUPnC4P5kulInNQ30WFTB2nfN+RCOk4PPDO6INVnOu7l2dcqLj0eQqIp13doed/QkwvDr6+sUMmEhFnNR0H70hbJIFvdY9Fu9nrB/GbNvFqIcTNPRy0nWA9SmW4jYDdML6nJ/nrAwptri237b8yh4NI7J4obaOoRUJtwhFOzv+jvS9eQtOYakcRYkMme2DtLHDfgbp8+uoOUf0d2HF11bFW2v7k6/pcgg8iPLoX7L6gzWmyHYKE1nG+u9NTNx/FqQSnzZzOsDAAIHs1Ydua2GOA8w9HoYFy8xAmvz9T4Cm/buZlEnPJN1bvtf8HTZktEmhhP2jr14q9JYl6HWxyQyJx12UAvJrh2toMhLC6KKak1C6GHYV6m1dr8zTZLAV/gV8Kv5+fAJpfg3Au1ZEcgm1NlIEOPr9JHsDdC4LBvL2vsBil+lALykoTrlIUy7ea7G8FNK3JMXwNkaXIp2qw2+QWIrFsVWIrDimi46kJ2MIfpbtXmtaVuAMGr3XMQzl,iv:0+34W6adUVI8wBO4oWTYX1LpFBrV6mxz+zh4FTUdzQw=,tag:CnErqoj/esIP3b4OKfoj0g==,type:str]
jupyterhub:
hub:
config:
CILogonOAuthenticator:
client_id: ENC[AES256_GCM,data:v3yiJA0ir2lC1qf/1ih5iLLdfiBSg1B+XEREYcrHwF0j+Srx7LV/3AKsWEHKnFB3hOw=,iv:oEcT6PsStTBiYO+GLREnLRTCR7eLeaHdqHWWRRrbc0E=,tag:hx9TAfhzKMqgexWhNd8H5g==,type:str]
client_secret: ENC[AES256_GCM,data:+U2J6N0R05DfCwhcest0oBRXv1356e9jeGQTR57Pum24MaE4xFLSt5uQsT7bOAXKF/s8lV1vrDomoPBGuhZ+3t/iCFlS/9KYsDCBLbjDBR/MZFWWWEk=,iv:tZqmBcBhe84BQrNaTEnYTMt9lG4KDU/OJlKYMHqxEf4=,tag:I3X3K+OH1JjKpSFwITvUHw==,type:str]
sops:
kms: []
gcp_kms:
- resource_id: projects/two-eye-two-see/locations/global/keyRings/sops-keys/cryptoKeys/similar-hubs
created_at: "2023-07-17T08:45:20Z"
enc: CiUA4OM7eMiDjL9h2JVoUk0z51mi94Tov+v2PxCEx9zTshKYF1HlEkkAyiwFHGf++4gB28i3Fcz+7sjHshU7Jd9nogf3dtzpYqZ5AqreK8ONJ3gQTl1WVOjMiDEUrHhWSydPJuO0FR180PtVqAzkQfkz
azure_kv: []
hc_vault: []
age: []
lastmodified: "2023-07-17T08:45:20Z"
mac: ENC[AES256_GCM,data:m0mqujIYiJfZLUKy9/jmXpIn6sypJkZ/GgJNWMeEqaecUUUvtnMNsCzzWxojWd/cMkQJCGEoTbswI18sA2j/J0jewdnziTvPfQqvf52nHwSDfRdiqWKneX+TAJxagSxfK2FTurRGRIGqgv4jqT0ATO3CqNhyMSWifBeGW7q9QXY=,iv:jJd+1AxYIBz1GkuzaPd7SzACh+iXFLzcEPe3eEEnNVA=,tag:DPoo2i8YmEUQZ4Q2Y7BF+g==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
4 changes: 2 additions & 2 deletions config/clusters/2i2c/enc-staging.secret.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2023-03-09T10:59:06Z"
mac: ENC[AES256_GCM,data:RLYpW3qeNkUfreFfwbW3an7k/weE2p/Fu1DXBGd0/GgEyPsy9jQj34w66fT5DFWJFcIpSEvAty3hzB8S4Y0NEATooahD5T6cvvi3GD/d9b+V1pXjeFNpigQ+SRkwUghfajy2LcAVdXTDeorR0V8zlSj8lLUuu51PSeB0UkC5L00=,iv:7blbojnWaAE46D6JgZiXpLEbXWHeup8o7Sh1pehedOs=,tag:ZFXAd9Rw61Bgybla23g1yg==,type:str]
lastmodified: "2023-07-17T08:46:09Z"
mac: ENC[AES256_GCM,data:3eQh2pOL/wS69S1nijx2lZrcUlG9nxvbQ5KpCrbPDx0yLfjBkAbg4FR82oeho2CwGHi5nky6X4VrxOIZAPgqgOntJ1QzARr1i9QgYh/klTQfEaLpa7ytciaUyXYebQBgGp1seIjug3U4k3aloGcQu4AbBLQRjCe8F2BMOahWTlU=,iv:NV8ao8uAd/c+ab799C4IzN4m1UoJzh7SPuFq78O+crs=,tag:JAJVl3KRDUgB2e0ynBaqlg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
74 changes: 74 additions & 0 deletions config/clusters/2i2c/imagebuilding-demo.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
jupyterhub:
ingress:
hosts:
- imagebuilding-demo.2i2c.cloud
tls:
- secretName: https-auto-tls
hosts:
- imagebuilding-demo.2i2c.cloud
custom:
2i2c:
add_staff_user_ids_to_admin_users: true
add_staff_user_ids_of_type: "google"
homepage:
templateVars:
org:
name: demo image building with binderhub-service
url: https://2i2c.org
logo_url: https://2i2c.org/media/logo.png
designed_by:
name: 2i2c
url: https://2i2c.org
operated_by:
name: 2i2c
url: https://2i2c.org
funded_by:
name: 2i2c
url: https://2i2c.org
hub:
config:
JupyterHub:
authenticator_class: cilogon
CILogonOAuthenticator:
oauth_callback_url: "https://imagebuilding-demo.2i2c.cloud/hub/oauth_callback"
username_claim: "email"
# Only show the option to login with Google
shown_idps:
- http://google.com/accounts/o8/id

binderhub-service:
nodeSelector:
hub.jupyter.org/node-purpose: core
enabled: true
service:
port: 8090
# The DaemonSet at https://github.com/2i2c-org/binderhub-service/blob/main/binderhub-service/templates/docker-api/daemonset.yaml
# will start a docker-api pod on a user node.
# It starts the [dockerd](https://docs.docker.com/engine/reference/commandline/dockerd/) daemon,
# that will be accessible via a unix socket, mounted by the build.
# The docker-api pod must run on the same node as the builder pods.
dockerApi:
nodeSelector:
hub.jupyter.org/node-purpose: user
tolerations:
# Tolerate tainted jupyterhub user nodes
- key: hub.jupyter.org_dedicated
value: user
effect: NoSchedule
- key: hub.jupyter.org/dedicated
value: user
effect: NoSchedule
config:
BinderHub:
use_registry: true
# Re-uses the registry created for the `binderhub-staging` hub
# but pushes images under a different prefix
image_prefix: us-central1-docker.pkg.dev/two-eye-two-see/binder-staging-registry/binderhub-service-
KubernetesBuildExecutor:
node_selector:
# Schedule builder pods to run on user nodes only
hub.jupyter.org/node-purpose: user
# The password to the registry is stored encrypted in the hub's encrypted config file
buildPodsRegistryCredentials:
server: "https://us-central1-docker.pkg.dev"
username: "_json_key"
4 changes: 4 additions & 0 deletions helm-charts/basehub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ dependencies:
# be found in the Dockerfile's comments.
version: 3.0.0-beta.1.git.6208.h7b44299a
repository: https://jupyterhub.github.io/helm-chart/
- name: binderhub-service
version: 0.1.0-0.dev.git.80.h358d32f
repository: https://2i2c.org/binderhub-service/
condition: binderhub-service.enabled
11 changes: 11 additions & 0 deletions helm-charts/basehub/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ properties:
global:
type: object
additionalProperties: true
binderhub-service:
type: object
additionalProperties: true
required:
- enabled
properties:
enabled:
type: boolean
# https://github.com/2i2c-org/binderhub-service
description: |
Enable image building with binderhub-service
# jupyterhub is a dependent helm chart and we rely _mostly_ on its schema
# validation for values passed to it and are not imposing restrictions on
# most of them in this helm chart.
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/basehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ userServiceAccount:
enabled: true
annotations: {}

binderhub-service:
enabled: false

ingressBasicAuth:
enabled: false
# Primarily here for validation to 'work',
Expand Down