Skip to content

Commit 030b435

Browse files
authored
Merge pull request #1122 from jtpio/ovh-registry-docs
2 parents c6687f4 + 4b787bd commit 030b435

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed
30.9 KB
Loading
31.7 KB
Loading

doc/zero-to-binderhub/setup-binderhub.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,23 @@ where:
116116
* `<SERVICE_PRINCIPAL_ID>` is the AppID of the Service Principal with AcrPush role assignment,
117117
* `<SERVICE_PRINCIPAL_PASSWORD>` is the password for the Service Principal.
118118

119+
If you are using OVH Container Registry
120+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121+
122+
Update `secret.yaml` to include the following::
123+
124+
registry:
125+
url: https://<hash>.<region>.container-registry.ovh.net
126+
username: <harbor-username>
127+
password: <harbor-password>
128+
129+
where:
130+
131+
* `<hash>` is the hash of the registry
132+
* `<region>` is the region of the registry
133+
* `<harbor-username>` is the Harbor username
134+
* `<harbor-password>` is the Harbor password
135+
119136
Create ``config.yaml``
120137
----------------------
121138

@@ -183,6 +200,37 @@ where:
183200
If this is not provided, you may find BinderHub rebuilds images every launch instead of pulling them from the ACR.
184201
Suggestions for `<project-name>` could be `ACR_NAME` or the name you give your BinderHub.
185202

203+
If you are using OVH Container Registry
204+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205+
206+
If you want your BinderHub to push and pull images from an OVH Container Registry, then the `config.yaml` file will look the following::
207+
208+
config:
209+
BinderHub:
210+
use_registry: true
211+
image_prefix: <hash>.<region>.container-registry.ovh.net/<prefix>-
212+
DockerRegistry:
213+
url: https://<hash>.<region>.container-registry.ovh.net
214+
token_url: https://<hash>.<region>.container-registry.ovh.net/service/token?service=harbor-registry
215+
216+
where:
217+
218+
* `<hash>` is the hash of the registry
219+
* `<region>` is the region of the registry
220+
* `<prefix>` corresponds to the image prefix. If you created a new project called ``myproject`` in the previous section,
221+
then ``<prefix>`` should start with ``myproject/``
222+
223+
As an example, the config should look like the following::
224+
225+
config:
226+
BinderHub:
227+
use_registry: true
228+
image_prefix: abcde.gra7.container-registry.ovh.net/myproject/binder-
229+
DockerRegistry:
230+
url: https://abcde.gra7.container-registry.ovh.net
231+
token_url: https://abcde.gra7.container-registry.ovh.net/service/token?service=harbor-registry
232+
233+
186234
If you are using a custom registry
187235
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188236

doc/zero-to-binderhub/setup-registry.rst

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BinderHub will build Docker images out of Git repositories, and then push
77
them to a Docker registry so that JupyterHub can launch user servers based
88
on these images. You can use any registry that
99
you like, though this guide covers how to properly configure several popular
10-
registries. The next step, :doc:`setup-binderhub`, explains how you can
10+
registries. The next step, :doc:`setup-binderhub`, explains how you can
1111
properly configure BinderHub to use one of these registries.
1212

1313
.. _use-gcr:
@@ -137,6 +137,36 @@ where:
137137
SERVICE_PRINCIPAL_PASSWORD=$(az ad sp create-for-rbac --name <SP_NAME> --role AcrPush --scopes <ACR_ID> --query password --output tsv)
138138
SERVICE_PRINCIPAL_ID=$(az ad sp show --id http://<SP_NAME> --query appId --output tsv)
139139

140+
Set up the OVH Container Registry
141+
---------------------------------
142+
143+
To use the OVH Container Registry, log in to the `OVH Control Panel <https://www.ovh.com/manager/public-cloud>`_.
144+
145+
1. Click on **Managed Private Registry**
146+
147+
2. Click on the **Create a private registry** button
148+
149+
3. Select a **Region**, a **Name** for the registry and a **Plan**.
150+
151+
4. Generate the **Harbor identification details** to connect to the registry
152+
153+
.. figure:: ovh/generate_id_details.png
154+
155+
Generate the identification details to connect to
156+
the registry.
157+
158+
5. Then click on **Harbor API** to retrieve the URL of the registry
159+
160+
6. Log in to the Harbor Interface using the identification details, and create a new project:
161+
162+
.. figure:: ovh/new_project.png
163+
164+
Create a new Harbor project.
165+
166+
7. The name of the project will be used when setting up the registry config in the next section
167+
168+
For more information about these steps, check out the `OVH Documentation <https://docs.ovh.com/gb/en/private-registry/creating-a-private-registry>`_
169+
140170
Next step
141171
---------
142172

0 commit comments

Comments
 (0)