|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * microshift/running_applications/microshift-deploy-with-mirror-registry.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="microshift-configuring-hosts-for-mirror_{context}"] |
| 7 | += Configuring hosts for mirror registry access |
| 8 | + |
| 9 | +To configure a {product-title} host to use a mirror registry, you must give the {product-title} host access to the registry by creating a configuration file that maps the Red Hat registry host names to the mirror. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | +* Your mirror host has access to the internet. |
| 13 | +* The mirror host can access the mirror registry. |
| 14 | +* You configured the mirror registry for use in your restricted network. |
| 15 | +* You downloaded the pull secret and modified it to include authentication to your mirror repository. |
| 16 | +
|
| 17 | +.Procedure |
| 18 | +. Log into your {product-title} host. |
| 19 | + |
| 20 | +. Enable the SSL certificate trust on any host accessing the mirror registry by completing the following steps: |
| 21 | + |
| 22 | +.. Copy the `rootCA.pem` file from the mirror registry, for example, `<registry_path>/quay-rootCA`, to the {product-title} host at the `/etc/pki/ca-trust/source/anchors` directory. |
| 23 | +.. Enable the certificate in the system-wide trust store configuration by running the following command: |
| 24 | ++ |
| 25 | +[source,terminal] |
| 26 | +---- |
| 27 | +$ sudo update-ca-trust |
| 28 | +---- |
| 29 | + |
| 30 | +. Create the `/etc/containers/registries.conf.d/999-microshift-mirror.conf` configuration file that maps the Red Hat registry host names to the mirror registry: |
| 31 | ++ |
| 32 | +.Example mirror configuration file |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +[[registry]] |
| 36 | + prefix = "" |
| 37 | + location = "<registry_host>:<port>" <1> |
| 38 | + mirror-by-digest-only = true |
| 39 | + insecure = false |
| 40 | + |
| 41 | +[[registry]] |
| 42 | + prefix = "" |
| 43 | + location = "quay.io" |
| 44 | + mirror-by-digest-only = true |
| 45 | +[[registry.mirror]] |
| 46 | + location = "<registry_host>:<port>" |
| 47 | + insecure = false |
| 48 | + |
| 49 | +[[registry]] |
| 50 | + prefix = "" |
| 51 | + location = "registry.redhat.io" |
| 52 | + mirror-by-digest-only = true |
| 53 | +[[registry.mirror]] |
| 54 | + location = "<registry_host>:<port>" |
| 55 | + insecure = false |
| 56 | + |
| 57 | +[[registry]] |
| 58 | + prefix = "" |
| 59 | + location = "registry.access.redhat.com" |
| 60 | + mirror-by-digest-only = true |
| 61 | +[[registry.mirror]] |
| 62 | + location = "<registry_host>:<port>" |
| 63 | + insecure = false |
| 64 | +---- |
| 65 | +<1> Replace `<registry_host>:<port>` with the host name and port of your mirror registry server, for example, `<microshift-quay:8443>`. |
| 66 | +
|
| 67 | +. Enable the {product-title} service by running the following command: |
| 68 | ++ |
| 69 | +[source,terminal] |
| 70 | +---- |
| 71 | +$ sudo systemctl enable microshift |
| 72 | +---- |
| 73 | +
|
| 74 | +. Reboot the host by running the following command: |
| 75 | ++ |
| 76 | +[source,terminal] |
| 77 | +---- |
| 78 | +$ sudo reboot |
| 79 | +---- |
0 commit comments