From 04615c73a0c61507e24aa9854e0a2ce52892cd4e Mon Sep 17 00:00:00 2001 From: Danil Grigorev Date: Mon, 18 Sep 2023 14:12:58 +0200 Subject: [PATCH] Add updated details on rancher turtles installation with capi opearator Signed-off-by: Danil Grigorev --- docs/getting-started/install_capi_operator.md | 24 +++--- .../install_turtles_operator.md | 81 ++++++++++++++++--- docs/getting-started/intro.md | 2 +- docs/getting-started/rancher.md | 4 +- .../capi-operator/installing_core_provider.md | 2 +- 5 files changed, 89 insertions(+), 24 deletions(-) diff --git a/docs/getting-started/install_capi_operator.md b/docs/getting-started/install_capi_operator.md index c5e1da4..97410ed 100644 --- a/docs/getting-started/install_capi_operator.md +++ b/docs/getting-started/install_capi_operator.md @@ -4,18 +4,18 @@ sidebar_position: 3 # Install Cluster API Operator -This section describes how to install `Cluster API Operator` in the kubernetes cluster. +This section describes how to install `Cluster API Operator` in the Kubernetes cluster. ## Installing CAPI and providers -`CAPI` and desired `CAPI` providers could be installed using helm based installation for [`Cluster API Operator`](https://github.com/kubernetes-sigs/cluster-api-operator) or as a helm dependency for the `Rancher Turtles`. +`CAPI` and desired `CAPI` providers could be installed using the helm-based installation for [`Cluster API Operator`](https://github.com/kubernetes-sigs/cluster-api-operator) or as a helm dependency for the `Rancher Turtles`. -### Install as a `Rancher Turtles` dependency +### Install as a `Rancher Turtles` dependency (recommended) -See the `Rancher Turtles` section for installing operator as a Helm [dependency](./install_turtles_operator.md#install-cluster-api-operator-as-a-helm-dependency) +See the `Rancher Turtles` section for installing the operator as a Helm [dependency](./install_turtles_operator.md#install-rancher-turtles-operator-with-cluster-api-operator-as-a-helm-dependency) -### Install with Helm -To install `Cluster API Operator` with version `1.4.4` of the `CAPI` + `Docker` provider using helm, follow these steps: +### Install manually with Helm (alternative) +To install `Cluster API Operator` with version `1.4.6` of the `CAPI` + `Docker` provider using helm, follow these steps: 1. Add the Helm repository for the `Cluster API Operator` by running the following command: ```bash @@ -29,7 +29,8 @@ helm repo update ```bash helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system - --set infrastructure=docker:v1.4.4 + --set infrastructure=docker:v1.4.6 + --set core=cluster-api:v1.4.6 --set cert-manager.enabled=true --timeout 90s --wait # Core Cluster API with kubeadm bootstrap and control plane providers will also be installed ``` @@ -40,7 +41,8 @@ To provide additional environment variables, choose some feature gates, or provi ```bash helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system - --set infrastructure=docker:v1.4.4 + --set infrastructure=docker:v1.4.6 + --set core=cluster-api:v1.4.6 --set cert-manager.enabled=true --timeout 90s --secret-name @@ -64,9 +66,9 @@ stringData: To select more than one desired provider to be installed together with the `Cluster API Operator`, the `--infrastructure` flag can be specified with multiple provider names separated by a comma. For example: ```bash -helm install ... infrastructure="docker:v1.4.4;azure:v1.4.4" +helm install ... --set infrastructure="docker:v1.4.6;azure:v1.4.6" ``` -The `infrastructure` flag is set to `docker:v1.4.4;azure:v1.4.4`, representing the desired provider names. This means that the `Cluster API Operator` will install and manage multiple provider systems, `Docker` and `Azure` respectively, with versions `1.4.4` specified. +The `infrastructure` flag is set to `docker:v1.4.6;azure:v1.4.6`, representing the desired provider names. This means that the `Cluster API Operator` will install and manage multiple provider systems, `Docker` and `Azure` respectively, with versions `1.4.6` specified. -For more fine-grained control on the providers and other components installed with CAPI, see the [Add infrastructure provider](../tasks/capi-operator/add_infrastructure_provider.md) section. +For more fine-grained control of the providers and other components installed with CAPI, see the [Add the infrastructure provider](../tasks/capi-operator/add_infrastructure_provider.md) section. diff --git a/docs/getting-started/install_turtles_operator.md b/docs/getting-started/install_turtles_operator.md index b6c66b5..f5ae781 100644 --- a/docs/getting-started/install_turtles_operator.md +++ b/docs/getting-started/install_turtles_operator.md @@ -2,15 +2,15 @@ sidebar_position: 4 --- -# Install Rancher Turtles Operator +# Install Rancher Turtles Operator without `Cluster API Operator` as a Helm dependency A `Rancher Turtles` requires a connection to the `Rancher Manager` cluster. This can be achieved by: 1. Installing it in the same cluster as the `Rancher Manager`. -*Note: In future we will support different deployment topologies* +*Note: In the future, we will support different deployment topologies* -Recommended path of installation for the operator is by using `Helm`. To install it in the cluster, a repository should be added first: +The recommended path of installation for the operator is by using `Helm`. To install it in the cluster, a repository should be added first: ```bash helm repo add turtles https://rancher-sandbox.github.io/rancher-turtles/ @@ -21,23 +21,86 @@ and then it can be installed into the `rancher-turtles-system` namespace with: ```bash helm install rancher-turtles turtles/rancher-turtles -n rancher-turtles-system + --set cluster-api-operator.enabled=false + --set cluster-api-operator.cluster-api.enabled=false --create-namespace --wait + --dependency-update ``` -### Install `Cluster API Operator` as a Helm dependency +### Install Rancher Turtles Operator with `Cluster API Operator` as a Helm dependency *Note: this section will be extended with additional details later* +A `rancher-turtles` repository should be added first: + +```bash +helm repo add turtles https://rancher-sandbox.github.io/rancher-turtles/ +helm repo update +``` + To install `Cluster API Operator` as a dependency to the `Rancher Turtles`, a set of additional helm flags should be specified: ```bash helm install rancher-turtles turtles/rancher-turtles -n rancher-turtles-system - --set cluster-api-operator.cert-manager.enabled=true # Allows to install cert manager dependency with Cluster API Operator - --set secret-name= # Passing secret name and namespace for additional environment variables to be used when deploying CAPI provider - --set secret-namespace= + --dependency-update + # Passing secret name and namespace for additional environment variables to be used when deploying CAPI provider + --set cluster-api-operator.cluster-api.configSecret.name= + --set cluster-api-operator.cluster-api.configSecret.namespace= --create-namespace --wait - --timeout 90s + --timeout 180s ``` -Any values passed to `helm` with the `cluster-api-operator` label will be passed along to the `Cluster API Operator` project. Full set of avaliable values for the `Cluster API Operator` could be found in the operator [values.yaml](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/hack/charts/cluster-api-operator/values.yaml). +Any values passed to `helm` with the `cluster-api-operator` key will be passed along to the `Cluster API Operator` project. A full set of available values for the `Cluster API Operator` can be found in the operator [values.yaml](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/hack/charts/cluster-api-operator/values.yaml). + +Currently the available set of values for the `cluster-api-operator` setup in the `rancher-turtles`: + +```yaml +cluster-api-operator: + enabled: true # indicates if CAPI operator should be installed (default: true) + cert-manager: + enabled: true # indicates if cert-manager should be installed (default: true) + cluster-api: + enabled: true # indicates if core CAPI controllers should be installed (default: true) + version: v1.4.6 # version of CAPI to install (default: v1.4.6) + configSecret: + name: "" # name of the config secret to use for core CAPI controllers, used by the CAPI operator. See [CAPI operator](https://github.com/kubernetes-sigs/cluster-api-operator/tree/main/docs#installing-azure-infrastructure-provider) docs for more details. + namespace: "" # namespace of the config secret to use for core CAPI controllers, used by the CAPI operator. + core: + namespace: capi-system + fetchConfig: # (only required for airgapped environments) + url: "" # url to fetch config from, used by the CAPI operator. See [CAPI operator](https://github.com/kubernetes-sigs/cluster-api-operator/tree/main/docs#provider-spec) docs for more details. + selector: "" # selector to use for fetching config, used by the CAPI operator. + kubeadmBootstrap: + namespace: capi-kubeadm-bootstrap-system + fetchConfig: + url: "" + selector: "" + kubeadmControlPlane: + namespace: capi-kubeadm-control-plane-system + fetchConfig: + url: "" + selector: "" +``` + +A `secret` with a set of environment variables should be passed to the `Cluster API Operator` installation. + +Example `variables/default` `secret` configuration with `CLUSTER_TOPOLOGY` and `EXP_CLUSTER_RESOURCE_SET` feature flags set: + +```sh title="helm install flags" +helm install ... +--set cluster-api-operator.cluster-api.configSecret.name=variables +--set cluster-api-operator.cluster-api.configSecret.namespace=default +``` + +```yaml title="secret.yaml" +apiVersion: v1 +kind: Secret +metadata: + name: variables + namespace: default +type: Opaque +stringData: + CLUSTER_TOPOLOGY: "true" + EXP_CLUSTER_RESOURCE_SET: "true" +``` diff --git a/docs/getting-started/intro.md b/docs/getting-started/intro.md index 7d77b18..27b29c3 100644 --- a/docs/getting-started/intro.md +++ b/docs/getting-started/intro.md @@ -16,5 +16,5 @@ Everything you need to know about getting started with Rancher Turtles. | Rancher | Reach out to the early adopters contacts | Using [helm based](https://ranchermanager.docs.rancher.com/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster#install-the-rancher-helm-chart) installation on any kuberenetes cluster directly or on a newly created [Amazon](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-amazon-eks), [Azure](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks) or [Google](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-gke) service based options. Additional feature gate [modifications](./rancher.md#installing-rancher) are reqired. | | Cert-manager | `>=v1.12.0` | Using [helm](https://cert-manager.io/docs/installation/helm/#installing-with-helm) based installation or via [kubectl apply](https://cert-manager.io/docs/installation/#default-static-install) command or as a helm [dependency](./install_capi_operator.md#install-with-helm) | | Cluster API Operator | `>=v0.5.1` | Using [helm chart](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/docs/README.md#method-2-use-helm-charts) install or as a [dependency](./install_turtles_operator.md#install-cluster-api-operator-as-a-helm-dependency) to the `Rancher Turtles` | -| Cluster API | `v1.4.4` | | +| Cluster API | `v1.4.6` | | | Rancher-turtles operator | `>=0.0.1` | Using helm based [installation](./install_turtles_operator.md) | diff --git a/docs/getting-started/rancher.md b/docs/getting-started/rancher.md index c1d0ea8..ee809e0 100644 --- a/docs/getting-started/rancher.md +++ b/docs/getting-started/rancher.md @@ -10,7 +10,7 @@ To install `Rancher` in an existing or new Kubernetes cluster, you can use the f 1. First, make sure to follow one of the official [installation guides](https://ranchermanager.docs.rancher.com/pages-for-subheaders/installation-and-upgrade) for `Rancher`. 2. When installing `Rancher` using the `helm` command, use the `--set` option to specify the `features` parameter. For the `embedded-cluster-api` feature, set the value to `false` to disable it. -3. Use the `--version` option to specify the version of `Rancher` you want to install. In this case, use the [recommentded](../getting-started/intro.md#prerequisites) `Rancher` version for `Rancher Turtles`. +3. Use the `--version` option to specify the version of `Rancher` you want to install. In this case, use the [recommended](../getting-started/intro.md#prerequisites) `Rancher` version for `Rancher Turtles`. Here's the complete command to install `Rancher` with the `embedded-cluster-api` feature disabled. Replace `` with the actual hostname of your `Rancher` server: @@ -18,7 +18,7 @@ Here's the complete command to install `Rancher` with the `embedded-cluster-api` helm install rancher rancher-stable/rancher --set features=embedded-cluster-api=false --set hostname= --set version= --set namespace=cattle-system --create-namespace --wait ``` -## Existing rancher installation +## Existing Rancher installation To install `Rancher Turtles` in an existing `Rancher` cluster, follow these steps: diff --git a/docs/tasks/capi-operator/installing_core_provider.md b/docs/tasks/capi-operator/installing_core_provider.md index dfafe2b..df058a3 100644 --- a/docs/tasks/capi-operator/installing_core_provider.md +++ b/docs/tasks/capi-operator/installing_core_provider.md @@ -17,7 +17,7 @@ metadata: name: cluster-api namespace: capi-system spec: - version: v1.4.4 + version: v1.4.6 ``` **Note:** Only one CoreProvider can be installed at the same time on a single cluster.