Update pull mirroring page to include UI changes

Edits
This commit is contained in:
Maria Bermudez 2018-11-02 09:17:07 -07:00
parent 854800fc7b
commit 7512816fdf
2 changed files with 35 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -5,24 +5,42 @@ keywords: registry, promotion, mirror
--- ---
Docker Trusted Registry allows you to set up a mirror of a repository by Docker Trusted Registry allows you to set up a mirror of a repository by
constantly polling it and pulling new images that get pushed into it. constantly polling it and pulling new image tags as they are pushed. This ensures your images are replicated across different registries for high availability. It also makes it easy to create a development pipeline that allows different
users access to a certain image without giving them access to everything in the remote registry.
This way you can ensure your images are persisted across different DTR
deployments for high availability.
It also makes it easy to create a development pipeline that allows different
users access to an image without having to grant them access to a DTR deployment
they should not have access to.
![pull mirror](../../images/pull-mirror-1.svg) ![pull mirror](../../images/pull-mirror-1.svg)
To mirror a repository, start by [creating a repository](../manage-images/index.md) To mirror a repository, start by [creating a repository](../manage-images/index.md)
in the DTR deployment that will serve as the mirror. in the DTR deployment that will serve as your mirror. Previously, you were only able to set up pull mirroring from the API. Starting in DTR 2.6, you can also mirror and pull from a remote DTR or Docker Hub repository.
Setting up a mirror is only available from the DTR API. ## Pull mirroring on the web interface
The easiest way to use the DTR API is to use the interactive documentation To get started:
that's available in the DTR web UI. In the left navigation bar of the
**DTR web UI**, click **API**. 1. Navigate to `https://<dtr-url>` and log in with your UCP credentials.
2. Select **Repositories** on the left navigation pane, and then click on the name of the repository that you want to view. Note that you will have to click on the repository name following the `/` after the specific namespace for your repository.
3. Select the **Mirrors** tab and click **New mirror policy**.
4. In the ***New Mirror*** page, specify the following details:
* Mirror direction: Choose "Pull from remote registry"
* Registry type: You can choose between **Docker Trusted Registry** and **Docker Hub**. If you choose DTR, enter your DTR URL. Otherwise, **Docker Hub** defaults to `https://index.docker.io`.
* Username and Password or access token: Your credentials in the remote repository you wish to poll from
* Repository: Enter the `namespace` and the `repository name after the `/`.
* Show advanced settings: Enter the TLS details for the remote repository or check `Skip TLS verification`.
![](../../images/pull-mirror-1.png){: .img-fluid .with-border}
5. Click **Connect**.
> Known Issues
>
> For issues related to pull mirroring, see [DTR 2.6.0 Release Notes](../../release-notes).
## Pull mirroring on the API
The easiest way to interact with the DTR API is to use the interactive documentation
available from the web interface. Click **API** from the bottom left navigation pane.
Search for the endpoint: Search for the endpoint:
@ -30,20 +48,17 @@ Search for the endpoint:
POST /api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies POST /api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies
``` ```
Click **Try it out** and fill-in the details. 'Namespace' and 'reponame' refer Click **Try it out** and enter your HTTP request details. `namespace` and `reponame` refer
to the repository that will be the mirror. to the repository that will be the mirror. The other fields refer to the remote repository to poll from and the credentials to use. As a best practice, use a service account just for this purpose. Instead of providing the password for that account, you should pass an
The other fields are the remote repository to poll from and the credentials
to use. As a best practice, use a service account just for this purpose. Instead
of providing the password for that account, you should pass a
[authentication token](../access-tokens.md) [authentication token](../access-tokens.md)
If the DTR deployment to mirror images from is using self-signed certificates or If the Docker Trusted or Hub registry to mirror images from is using self-signed certificates or
certificates signed by your own certificate authority, you also need to provide certificates signed by your own certificate authority, you also need to provide
the public key certificate for that certificate authority. the public key certificate for that certificate authority.
You can get it by accessing `https://<dtr-domain>/ca`. You can get it by accessing `https://<dtr-domain>/ca`.
Click **execute** and make sure you got an HTTP 201 response, signaling that the Click **Execute**. On success, the API returns an `HTTP 201` response. This means
the repository is polling the source repository every couple of minutes that the repository will be polling the source repository every couple of minutes.
## Where to go next ## Where to go next