-
Notifications
You must be signed in to change notification settings - Fork 64
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
[New Hub prototype] Binderhub UI demo #4119
Merged
consideRatio
merged 24 commits into
2i2c-org:main
from
GeorgianaElena:binderhub-ui-demo
May 30, 2024
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
999a69a
Add initial support for a binderhub UI hub
GeorgianaElena 81bd511
Add the config files to the new cluster
GeorgianaElena 34891e0
Use the hub's url
GeorgianaElena 57dd87e
Make use of binderhub-service new extraEnv
consideRatio 9d873eb
Use latest binderhub
GeorgianaElena 8c03dc9
Export more relevant env vars
GeorgianaElena c7389a9
Temp use the old chart until latest is fixed
GeorgianaElena ecdd191
Fix ingress config and add binderhub's public ip for oauth callback
GeorgianaElena 492f701
Switch to cilogon, load roles
GeorgianaElena f1f04f1
Reset base url otherwise we're stuck with /binder/services
GeorgianaElena f17c600
Export JUPYTERHUB_BASE_URL instead of JUPYTHUB_API_URL to fix redirect
GeorgianaElena 6aa4d03
JUPYTERHUB_API_URL needs to be set as well otherwise a weird concaten…
GeorgianaElena e0bbb13
Update the binderhub-service chart
GeorgianaElena fe284c1
Temp declare extra config from chart in hub's values file
GeorgianaElena 55b819e
Temp use old's registry creds
GeorgianaElena 2f125c1
Add scopes for the binder service to use relevant hub REST API
consideRatio c2d5f91
Unset initContainers referencing home folders not mounted
consideRatio 3523ccb
Unset other volume mounts not used
consideRatio e72c1e8
Cleanup not needed parts
consideRatio 6637088
Cleanup re-setting of default jupyterhub-singleuser
consideRatio 617292c
Tweak permissions for binder service to be minimal
consideRatio 7d17a3f
Additional tweaking of required config for binderhub-ui
consideRatio 41818be
Move the ingress class nama and annotations to basehub
GeorgianaElena 488641f
Update the registry password with the one in terraform output
GeorgianaElena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
jupyterhub: | ||
ingress: | ||
hosts: | ||
- hub.binderhub-ui-demo.2i2c.cloud | ||
tls: | ||
- secretName: https-auto-tls | ||
hosts: | ||
- hub.binderhub-ui-demo.2i2c.cloud | ||
custom: | ||
2i2c: | ||
add_staff_user_ids_to_admin_users: true | ||
add_staff_user_ids_of_type: "google" | ||
jupyterhubConfigurator: | ||
enabled: false | ||
binderhubUI: | ||
enabled: true | ||
homepage: | ||
templateVars: | ||
org: | ||
name: Demo binderhub UI 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: "" | ||
url: "" | ||
singleuserAdmin: | ||
extraVolumeMounts: [] | ||
singleuser: | ||
storage: | ||
type: none | ||
extraVolumeMounts: [] | ||
initContainers: [] | ||
hub: | ||
redirectToServer: false | ||
services: | ||
binder: | ||
oauth_no_confirm: true | ||
oauth_redirect_uri: https://binderhub-ui-demo.2i2c.cloud/oauth_callback | ||
loadRoles: | ||
binder: | ||
services: | ||
- binder | ||
scopes: | ||
- servers | ||
- read:users # admin:users is required if authentication isn't enabled | ||
user: | ||
scopes: | ||
- self | ||
# Admin users will by default have access:services, so this is only | ||
# observed to be required for non-admin users. | ||
- access:services!service=binder | ||
config: | ||
BinderSpawnerMixin: | ||
auth_enabled: true | ||
JupyterHub: | ||
authenticator_class: cilogon | ||
CILogonOAuthenticator: | ||
oauth_callback_url: "https://hub.binderhub-ui-demo.2i2c.cloud/hub/oauth_callback" | ||
allowed_idps: | ||
http://google.com/accounts/o8/id: | ||
username_derivation: | ||
username_claim: "email" | ||
binderhub-service: | ||
enabled: true | ||
ingress: | ||
enabled: true | ||
hosts: | ||
- binderhub-ui-demo.2i2c.cloud | ||
tls: | ||
- secretName: binder-https-auto-tls | ||
hosts: | ||
- binderhub-ui-demo.2i2c.cloud | ||
config: | ||
BinderHub: | ||
base_url: / | ||
hub_url: https://hub.binderhub-ui-demo.2i2c.cloud | ||
badge_base_url: https://binderhub-ui-demo.2i2c.cloud | ||
auth_enabled: true | ||
enable_api_only_mode: false | ||
image_prefix: us-central1-docker.pkg.dev/two-eye-two-see/binderhub-ui-demo-registry/binderhub-service- | ||
extraConfig: | ||
# FIXME: set KubernetesBuildExecutor.push_secret again | ||
# without this for some reason the build pods | ||
# search after the wrong secret name (i.e. the default name) | ||
# set by binderhub in KubernetesBuildExecutor.push_secret | ||
01-binderhub-service-set-push-secret: | | ||
import os | ||
c.KubernetesBuildExecutor.push_secret = os.environ["PUSH_SECRET_NAME"] | ||
extraEnv: | ||
- name: JUPYTERHUB_API_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: '{{ include "jupyterhub.hub.fullname" . }}' | ||
key: hub.services.binder.apiToken | ||
- name: JUPYTERHUB_CLIENT_ID | ||
value: "service-binder" | ||
- name: JUPYTERHUB_API_URL | ||
value: "https://hub.binderhub-ui-demo.2i2c.cloud/hub/api" | ||
# Without this, the redirect URL to /hub/api/... gets | ||
# appended to binderhub's URL instead of the hub's | ||
- name: JUPYTERHUB_BASE_URL | ||
value: "https://hub.binderhub-ui-demo.2i2c.cloud/" | ||
- name: JUPYTERHUB_OAUTH_CALLBACK_URL | ||
value: "https://binderhub-ui-demo.2i2c.cloud/oauth_callback" | ||
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,14 @@ hubs: | |
- basehub-common.values.yaml | ||
- imagebuilding-demo.values.yaml | ||
- enc-imagebuilding-demo.secret.values.yaml | ||
- name: binderhub-ui-demo | ||
display_name: "2i2c Binderhub UI demo" | ||
domain: hub.binderhub-ui-demo-demo.2i2c.cloud | ||
helm_chart: basehub | ||
helm_chart_values_files: | ||
- basehub-common.values.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This just enables |
||
- binderhub-ui-demo.values.yaml | ||
- enc-binderhub-ui-demo.secret.values.yaml | ||
- name: demo | ||
display_name: "2i2c demo" | ||
domain: demo.2i2c.cloud | ||
|
23 changes: 23 additions & 0 deletions
23
config/clusters/2i2c/enc-binderhub-ui-demo.secret.values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
binderhub-service: | ||
buildPodsRegistryCredentials: | ||
password: ENC[AES256_GCM,data:oIqMepLt8hmsRTLhbZvDigfozMw9mIW4sYn+JWamN2k/HrQWq9OkAJr17UznADanwh4ClXwHMhjUTAf77HlpdHfnFReerIzvD+DscPnp3oFMIXU50Z2iZAUdz8PwOUm5UYk2/Tj8W/gi3bs/XJsPL4udI7GMn6T38d9NdExZKA98wb2Ka24rV5SnDAhLvMgCYCDvLgGZu7fqcv9UluavhN5T1bybDJcaOHQZePnbhB+QV1j/HHWy8AnwHjFoGd2ZiErzh9NF4nNhINVpgsWAo2VMZWbFrfqgrKylzDQpPEdkuEmFZI0WhFJHMXhKW4Ab0Pp+O7Agb9ol6LYpV4O8Ji+8FmtQp+09Ch8TsK9JjPAAVKRrx1upLhcCMzqvhJXagFSUPi625AOnxxtZ33VIFqTzIzNvhCab8BU5KDQ3RdJkaHHfs5N2I/+6F/YRQWkq3naz10pDVm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BOSRs4qgxA49dRT2AfyQV7RWW+qccWKopGSa2STsJfBeU/+fAFcEvejFwCYQsGG7RFOyxIR1DxI9cdI0o74agZtvZsIDij1bpmwoAh7kCjTPVNXY0LVzIGUKLAoZYfvEcGDTLHxRnrFoCnzycRvPxocK3nOsanehR+ZQUx94+Mtn378f1txtwL65G6HeKPk/M3QUAjBiypjXnvlG/Ea4TzvS6/iEBkr9HFx5fwaps2YQulnb8AtkVRFRw94V3g3KV/Zbl4NNdhAwWZc8Qxr99tQ3Wkmv7Fv2uJ0SihpcaEjjJPzZEkbD47khYpCgwfjKOId2ENNUj0PuUl1cl1x9cZgF+0cz2ySIYlFvRms9nufTQ8eczg2cV7lWZPNn53ZpNpFqrQ5/FcYmXGUSCXrsaHY+NP4KkCJmDRt0SLNBZPAa09I5WQUgx/qi07W20ApEu9jzyyG2WpMvId8OCbRJ7CYAEKjWbj4052sA6VsZMfWkBBzYK5PtdTmor9cPkt1Km4YwRMZkPFeciJxfFKIamtAY3/UCmpLOASc7H4QIl0bizLUpYxpORAUPdLGSATPiQqXzvvj,iv:O57KfiTHSPiNYyrN+rJG5weJdfsrZOUO0fyMHUuIKKk=,tag:GCvuufg1uyZw6DIg17rEdw==,type:str] | ||
jupyterhub: | ||
hub: | ||
config: | ||
CILogonOAuthenticator: | ||
client_id: ENC[AES256_GCM,data:tEZMVs9TkdzJaAqsbF+uNX2uwhTCnsuJnxcwJD3rSB0FXt481yze4Rs8t/5Ef/npccE=,iv:bJzGDmlZArcO3yfUO9mCQDDZI7jMDjeC66U7zvBWSKI=,tag:Xt8OKd/iFHik6a6QesR7wg==,type:str] | ||
client_secret: ENC[AES256_GCM,data:AwgZagRLArMGhZji3jon4YVjfblBmp3wyTmqvOFg7mZs5LMiFNrlnAtTQ8oqv5O4QQfyeMGZhustlnmmWMW9Vqtxkax3zljiPfAA0zfy/Ie4t0085Nw=,iv:vwPzC67oR7vzOHEyDMs2PDc19mRRPMkIjSDScT6M0Cc=,tag:imEiXTjo7KGB9Wl2G8eyMQ==,type:str] | ||
sops: | ||
kms: [] | ||
gcp_kms: | ||
- resource_id: projects/two-eye-two-see/locations/global/keyRings/sops-keys/cryptoKeys/similar-hubs | ||
created_at: "2023-09-18T19:00:41Z" | ||
enc: CiUA4OM7eFioG9yDgVwKtc0cYrU65GNcqMSDuUgnuXuq3KW9dRI6EkkAq2nhVV2TFrZOq5jktjMd4TQF1lwH/08tAyGd3vMfBmdd3Xdy3bAUUHhrPXcK6QabMRYdXPzQzgB+oBGaqOsJO7D7jT9NpeCn | ||
azure_kv: [] | ||
hc_vault: [] | ||
age: [] | ||
lastmodified: "2024-05-28T11:32:40Z" | ||
mac: ENC[AES256_GCM,data:DHS9gRya0PThBNrc+2ImEnzLLGIKGVpCkZIn70AjxgY5XTM8oPCChsF72n7b08BEDE6muncb/52Baqbi01nkmDJZLn/TAgIhMmJHmsFYyLxwAQ4IefKOWUtm+zYjRj8ybZxwV3ZItVnoyC9bS+PIC76+HFe8hmK2dzCPt44Sjbc=,iv:AGZy4gL5eb8C15JN+6xBlg7Dctt7DJGrwVytnrtgVMw=,tag:mlbhJCJljDunsXy5FM4B8Q==,type:str] | ||
pgp: [] | ||
unencrypted_suffix: _unencrypted | ||
version: 3.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,5 @@ hub_cloud_permissions = { | |
|
||
container_repos = [ | ||
"binder-staging", | ||
"binderhub-ui-demo" | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I have no idea what happened here. I tried investigated and started by removing this hack and checked again and this time it worked. Maybe there's something relevant that didn't get properly cleared during the redeploy?
Anyway, I will drop the commit that added this, but leaving this here for posterity in case there is indeed something going on:
This is what the build pod showed before this hack, yesterday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I work with binderhub, the
push_secret
config is a big confusion =/TL;DR - I was confused, and remain confused why you observed that.
Here are reasons for why its confusing observed in the last ~5 minutes looking:
push_secret
should be configured to a k8s secret name having aconfig.json
key providing a docker configuration including credentials to work against a registry (its not the typical k8s imagePullSecret or similar, its a docker client config)binder-build-docker-config
is a default value forpush_secret
, but its also hardcoded i the official BinderHub helm chart deployment, but in binderhub-service deployment it isn't hardcoded - insteadpush_secret
is set by aextraConfig
entry based on an env variable etc - we shouldn't touchpush_secret
config as users of binderhub-service I think.buildPodsRegistryCredentials
, but in the official chart its underconfig.BinderHub.buildDockerConfig
which is confusing because it isn't a traitlet for the Python classBinderHub
as expected if listed there.buildPodsRegistryCredentials
is updated - it only gets restarted if there is something in the pod spec that changes, such as an annotation providing a hash of the secret. I'll fix this. EDIT: nevermind what I wrote doesn't make sense I realize.