From c6e98ec0d356976b956fe153ef20d53df0e1fca2 Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Fri, 16 Aug 2019 13:55:01 -0700 Subject: [PATCH] Edit single node air gap docs --- .../config-rancher-for-private-reg/_index.md | 25 ++++++++++++++++--- .../install-rancher/_index.md | 8 +++--- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/content/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/_index.md b/content/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/_index.md index c72aac7ef59..2c132bd2492 100644 --- a/content/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/_index.md +++ b/content/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/_index.md @@ -4,13 +4,18 @@ weight: 400 aliases: --- -After your private registry is populated with all the required system images, you need to configure Rancher to use the private registry. The steps to configure the private registry are different depending on whether your private registry requires credentials. +After your private registry is populated with all the required system images, you need to configure Rancher to use the private registry. -If your private registry requires credentials, you need to pass the credentials to Rancher through the UI. +There are multiple ways to configure the private registry, depending on whether your private registry requires credentials: -# Configuring the Private Registry from the Rancher UI +- If your private registry requires credentials, you need to pass the credentials to Rancher by editing the cluster options for each cluster that needs them. +- If the private registry doesn't require credentials, you can configure it as a default registry through the **Settings** tab in the global view. ->**Note:** If you want to configure the setting when starting the rancher/rancher container, you can use the environment variable `CATTLE_SYSTEM_DEFAULT_REGISTRY`. +If your private registry requires credentials, it cannot be used as the default registry. There is no global way to set up a private registry with authorization for every Rancher-provisioned cluster. Therefore, if you want a Rancher-provisioned cluster to pull images from a private registry with credentials, you will have to [pass in the registry credentials through the advanced cluster options](#provisioning-clusters-with-private-registries-that-require-credentials) every time you create a new cluster. + +# Setting a Private Registry with No Credentials as the Default Registry + +>**Note:** If you want to set the default private registry when starting the rancher/rancher container, you can use the environment variable `CATTLE_SYSTEM_DEFAULT_REGISTRY`. 1. Log into Rancher and configure the default admin password. @@ -26,5 +31,17 @@ If your private registry requires credentials, you need to pass the credentials ![Save]({{< baseurl >}}/img/rancher/airgap/enter-system-default-registry.png) +**Result:** Rancher will use your private registry to pull system images. + +# Setting a Private Registry with Credentials when Provisioning a Cluster + +You can follow these steps to configure a private registry when you provision a cluster with Rancher: + +1. When you create a cluster through the Rancher UI, go to the **Cluster Options** section and click **Show Advanced Options.** +1. In the Enable Private Registries section, click **Enabled.** +1. Enter the registry URL and credentials. +1. Click **Save.** + +**Result:** The new cluster will be able to pull images from the private registry. ### [Next: Configure Rancher System Charts]({{< baseurl >}}/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-system-charts/) diff --git a/content/rancher/v2.x/en/installation/air-gap-single-node/install-rancher/_index.md b/content/rancher/v2.x/en/installation/air-gap-single-node/install-rancher/_index.md index bf50909cc44..5164e06241b 100644 --- a/content/rancher/v2.x/en/installation/air-gap-single-node/install-rancher/_index.md +++ b/content/rancher/v2.x/en/installation/air-gap-single-node/install-rancher/_index.md @@ -13,10 +13,8 @@ For security purposes, SSL (Secure Sockets Layer) is required when using Rancher >- Configure custom CA root certificate to access your services? See [Custom CA root certificate]({{< baseurl >}}/rancher/v2.x/en/admin-settings/custom-ca-root-certificate/). >- Record all transactions with the Rancher API? See [API Auditing]({{< baseurl >}}/rancher/v2.x/en/installation/single-node/#api-audit-log). - Choose from the following options: - {{% accordion id="option-a" label="Option A-Default Self-Signed Certificate" %}} If you are installing Rancher in a development or testing environment where identity verification isn't a concern, install Rancher using the self-signed certificate that it generates. This installation option omits the hassle of generating a certificate yourself. @@ -48,9 +46,11 @@ Placeholder | Description `` | The path to your full certificate chain. `` | The path to the private key for your certificate. `` | The path to the certificate authority's private key. -`` | Your private registry URL and port. +`` | Your private registry URL and port. This configures Rancher to use your private registry when starting the `rancher/rancher` container. `` | The release tag of the [Rancher version]({{< baseurl >}}/rancher/v2.x/en/installation/server-tags/) that you want to install. +If your private registry doesn't require credentials to pull images, you can set it as default when starting the rancher/rancher container by using the environment variable `CATTLE_SYSTEM_DEFAULT_REGISTRY`. + ``` docker run -d --restart=unless-stopped \ -p 80:80 -p 443:443 \ @@ -91,4 +91,4 @@ docker run -d --restart=unless-stopped \ {{% /accordion %}} -### [Next: Configure Rancher for the Private Registry]({{< baseurl >}}/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/) +### [Next: Configure Rancher for the Private Registry]({{< baseurl >}}/rancher/v2.x/en/installation/air-gap-single-node/config-rancher-for-private-reg/) \ No newline at end of file