Merge pull request #912 from MBishop17/install-repo-cmds

ha helm chart repo instructions
This commit is contained in:
Denise
2018-10-18 13:02:24 -07:00
committed by GitHub
7 changed files with 78 additions and 46 deletions
@@ -9,26 +9,16 @@ This procedure describes how to use RKE to restore a snapshot of the Rancher Kub
## Restore Outline
1. [Preparation](#1-preparation)
<!-- TOC -->
Install utilities and create new or clean existing nodes to prepare for restore.
2. [Place Snapshot and PKI Bundle](#2-place-snapshot-and-pki-bundle)
Pick a node and place snapshot `.db` and `pki.bundle.tar.gz` files.
3. [Configure RKE](#3-configure-rke)
Configure RKE `cluster.yml`. Remove `addons:` section and point configuration to the clean nodes.
4. [Restore Database](#4-restore-database)
Run RKE command to restore the `etcd` database to a single node.
5. [Bring Up the Cluster](#5-bring-up-the-cluster)
Run RKE commands to bring up cluster one a single node. Clean up old nodes. Verify and add additional nodes.
- [1. Preparation](#1-preparation)
- [2. Place Snapshot and PKI Bundle](#2-place-snapshot-and-pki-bundle)
- [3. Configure RKE](#3-configure-rke)
- [4. Restore Database](#4-restore-database)
- [5. Bring Up the Cluster](#5-bring-up-the-cluster)
<!-- /TOC -->
<br/>
### 1. Preparation
@@ -80,9 +80,9 @@ Fetch and render the `helm` charts on a system that has internet access.
#### Cert-Manager
If you are installing Rancher with Rancher Self-Signed certificates you will need to install 'cert-manager' on your cluster. If you are installing your own certificates you may skip this section.
If you are installing Rancher with Rancher self-signed certificates you will need to install 'cert-manager' on your cluster. If you are installing your own certificates you may skip this section.
Fetch the latest `stable/cert-manager` chart. This will pull down the chart and save it in the current directory as a `.tgz` file.
Fetch the latest `cert-manager` chart from the [official Helm catalog](https://github.com/helm/charts/tree/master/stable).
```plain
helm fetch stable/cert-manager
@@ -98,16 +98,16 @@ helm template ./cert-manager-<version>.tgz --output-dir . \
#### Rancher
Install the Rancher chart repo.
Install the Rancher chart repo. Replace `<CHART_REPO>` with the [repository that you're using]({{< baseurl >}}/rancher/v2.x/en/installation/server-tags/#rancher-chart-repositories) ('latest' or 'stable').
```plain
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
helm repo add rancher-<CHART_REPO> https://releases.rancher.com/server-charts/<CHART_REPO>
```
Fetch the latest `rancher-stable/rancher` chart. This will pull down the chart and save it in the current directory as a `.tgz` file.
Fetch the latest Rancher chart. This will pull down the chart and save it in the current directory as a `.tgz` file. Replace `<CHART_REPO>` with the repo you're using (`latest` or `stable`).
```plain
helm fetch rancher-stable/rancher
helm fetch rancher-<CHART_REPO>/rancher
```
Render the template with the options you would use to install the chart. See [Install Rancher]({{< baseurl >}}/rancher/v2.x/en/installation/ha/helm-rancher/) for details on the various options. Remember to set the `rancherImage` option to pull the image from your private registry. This will create a `rancher` directory with the Kubernetes manifest files.
@@ -9,12 +9,17 @@ Rancher installation is now managed using the Helm package manager for Kubernete
### Add the Chart Repo
Use `helm repo add` to add the Rancher chart repository.
Use `helm repo add` command to add the Rancher chart repository.
Replace `<CHART_REPO>` with the chart repository that you want to use (either `latest` or `stable`).
>**Note:** For more information about each repository and which is best for your use case, see [Choosing a Version of Rancher: Rancher Chart Repositories]({{< baseurl >}}/rancher/v2.x/en/installation/server-tags/#rancher-chart-repositories).
```
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
helm repo add rancher-<CHART_REPO> https://releases.rancher.com/server-charts/<CHART_REPO>
```
## Chart Versioning Notes
Up until the initial helm chart release for v2.1.0, the helm chart version matched the Rancher version (i.e `appVersion`).
@@ -25,7 +30,7 @@ Run `helm search rancher` to view which Rancher version will be launched for the
```
NAME CHART VERSION APP VERSION DESCRIPTION
rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
rancher-latest/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
```
### Install cert-manager
@@ -34,7 +39,8 @@ rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Serve
Rancher relies on [cert-manager](https://github.com/kubernetes/charts/tree/master/stable/cert-manager) from the Kubernetes Helm stable catalog to issue self-signed or LetsEncrypt certificates.
Install `cert-manager` from the Helm stable catalog.
Install `cert-manager` from the [official Helm catalog](https://github.com/helm/charts/tree/master/stable).
```
helm install stable/cert-manager \
@@ -58,12 +64,12 @@ There are three options for the source of the certificate.
The default is for Rancher to generate a CA and use the `cert-manager` to issue the certificate for access to the Rancher server interface.
The only requirement is to set the `hostname` to the DNS name you pointed at your load balancer.
The only requirement is to set the `hostname` to the DNS name you pointed at your load balancer. Replace `<CHART_REPO>` with the repository that you configured in [Add the Chart Repo](#add-the-chart-repo) (`latest` or `stable`).
>**Using Air Gap?** [Set the `rancherImage` option]({{< baseurl >}}/rancher/v2.x/en/installation/air-gap-installation/install-rancher/#install-rancher-using-private-registry) in your command, pointing toward your private registry.
```
helm install rancher-stable/rancher \
helm install rancher-<CHART_REPO>/rancher \
--name rancher \
--namespace cattle-system \
--set hostname=rancher.my.org
@@ -73,12 +79,12 @@ helm install rancher-stable/rancher \
Use [LetsEncrypt](https://letsencrypt.org/)'s free service to issue trusted SSL certs. This configuration uses http validation so the Load Balancer must have a Public DNS record and be accessible from the internet.
Set `hostname`, `ingress.tls.source=letsEncrypt` and LetsEncrypt options.
Set `hostname`, `ingress.tls.source=letsEncrypt` and LetsEncrypt options. Replace `<CHART_REPO>` with the repository that you configured in [Add the Chart Repo](#add-the-chart-repo) (`latest` or `stable`).
>**Using Air Gap?** [Set the `rancherImage` option]({{< baseurl >}}/rancher/v2.x/en/installation/air-gap-installation/install-rancher/#install-rancher-using-private-registry) in your command, pointing toward your private registry.
```
helm install rancher-stable/rancher \
helm install rancher-<CHART_REPO>/rancher \
--name rancher \
--namespace cattle-system \
--set hostname=rancher.my.org \
@@ -92,12 +98,12 @@ Create Kubernetes secrets from your own certificates for Rancher to use.
> **Note:** The common name for the cert will need to match the `hostname` option or the ingress controller will fail to provision the site for Rancher.
Set `hostname` and `ingress.tls.source=secret`.
Set `hostname` and `ingress.tls.source=secret`. Replace `<CHART_REPO>` with the repository that you configured in [Add the Chart Repo](#add-the-chart-repo) (`latest` or `stable`).
> **Note:** If you are using a Private CA signed cert, add `--set privateCA=true`
```
helm install rancher-stable/rancher \
helm install rancher-<CHART_REPO>/rancher \
--name rancher \
--namespace cattle-system \
--set hostname=rancher.my.org \
@@ -1,13 +1,41 @@
---
title: Server Tags
title: Choosing a Version of Rancher
weight: 230
---
{{< product >}} Server is distributed as a Docker image, which have _tags_ attached to them. Tags are used to identify what version is included in the image. Rancher includes additional tags that point to a specific version. Remember that if you use the additional tags, you must explicitly pull a new version of that image tag. Otherwise it will use the cached image on the host.
You can find Rancher images at [DockerHub](https://hub.docker.com/r/rancher/rancher/tags/).
## Single Node Installs
- `rancher/rancher:latest`: Our latest development release. These builds are validated through our CI automation framework. These releases are not recommended for production environments.
When performing [single-node installs]({{< baseurl >}}/rancher/v2.x/en/installation/single-node), upgrades, or rollbacks, you can use _tags_ to install a specific version of Rancher.
- `rancher/rancher:stable`: Our newest stable release. This tag is recommended for production.
### Server Tags
The `master` tag or any tag with a `-rc` or another suffix is meant for the {{< product >}} testing team to validate. You should not use these tags, as these builds are not officially supported.
Rancher Server is distributed as a Docker image, which have tags attached to them. You can specify this tag when entering the command to deploy Rancher. Remember that if you use a tag without an explicit version (like `latest` or `stable`), you must explicitly pull a new version of that image tag. Otherwise any image cached on the host will be used.
| Tag | Description |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rancher/rancher:latest` | Our latest development release. These builds are validated through our CI automation framework. These releases are not recommended for production environments. |
| `rancher/rancher:stable` | Our newest stable release. This tag is recommended for production. |
| `rancher/rancher:<v2.X.X>` | You can install specific versions of Rancher by using the tag from a previous release. See what's available at DockerHub. |
<br/>
>**Note:** The `master` tag or any tag with `-rc` or another suffix is meant for the Rancher testing team to validate. You should not use these tags, as these builds are not officially supported.
## High Availability Installs
When installing, upgrading, or rolling back Rancher Server in a [high availability configuration]({{< baseurl >}}/rancher/v2.x/en/installation/ha), you can choose what repository from which to pull your Rancher images.
### Rancher Chart Repositories
In high availability Rancher configurations, Rancher Server is distributed by Helm chart. Therefore, as you prepare to install or upgrade a high availability Rancher configuration, you must configure a chart repository that contains Docker images for Rancher. You can install Rancher from two different repos:
Repository | Repo Configuration Command | Description
-----------|-----|-------------
`latest` | `helm repo add rancher-latest https://releases.rancher.com/server-charts/latest` | Adds a repository of Helm charts for the latest versions of Rancher. We recommend using this repo for testing out new Rancher builds.
`stable` | `helm repo add rancher-stable https://releases.rancher.com/server-charts/stable` | Adds a repository of Helm charts for older, stable versions of Rancher. We recommend using this repo for production environments.
<br/>
Instructions on when to make these configurations are available in [High Availability Install]({{< baseurl >}}/rancher/v2.x/en/installation/ha).
>**Important!**
>
>When _upgrading_ or _rolling back_ Rancher in a high availability configuration, you must use the same repository that you used during installation.
@@ -12,4 +12,4 @@ To restore Rancher follow the procedure detailed here: [Restoring Backups — Hi
Restoring a snapshot of the Rancher Server cluster will revert Rancher to the version and state at the time of the snapshot.
> **Note:** Managed cluster are authoritative for their state. This means restoring the rancher server will not revert workload deployments or changes made on managed clusters after the snapshot was taken.
>**Note:** Managed cluster are authoritative for their state. This means restoring the rancher server will not revert workload deployments or changes made on managed clusters after the snapshot was taken.
@@ -34,7 +34,7 @@ Run `helm search rancher` to view which Rancher version will be launched for the
```
NAME CHART VERSION APP VERSION DESCRIPTION
rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
rancher-latest/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
```
## Upgrade Rancher
@@ -45,14 +45,18 @@ rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Serve
helm repo update
```
1. Fetch the latest `rancher-stable/rancher` chart.
1. Fetch the latest Rancher Server chart from the helm repository that you used during installation.
This will pull down the chart and save it in the current directory as a `.tgz` file.
This command will pull down the chart and save it in the current directory as a `.tgz` file. Replace `<CHART_REPO>` with the name of the repository that you used during installation (either `stable` or `latest`).
>**Note:** During upgrades, you must fetch from the chart repo that you configured initial installation (either the `stable` or `latest` repository). For more information, see [Choosing a Version of Rancher: Rancher Chart Repositories]({{< baseurl >}}/rancher/v2.x/en/installation/server-tags/#rancher-chart-repositories).
```plain
helm fetch rancher-stable/rancher
helm fetch rancher-<CHART_REPO>/rancher
```
1. Render the upgrade template.
Use the same `--set` values you used for the install. Remember to set the `--is-upgrade` flag for `helm`. This will create a `rancher` directory with the Kubernetes manifest files.
@@ -46,9 +46,11 @@ Since there are times where the helm chart will require changes without any chan
Run `helm search rancher` to view which Rancher version will be launched for the specific helm chart version.
```
NAME CHART VERSION APP VERSION DESCRIPTION
rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
rancher-latest/rancher 2018.10.1 v2.1.0 Install Rancher Server to manage Kubernetes clusters acro...
```
## Upgrade Rancher
@@ -73,8 +75,10 @@ rancher-stable/rancher 2018.10.1 v2.1.0 Install Rancher Serve
3. Take all values from the previous command and use `helm` with `--set` options to upgrade Rancher to the latest version.
Replace `<CHART_REPO>` with the name of the repository that you used during installation (either `stable` or `latest`).
```
helm upgrade rancher rancher-stable/rancher --set hostname=rancher.my.org
helm upgrade rancher rancher-<CHART_REPO>/rancher --set hostname=rancher.my.org
```
> **Important:** For any values listed from Step 2, you must use `--set key=value` to apply the same values to the helm chart.