From ef6e2eecf6db1ef2570bbd5a882d65c43d0a08df Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Tue, 19 Dec 2023 13:58:23 -0800 Subject: [PATCH 1/9] Provide setup instructions for installing binderhub-service --- README.md | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ece995..64968e4 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,115 @@ The documentation should help configure the BinderHub service to: [persistent binderhub chart]: https://github.com/gesiscss/persistent_binderhub [was added]: https://github.com/jupyterhub/binderhub/pull/666 +## Installation + +1. Add the `binderhub-service` chart repository to helm: + + ```bash + helm repo add binderhub-service https://2i2c.org/binderhub-service + helm repo update + ``` + + Note this URL will change eventually, as binderhub-service is designed + to be a generic service, not something for use only by 2i2c. + +2. Install the latest development version of `binderhub-service` into a + namespace. + + ```bash + helm upgrade \ + --install \ + --create-namespace \ + --dev \ + --wait \ + --namespace + \ + binderhub-service/binderhub-service + ``` + + This sets up a binderhub service, but not in a publicly visible way. + +3. Test that it's running by port-forwarding to the correct pod: + + ```bash + kubectl -n port-forward $(kubectl -n get pod -l app.kubernetes.io/component=binderhub -o name) 8585:8585 + ``` + + This should forward requests on port 8585 on your localhost, to the binder service running inside the pod. So if you go + to [localhost:8585](http://localhost:8585), you should see a binder styled page that says 404. If you do, *success!*. + +4. Create a docker registry for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, + but you can use anything else as well. + +5. In your GCP project, [enable Google Artifact Registry](https://cloud.google.com/artifact-registry/docs/enable-service) if + you have not done so before. + +6. Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo) - make sure you are in + the correct project!). Give it a name (ideally same name you are using for + helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' + as the location and select the same region your kubernetes cluster is in. Hit "Create". + +7. Find the full path of the registry you just created, by opening it in the list + and looking for the small 'copy' icon next to the name of the registry. If you + hit it, it should copy something like `-docker.pkg.dev//`. + Save this. + +8. Create a Google Cloud Service Account that has permissions to push to this + registry ([via this URL] + (https://console.cloud.google.com/iam-admin/serviceaccounts/create) - make + sure you are in the correct project). Give it a name (same as the name you used + for the helm chart, but with a '-pusher' suffix) and click 'Create and Continue'. + In the next step, select 'Artifact Registry Writer' as a role. If you are in + an environment with multiple artifact registries, you may want to add a condition + here to restrict this service account's permissions. Click "Next". In the final + step, just click "Done". + +9. Now that the service account is created, find it in the list and open it. You will + find a tab named 'Keys' once the informational display opens - select that. Click + 'Add Key' -> 'Create New Key'. In the dialog box that pops up, select 'JSON' as the + key type and click 'Create'. This should download a key file. **Keep this file safe**! + +10. Now that we have the appropriate permissions, let's set up our configuration! Create a + new file named `binderhub-service-config.yaml` with the following contents: + + ```yaml + config: + BinderHub: + use_registry: true + image_prefix: /binder + buildPodsRegistryCredentials: + server: "https://-docker.pkg.dev" + username: "_json_key" + password: | + + ``` + + where: + 1. `` is what you copied from step 7 + 2. `` is the JSON file you downloaded in step 9. This is + a multi-line file - either indent it correctly to match up (the `|` allows multiline strings), + or simply edit the contents to be a single line. Since it is JSON, it does not matter. + 3. `` is the region your artifact registry was created in. + +11. Run a `helm upgrade` to use the new configuration you just created: + + ```bash + helm upgrade \ + --install \ + --create-namespace \ + --dev \ + --wait \ + --namespace + \ + binderhub-service/binderhub-service \ + -f binderhub-service-config.yaml + ``` + + This should set up binderhub with this custom config. If you run a `kubectl -n get pod`, + you will see that the binderhub pod has restarted - this confirms that the config has been set up! + ## Funding Funded in part by [GESIS](http://notebooks.gesis.org) in cooperation with NFDI4DS [460234259](https://gepris.dfg.de/gepris/projekt/460234259?context=projekt&task=showDetail&id=460234259&) -and [CESSDA](https://www.cessda.eu). +and [CESSDA](https://www.cessda.eu). \ No newline at end of file From df34156973f350b8c529550666a0723de514e815 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Tue, 19 Dec 2023 18:10:20 -0800 Subject: [PATCH 2/9] Add testing instructions --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 64968e4..3e4aa69 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ The documentation should help configure the BinderHub service to: BinderHub: use_registry: true image_prefix: /binder + # Temporarily enable the binderhub UI so we can test image building and pushing + enable_api_only_mode: false buildPodsRegistryCredentials: server: "https://-docker.pkg.dev" username: "_json_key" @@ -150,6 +152,31 @@ The documentation should help configure the BinderHub service to: This should set up binderhub with this custom config. If you run a `kubectl -n get pod`, you will see that the binderhub pod has restarted - this confirms that the config has been set up! +12. Let's verify that *image building and pushing* works. Access the binderhub pod by following the + same instructions as step 3. But this time, you should see a binderhub page very similar to that + on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying + out `binder-examples/requirements`. It might take a while to build, but you should be able to see + logs in the UI. It should succeed at *pushing* the github image, but will fail to launch. The last + lines in the log in the UI should look like: + + ``` + Successfully pushed europe-west10-docker.pkg.dev/binderhub-service-development/bh-service-test/binderbinder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943fBuilt image, launching... + Launching server... + Launch attempt 1 failed, retrying... + Launch attempt 2 failed, retrying... + ``` + + You can also go back to the Google Artifact Registry you created earlier to verify that the built + image is indeed there. + +13. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. + Remove the `config.BinderHub.enable_api_only_mode` configuration from the binderhub config, and redeploy + using the command from step 11. + +You now have a working binderhub-service! It's now time to deploy a [z2jh](https://z2jh.jupyter.org) JupyterHub +with [jupyterhub-fancy-profiles](https://github.com/yuvipanda/jupyterhub-fancy-profiles) installed. Instructions +for that are coming soon. + ## Funding Funded in part by [GESIS](http://notebooks.gesis.org) in cooperation with From 539d663f78fd0375370ac40fdbf088ee9f0c0542 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 02:12:30 +0000 Subject: [PATCH 3/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 3e4aa69..852120d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ The documentation should help configure the BinderHub service to: ``` This should forward requests on port 8585 on your localhost, to the binder service running inside the pod. So if you go - to [localhost:8585](http://localhost:8585), you should see a binder styled page that says 404. If you do, *success!*. + to [localhost:8585](http://localhost:8585), you should see a binder styled page that says 404. If you do, _success!_. 4. Create a docker registry for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, but you can use anything else as well. @@ -114,26 +114,23 @@ The documentation should help configure the BinderHub service to: 10. Now that we have the appropriate permissions, let's set up our configuration! Create a new file named `binderhub-service-config.yaml` with the following contents: - ```yaml - config: - BinderHub: - use_registry: true - image_prefix: /binder - # Temporarily enable the binderhub UI so we can test image building and pushing - enable_api_only_mode: false - buildPodsRegistryCredentials: - server: "https://-docker.pkg.dev" - username: "_json_key" - password: | - - ``` - - where: - 1. `` is what you copied from step 7 - 2. `` is the JSON file you downloaded in step 9. This is - a multi-line file - either indent it correctly to match up (the `|` allows multiline strings), - or simply edit the contents to be a single line. Since it is JSON, it does not matter. - 3. `` is the region your artifact registry was created in. +```yaml +config: + BinderHub: + use_registry: true + image_prefix: /binder + # Temporarily enable the binderhub UI so we can test image building and pushing + enable_api_only_mode: false +buildPodsRegistryCredentials: + server: "https://-docker.pkg.dev" + username: "_json_key" + password: | + +``` + +where: 1. `` is what you copied from step 7 2. `` is the JSON file you downloaded in step 9. This is +a multi-line file - either indent it correctly to match up (the `|` allows multiline strings), +or simply edit the contents to be a single line. Since it is JSON, it does not matter. 3. `` is the region your artifact registry was created in. 11. Run a `helm upgrade` to use the new configuration you just created: @@ -152,11 +149,11 @@ The documentation should help configure the BinderHub service to: This should set up binderhub with this custom config. If you run a `kubectl -n get pod`, you will see that the binderhub pod has restarted - this confirms that the config has been set up! -12. Let's verify that *image building and pushing* works. Access the binderhub pod by following the +12. Let's verify that _image building and pushing_ works. Access the binderhub pod by following the same instructions as step 3. But this time, you should see a binderhub page very similar to that on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying out `binder-examples/requirements`. It might take a while to build, but you should be able to see - logs in the UI. It should succeed at *pushing* the github image, but will fail to launch. The last + logs in the UI. It should succeed at _pushing_ the github image, but will fail to launch. The last lines in the log in the UI should look like: ``` @@ -181,4 +178,4 @@ for that are coming soon. Funded in part by [GESIS](http://notebooks.gesis.org) in cooperation with NFDI4DS [460234259](https://gepris.dfg.de/gepris/projekt/460234259?context=projekt&task=showDetail&id=460234259&) -and [CESSDA](https://www.cessda.eu). \ No newline at end of file +and [CESSDA](https://www.cessda.eu). From dc22ee078502707c5d6323b9bb954ba78d177a4b Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 09:11:10 -0800 Subject: [PATCH 4/9] Cleanup registry / repository confusion --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 852120d..e4fb07f 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ The documentation should help configure the BinderHub service to: This should forward requests on port 8585 on your localhost, to the binder service running inside the pod. So if you go to [localhost:8585](http://localhost:8585), you should see a binder styled page that says 404. If you do, _success!_. -4. Create a docker registry for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, +4. Create a docker repository for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, but you can use anything else as well. 5. In your GCP project, [enable Google Artifact Registry](https://cloud.google.com/artifact-registry/docs/enable-service) if @@ -91,13 +91,13 @@ The documentation should help configure the BinderHub service to: helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' as the location and select the same region your kubernetes cluster is in. Hit "Create". -7. Find the full path of the registry you just created, by opening it in the list - and looking for the small 'copy' icon next to the name of the registry. If you - hit it, it should copy something like `-docker.pkg.dev//`. +7. Find the full path of the repository you just created, by opening it in the list + and looking for the small 'copy' icon next to the name of the repository. If you + hit it, it should copy something like `-docker.pkg.dev//`. Save this. 8. Create a Google Cloud Service Account that has permissions to push to this - registry ([via this URL] + repository ([via this URL] (https://console.cloud.google.com/iam-admin/serviceaccounts/create) - make sure you are in the correct project). Give it a name (same as the name you used for the helm chart, but with a '-pusher' suffix) and click 'Create and Continue'. @@ -118,7 +118,7 @@ The documentation should help configure the BinderHub service to: config: BinderHub: use_registry: true - image_prefix: /binder + image_prefix: /binder # Temporarily enable the binderhub UI so we can test image building and pushing enable_api_only_mode: false buildPodsRegistryCredentials: @@ -128,9 +128,9 @@ buildPodsRegistryCredentials: ``` -where: 1. `` is what you copied from step 7 2. `` is the JSON file you downloaded in step 9. This is +where: 1. `` is what you copied from step 7 2. `` is the JSON file you downloaded in step 9. This is a multi-line file - either indent it correctly to match up (the `|` allows multiline strings), -or simply edit the contents to be a single line. Since it is JSON, it does not matter. 3. `` is the region your artifact registry was created in. +or simply edit the contents to be a single line. Since it is JSON, it does not matter. 3. `` is the region your artifact repository was created in. 11. Run a `helm upgrade` to use the new configuration you just created: @@ -163,7 +163,7 @@ or simply edit the contents to be a single line. Since it is JSON, it does not m Launch attempt 2 failed, retrying... ``` - You can also go back to the Google Artifact Registry you created earlier to verify that the built + You can also go back to the Google Artifact Registry repository you created earlier to verify that the built image is indeed there. 13. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. From e7ebc9acb23c49bf37e4bdf3bbc37a732075064a Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 12:46:25 -0800 Subject: [PATCH 5/9] Clarifications to the installation document Worked through these with @simaattar2003 and made these changes. Co-authored-by: simaattar2003 --- README.md | 152 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 79 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index e4fb07f..e2ce6d0 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ The documentation should help configure the BinderHub service to: helm upgrade \ --install \ --create-namespace \ - --dev \ + --devel \ --wait \ --namespace \ @@ -81,94 +81,100 @@ The documentation should help configure the BinderHub service to: to [localhost:8585](http://localhost:8585), you should see a binder styled page that says 404. If you do, _success!_. 4. Create a docker repository for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, - but you can use anything else as well. + but binderhub supports using other registries. -5. In your GCP project, [enable Google Artifact Registry](https://cloud.google.com/artifact-registry/docs/enable-service) if - you have not done so before. + Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo). Make sure you're in the correct project (look at the drop + down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. -6. Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo) - make sure you are in - the correct project!). Give it a name (ideally same name you are using for - helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' - as the location and select the same region your kubernetes cluster is in. Hit "Create". + In the repository creation page, give it a name (ideally same name you are using for + helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' + as the location type and select the same region your kubernetes cluster is in. The + settings about encryption and other options can be left in their default. Hit "Create". -7. Find the full path of the repository you just created, by opening it in the list +5. Find the full path of the repository you just created, by opening it in the list and looking for the small 'copy' icon next to the name of the repository. If you hit it, it should copy something like `-docker.pkg.dev//`. Save this. -8. Create a Google Cloud Service Account that has permissions to push to this +6. Create a Google Cloud Service Account that has permissions to push to this repository ([via this URL] (https://console.cloud.google.com/iam-admin/serviceaccounts/create) - make - sure you are in the correct project). Give it a name (same as the name you used + sure you are in the correct project again). You may also need appropriate permissions to set this up. Give it a name (same as the name you used for the helm chart, but with a '-pusher' suffix) and click 'Create and Continue'. - In the next step, select 'Artifact Registry Writer' as a role. If you are in - an environment with multiple artifact registries, you may want to add a condition - here to restrict this service account's permissions. Click "Next". In the final - step, just click "Done". + In the next step, select 'Artifact Registry Writer' as a role. Click "Next". In the final step, just click "Done". -9. Now that the service account is created, find it in the list and open it. You will +7. Now that the service account is created, find it in the list and open it. You will find a tab named 'Keys' once the informational display opens - select that. Click 'Add Key' -> 'Create New Key'. In the dialog box that pops up, select 'JSON' as the key type and click 'Create'. This should download a key file. **Keep this file safe**! -10. Now that we have the appropriate permissions, let's set up our configuration! Create a - new file named `binderhub-service-config.yaml` with the following contents: - -```yaml -config: - BinderHub: - use_registry: true - image_prefix: /binder - # Temporarily enable the binderhub UI so we can test image building and pushing - enable_api_only_mode: false -buildPodsRegistryCredentials: - server: "https://-docker.pkg.dev" - username: "_json_key" - password: | - -``` - -where: 1. `` is what you copied from step 7 2. `` is the JSON file you downloaded in step 9. This is -a multi-line file - either indent it correctly to match up (the `|` allows multiline strings), -or simply edit the contents to be a single line. Since it is JSON, it does not matter. 3. `` is the region your artifact repository was created in. - -11. Run a `helm upgrade` to use the new configuration you just created: - - ```bash - helm upgrade \ - --install \ - --create-namespace \ - --dev \ - --wait \ - --namespace - \ - binderhub-service/binderhub-service \ - -f binderhub-service-config.yaml - ``` - - This should set up binderhub with this custom config. If you run a `kubectl -n get pod`, - you will see that the binderhub pod has restarted - this confirms that the config has been set up! - -12. Let's verify that _image building and pushing_ works. Access the binderhub pod by following the - same instructions as step 3. But this time, you should see a binderhub page very similar to that - on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying - out `binder-examples/requirements`. It might take a while to build, but you should be able to see - logs in the UI. It should succeed at _pushing_ the github image, but will fail to launch. The last - lines in the log in the UI should look like: - - ``` - Successfully pushed europe-west10-docker.pkg.dev/binderhub-service-development/bh-service-test/binderbinder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943fBuilt image, launching... - Launching server... - Launch attempt 1 failed, retrying... - Launch attempt 2 failed, retrying... - ``` - - You can also go back to the Google Artifact Registry repository you created earlier to verify that the built - image is indeed there. - -13. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. +8. Now that we have the appropriate permissions, let's set up our configuration! Create a + new file named `binderhub-service-config.yaml` with the following contents: + + ```yaml + config: + BinderHub: + use_registry: true + image_prefix: /binder + # Temporarily enable the binderhub UI so we can test image building and pushing + enable_api_only_mode: false + buildPodsRegistryCredentials: + server: "https://-docker.pkg.dev" + username: "_json_key" + password: | + + ``` + + where: + + 1. `` is what you copied from step 5. + + 2. `` is the JSON file you downloaded in step 7. + This is a multi-line file - either indent it correctly to match up (the `|` + allows multiline strings), + or simply edit the contents to be a single line. Since it is JSON, + it does not matter. + + 3. `` is the region your artifact repository was created in. You can see + this in the first part of `` as well. + +9. Run a `helm upgrade` to use the new configuration you just created: + + ```bash + helm upgrade \ + --install \ + --create-namespace \ + --devel \ + --wait \ + --namespace + \ + binderhub-service/binderhub-service \ + -f binderhub-service-config.yaml + ``` + + This should set up binderhub with this custom config. If you run a `kubectl -n get pod`, + you will see that the binderhub pod has restarted - this confirms that the config has been set up! + +10. Let's verify that _image building and pushing_ works. Access the binderhub pod by following the + same instructions as step 3. But this time, you should see a binderhub page very similar to that + on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying + out `binder-examples/requirements`. It might take a while to build, but you should be able to see + logs in the UI. It should succeed at _pushing_ the github image, but will fail to launch. The last + lines in the log in the UI should look like: + + ``` + Successfully pushed europe-west10-docker.pkg.dev/binderhub-service-development/bh-service-test/binderbinder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943fBuilt image, launching... + Launching server... + Launch attempt 1 failed, retrying... + Launch attempt 2 failed, retrying... + ``` + + You can also go back to the Google Artifact Registry repository you created earlier to verify that the built + image is indeed there. + +12. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. Remove the `config.BinderHub.enable_api_only_mode` configuration from the binderhub config, and redeploy - using the command from step 11. + using the command from step 9. You now have a working binderhub-service! It's now time to deploy a [z2jh](https://z2jh.jupyter.org) JupyterHub with [jupyterhub-fancy-profiles](https://github.com/yuvipanda/jupyterhub-fancy-profiles) installed. Instructions From 51915c85f8ac58f2869a9ffd94881c6a1ccd48f5 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 12:51:07 -0800 Subject: [PATCH 6/9] Fix wrong indent --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2ce6d0..ca6028d 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ The documentation should help configure the BinderHub service to: username: "_json_key" password: | - ``` + ``` where: From 0afa27d38324f70432aaca8d6ec3db9e8f6c4ef0 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 12:54:43 -0800 Subject: [PATCH 7/9] Fix more indents --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index ca6028d..92381a3 100644 --- a/README.md +++ b/README.md @@ -83,13 +83,13 @@ The documentation should help configure the BinderHub service to: 4. Create a docker repository for binderhub to push built images to. In this tutorial, we will be using Google Artifact Registry, but binderhub supports using other registries. - Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo). Make sure you're in the correct project (look at the drop - down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. + Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo). Make sure you're in the correct project (look at the drop + down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. - In the repository creation page, give it a name (ideally same name you are using for - helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' - as the location type and select the same region your kubernetes cluster is in. The - settings about encryption and other options can be left in their default. Hit "Create". + In the repository creation page, give it a name (ideally same name you are using for + helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' + as the location type and select the same region your kubernetes cluster is in. The + settings about encryption and other options can be left in their default. Hit "Create". 5. Find the full path of the repository you just created, by opening it in the list and looking for the small 'copy' icon next to the name of the repository. If you @@ -156,21 +156,21 @@ The documentation should help configure the BinderHub service to: you will see that the binderhub pod has restarted - this confirms that the config has been set up! 10. Let's verify that _image building and pushing_ works. Access the binderhub pod by following the - same instructions as step 3. But this time, you should see a binderhub page very similar to that - on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying - out `binder-examples/requirements`. It might take a while to build, but you should be able to see - logs in the UI. It should succeed at _pushing_ the github image, but will fail to launch. The last - lines in the log in the UI should look like: - - ``` - Successfully pushed europe-west10-docker.pkg.dev/binderhub-service-development/bh-service-test/binderbinder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943fBuilt image, launching... - Launching server... - Launch attempt 1 failed, retrying... - Launch attempt 2 failed, retrying... - ``` - - You can also go back to the Google Artifact Registry repository you created earlier to verify that the built - image is indeed there. + same instructions as step 3. But this time, you should see a binderhub page very similar to that + on [mybinder.org](https://mybinder.org). You can test build a repository here - I recommend trying + out `binder-examples/requirements`. It might take a while to build, but you should be able to see + logs in the UI. It should succeed at _pushing_ the github image, but will fail to launch. The last + lines in the log in the UI should look like: + + ``` + Successfully pushed europe-west10-docker.pkg.dev/binderhub-service-development/bh-service-test/binderbinder-2dexamples-2drequirements-55ab5c:50533eb470ee6c24e872043d30b2fee463d6943fBuilt image, launching... + Launching server... + Launch attempt 1 failed, retrying... + Launch attempt 2 failed, retrying... + ``` + + You can also go back to the Google Artifact Registry repository you created earlier to verify that the built + image is indeed there. 12. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. Remove the `config.BinderHub.enable_api_only_mode` configuration from the binderhub config, and redeploy From 1b269d5d49b750c6762c6c4cfe35781ff87844eb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:55:27 +0000 Subject: [PATCH 8/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 92381a3..6176779 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ The documentation should help configure the BinderHub service to: but binderhub supports using other registries. Create a new Artifact Registry ([via this URL](https://console.cloud.google.com/artifacts/create-repo). Make sure you're in the correct project (look at the drop - down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. + down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. In the repository creation page, give it a name (ideally same name you are using for helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' @@ -130,10 +130,10 @@ The documentation should help configure the BinderHub service to: 1. `` is what you copied from step 5. 2. `` is the JSON file you downloaded in step 7. - This is a multi-line file - either indent it correctly to match up (the `|` - allows multiline strings), - or simply edit the contents to be a single line. Since it is JSON, - it does not matter. + This is a multi-line file - either indent it correctly to match up (the `|` + allows multiline strings), + or simply edit the contents to be a single line. Since it is JSON, + it does not matter. 3. `` is the region your artifact repository was created in. You can see this in the first part of `` as well. @@ -172,7 +172,7 @@ The documentation should help configure the BinderHub service to: You can also go back to the Google Artifact Registry repository you created earlier to verify that the built image is indeed there. -12. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. +11. Now that we have verified this is working, we can disable the binderhub UI as we will not be using it. Remove the `config.BinderHub.enable_api_only_mode` configuration from the binderhub config, and redeploy using the command from step 9. From ae6fdab1dd33b3611351d7a29edecfcfd6c1c9f3 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Tue, 16 Jan 2024 13:17:01 -0800 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Erik Sundell --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6176779..ef3d8e3 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ The documentation should help configure the BinderHub service to: down in the top bar). If this is the first time you are using Artifact Registry, it may ask you to enable the service. In the repository creation page, give it a name (ideally same name you are using for - helm chart), select 'Docker' as the format, 'Standard' as the mode, 'Region' + dedicated to the chart installation), select 'Docker' as the format, 'Standard' as the mode, 'Region' as the location type and select the same region your kubernetes cluster is in. The settings about encryption and other options can be left in their default. Hit "Create". @@ -100,7 +100,7 @@ The documentation should help configure the BinderHub service to: repository ([via this URL] (https://console.cloud.google.com/iam-admin/serviceaccounts/create) - make sure you are in the correct project again). You may also need appropriate permissions to set this up. Give it a name (same as the name you used - for the helm chart, but with a '-pusher' suffix) and click 'Create and Continue'. + for the chart installation, but with a '-pusher' suffix) and click 'Create and Continue'. In the next step, select 'Artifact Registry Writer' as a role. Click "Next". In the final step, just click "Done". 7. Now that the service account is created, find it in the list and open it. You will @@ -149,7 +149,7 @@ The documentation should help configure the BinderHub service to: --namespace \ binderhub-service/binderhub-service \ - -f binderhub-service-config.yaml + --values binderhub-service-config.yaml ``` This should set up binderhub with this custom config. If you run a `kubectl -n get pod`,