Skip to content

Commit 5ebc2b9

Browse files
authored
Merge pull request #1960 from paololazzari/main
Document Artifact Registry usage
2 parents a64766b + 8cd9380 commit 5ebc2b9

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/source/zero-to-binderhub/setup-binderhub.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ need to insert. Note that the first line is not indented at all::
6060
"client_x509_cert_url": "<REPLACE>"
6161
}
6262

63+
If you are using Google Artifact Registry
64+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
66+
You do not need to do anything.
67+
6368
If you are using Docker Hub
6469
~~~~~~~~~~~~~~~~~~~~~~~~~~~
6570

@@ -179,6 +184,34 @@ your ``config.yaml`` file::
179184
* Note that in both cases, you should remove the ``<`` and ``>`` symbols,
180185
they are simply placeholders in the code above.
181186

187+
If you are using Google Artifact Registry
188+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
189+
190+
To configure BinderHub to use Google Artifact Registry, add the following to your `config.yaml` file::
191+
192+
config:
193+
BinderHub:
194+
use_registry: true
195+
image_prefix: <region>-docker.pkg.dev/<google-project-id>/<prefix>-
196+
registry_class: "binderhub.registry.GoogleArtifactRegistry"
197+
DockerRegistry:
198+
url: "https://<region>-docker.pkg.dev"
199+
token_url: "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/<service-account-name>/token"
200+
201+
.. note::
202+
203+
* ``<region>`` This is the region of the Artifact Registry repository, such
204+
as ``us-central1``.
205+
* ``<google-project-id>`` This is the project *ID*, which may be different
206+
from the project *name*.
207+
* ``<prefix>`` can be any string, and will be prepended to image names. We
208+
recommend something descriptive such as ``binder-dev-`` or ``binder-prod-``
209+
(ending with a `-` is useful).
210+
* ``<service-account-name>`` This is the name of the service account the
211+
node pool is configured to use.
212+
* Note that in all cases, you should remove the ``<`` and ``>`` symbols,
213+
they are simply placeholders in the code above.
214+
182215
If you are using Docker Hub
183216
~~~~~~~~~~~~~~~~~~~~~~~~~~~
184217

0 commit comments

Comments
 (0)