Skip to content

Commit

Permalink
Convert all helm-template instructions to helm-install (#828)
Browse files Browse the repository at this point in the history
* Adjust command to install cert-manager

The directory `cert-manager` is not created when using `helm install`
instead of `helm template --output-dir .`.

Also, the CRDs are downloaded in the current directory, so adjust the
commands as well.

* Convert helm template to helm upgrade/install

Since we're using Helm hooks, we cannot use `helm template`, otherwise
things will break. The commands are updated to use `helm install` and
`helm upgrade`.
  • Loading branch information
tomleb authored Sep 13, 2023
1 parent 7922b74 commit f6a7012
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 84 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Rendering the Helm Template in an Air-Gapped Environment
title: Upgrading in an Air-Gapped Environment
---

<head>
Expand All @@ -12,9 +12,9 @@ These instructions assume you have already followed the instructions for a Kuber

:::

### Rancher Helm Template Options
### Rancher Helm Upgrade Options

Render the Rancher template using the same chosen options that were used when installing Rancher. Use the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.
To upgrade with Helm, apply the same options that you used when installing Rancher. Refer to the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.

Based on the choice you made during installation, complete one of the procedures below.

Expand All @@ -29,8 +29,7 @@ Placeholder | Description
### Option A: Default Self-signed Certificate

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set certmanager.version=<CERTMANAGER_VERSION> \
Expand All @@ -42,8 +41,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
### Option B: Certificates from Files using Kubernetes Secrets

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -55,8 +53,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
If you are using a Private CA signed cert, add `--set privateCA=true` following `--set ingress.tls.source=secret`:

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -66,16 +63,6 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--set useBundledSystemChart=true # Use the packaged Rancher system charts
```

### Apply the Rendered Templates

Copy the rendered manifest directories to a system with access to the Rancher server cluster and apply the rendered templates.

Use `kubectl` to apply the rendered manifests.

```plain
kubectl -n cattle-system apply -R -f ./rancher
```

## Verify the Upgrade

Log into Rancher to confirm that the upgrade succeeded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Copy the fetched charts to a system that has access to the Rancher server cluste

##### 1. Install Cert-Manager

Install cert-manager with the options you would like to use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry. This will create a `cert-manager` directory with the Kubernetes manifest files.
Install cert-manager with the same options you would use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry.

:::note

Expand All @@ -144,7 +144,7 @@ If you are using self-signed certificates, install cert-manager:
2. Create the cert-manager CustomResourceDefinitions (CRDs).

```plain
kubectl apply -f cert-manager/cert-manager-crd.yaml
kubectl apply -f cert-manager-crd.yaml
```

3. Install cert-manager.
Expand Down
11 changes: 4 additions & 7 deletions docs/pages-for-subheaders/enable-experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ If you are installing an alpha version, Helm requires adding the `--devel` optio

:::

### Rendering the Helm Chart for Air Gap Installations
### Enabling Features for Air Gap Installs

For an air gap installation of Rancher, you need to add a Helm chart repository and render a Helm template before installing Rancher with Helm. For details, refer to the [air gap installation documentation.](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md)
To perform an [air gap installation of Rancher](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md), add a Helm chart repository and download a Helm chart, then install Rancher with Helm.

Here is an example of a command for passing in the feature flag names when rendering the Helm template. In the below example, two features are enabled by passing the feature flag names in a comma separated list.

The Helm command is as follows:
When you install the Helm chart, you should pass in feature flag names in a comma separated list, as in the following example:

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm install rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Rendering the Helm Template in an Air-Gapped Environment
title: Upgrading in an Air-Gapped Environment
---

<head>
Expand All @@ -12,9 +12,9 @@ These instructions assume you have already followed the instructions for a Kuber

:::

### Rancher Helm Template Options
### Rancher Helm Upgrade Options

Render the Rancher template using the same chosen options that were used when installing Rancher. Use the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.
To upgrade with Helm, apply the same options that you used when installing Rancher. Refer to the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.

Based on the choice you made during installation, complete one of the procedures below.

Expand All @@ -29,8 +29,7 @@ Placeholder | Description
### Option A: Default Self-signed Certificate

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set certmanager.version=<CERTMANAGER_VERSION> \
Expand All @@ -42,8 +41,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
### Option B: Certificates from Files using Kubernetes Secrets

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -55,8 +53,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
If you are using a Private CA signed cert, add `--set privateCA=true` following `--set ingress.tls.source=secret`:

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -66,16 +63,6 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--set useBundledSystemChart=true # Use the packaged Rancher system charts
```

### Apply the Rendered Templates

Copy the rendered manifest directories to a system with access to the Rancher server cluster and apply the rendered templates.

Use `kubectl` to apply the rendered manifests.

```plain
kubectl -n cattle-system apply -R -f ./rancher
```

## Verify the Upgrade

Log into Rancher to confirm that the upgrade succeeded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Copy the fetched charts to a system that has access to the Rancher server cluste

##### 1. Install Cert-Manager

Install cert-manager with the options you would like to use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry. This will create a `cert-manager` directory with the Kubernetes manifest files.
Install cert-manager with the same options you would use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry.

:::note

Expand All @@ -139,7 +139,7 @@ If you are using self-signed certificates, install cert-manager:
2. Create the cert-manager CustomResourceDefinitions (CRDs).

```plain
kubectl apply -f cert-manager/cert-manager-crd.yaml
kubectl apply -f cert-manager-crd.yaml
```

3. Install cert-manager.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,14 @@ If you are installing an alpha version, Helm requires adding the `--devel` optio

:::

### Rendering the Helm Chart for Air Gap Installations
### Enabling Features for Air Gap Installs

For an air gap installation of Rancher, you need to add a Helm chart repository and render a Helm template before installing Rancher with Helm. For details, refer to the [air gap installation documentation.](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md)
To perform an [air gap installation of Rancher](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md), add a Helm chart repository and download a Helm chart, then install Rancher with Helm.

Here is an example of a command for passing in the feature flag names when rendering the Helm template. In the below example, two features are enabled by passing the feature flag names in a comma separated list.

The Helm command is as follows:
When you install the Helm chart, you should pass in feature flag names in a comma separated list, as in the following example:

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm install rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Rendering the Helm Template in an Air-Gapped Environment
title: Upgrading in an Air-Gapped Environment
---

<head>
Expand All @@ -12,9 +12,9 @@ These instructions assume you have already followed the instructions for a Kuber

:::

### Rancher Helm Template Options
### Rancher Helm Upgrade Options

Render the Rancher template using the same chosen options that were used when installing Rancher. Use the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.
To upgrade with Helm, apply the same options that you used when installing Rancher. Refer to the reference table below to replace each placeholder. Rancher needs to be configured to use the private registry in order to provision any Rancher launched Kubernetes clusters or Rancher tools.

Based on the choice you made during installation, complete one of the procedures below.

Expand All @@ -29,8 +29,7 @@ Placeholder | Description
### Option A: Default Self-signed Certificate

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set certmanager.version=<CERTMANAGER_VERSION> \
Expand All @@ -42,8 +41,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
### Option B: Certificates from Files using Kubernetes Secrets

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -55,8 +53,7 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
If you are using a Private CA signed cert, add `--set privateCA=true` following `--set ingress.tls.source=secret`:

```plain
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm upgrade rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand All @@ -66,16 +63,6 @@ helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--set useBundledSystemChart=true # Use the packaged Rancher system charts
```

### Apply the Rendered Templates

Copy the rendered manifest directories to a system with access to the Rancher server cluster and apply the rendered templates.

Use `kubectl` to apply the rendered manifests.

```plain
kubectl -n cattle-system apply -R -f ./rancher
```

## Verify the Upgrade

Log into Rancher to confirm that the upgrade succeeded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Copy the fetched charts to a system that has access to the Rancher server cluste

##### 1. Install Cert-Manager

Install cert-manager with the options you would like to use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry. This will create a `cert-manager` directory with the Kubernetes manifest files.
Install cert-manager with the same options you would use to install the chart. Remember to set the `image.repository` option to pull the image from your private registry.

:::note

Expand All @@ -144,7 +144,7 @@ If you are using self-signed certificates, install cert-manager:
2. Create the cert-manager CustomResourceDefinitions (CRDs).

```plain
kubectl apply -f cert-manager/cert-manager-crd.yaml
kubectl apply -f cert-manager-crd.yaml
```

3. Install cert-manager.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ If you are installing an alpha version, Helm requires adding the `--devel` optio

:::

### Rendering the Helm Chart for Air Gap Installations
### Enabling Features for Air Gap Installs

For an air gap installation of Rancher, you need to add a Helm chart repository and render a Helm template before installing Rancher with Helm. For details, refer to the [air gap installation documentation.](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md)
To perform an [air gap installation of Rancher](../getting-started/installation-and-upgrade/other-installation-methods/air-gapped-helm-cli-install/install-rancher-ha.md), add a Helm chart repository and download a Helm chart, then install Rancher with Helm.

Here is an example of a command for passing in the feature flag names when rendering the Helm template. In the below example, two features are enabled by passing the feature flag names in a comma separated list.

The Helm command is as follows:
When you install the Helm chart, you should pass in feature flag names in a comma separated list, as in the following example:

```
helm template rancher ./rancher-<VERSION>.tgz --output-dir . \
--no-hooks \ # prevent files for Helm hooks from being generated
helm install rancher ./rancher-<VERSION>.tgz \
--namespace cattle-system \
--set hostname=<RANCHER.YOURDOMAIN.COM> \
--set rancherImage=<REGISTRY.YOURDOMAIN.COM:PORT>/rancher/rancher \
Expand Down

0 comments on commit f6a7012

Please sign in to comment.