From 8ffe71f8d1b6c3a9d647bc2fde977b5e9b9fe5f7 Mon Sep 17 00:00:00 2001 From: Alexandr Demicev Date: Wed, 6 Sep 2023 13:02:20 +0200 Subject: [PATCH] Add dev docs about usage Signed-off-by: Alexandr Demicev --- .github/workflows/test_chart.yaml | 2 +- README.md | 56 +++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_chart.yaml b/.github/workflows/test_chart.yaml index 5a2818c9..379be35c 100644 --- a/.github/workflows/test_chart.yaml +++ b/.github/workflows/test_chart.yaml @@ -59,7 +59,7 @@ jobs: run: kind load docker-image ${{ env.MANIFEST_IMG }}:${{ env.TAG }} - name: Run chart-testing (install) - run: helm install rancher-turtles out/charts/rancher-turtles/ -n rancher-turtles-system --create-namespace --wait --set cluster-api-operator.cert-manager.enabled=true + run: helm install rancher-turtles out/charts/rancher-turtles/ -n rancher-turtles-system --create-namespace --wait --set cluster-api-operator.cert-manager.enabled=true --set capi.enabled=false - name: Run chart-testing (un-install) run: helm uninstall rancher-turtles -n rancher-turtles-system --wait diff --git a/README.md b/README.md index 2dad1d03..9a4c5446 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,59 @@ Currently this project has the following functionality: ## How to use this? -Instructions coming soon :) +### Installation + +``` +Note: The following will only work after we release the first version of the extension. +``` + +Prerequisites: + +- Running [Rancher Manager cluster](https://ranchermanager.docs.rancher.com/) with cert-manager +- [Helm](https://helm.sh/) + +Quick start: + +These commands will install: Rancher turtles extension, CAPI Operator, and the core CAPI CRDs and controllers. + +```bash +helm repo add rancher-turtles https://rancher-sandbox.github.io/rancher-turtles +helm repo update +helm install rancher-turtles rancher-turtles/rancher-turtles --create-namespace -n rancher-turtles-system +``` + +Customizing the deployment: + +The Rancher turtles Helm chart supports the following values: + +```yaml +rancherTurtles: + image: # image to use for the extension + tag: # tag to use for the extension + imagePullPolicy: # image pull policy to use for the extension + namespace: # namespace to deploy to (default: rancher-turtles-system) +capi: + enabled: # indicates if core CAPI controllers should be installed (default: true) + namespace: # namespace to create and deploy core CAPI controllers (default: capi-system) + 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. + 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. +cluster-api-operator: + enabled: # indicates if CAPI operator should be installed (default: true) +``` +### Installing CAPI providers + +The Rancher turtles extension does not install any CAPI providers, you will need to install them yourself using [CAPI operator](https://github.com/kubernetes-sigs/cluster-api-operator/tree/main/docs). + +To quickly deploy docker infrastructure, kubeadm bootstrap and control plane providers, apply the following: + +``` +kubectl apply -f https://raw.githubusercontent.com/rancher-sandbox/rancher-turtles/main/test/e2e/resources/config/capi-providers-secret.yaml +kubectl apply -f https://raw.githubusercontent.com/rancher-sandbox/rancher-turtles/main/test/e2e/resources/config/capi-providers.yaml +``` ## How to contribute? See our [contributor guide](CONTRIBUTING.md) for more details on how to get involved. @@ -68,4 +120,4 @@ What happens when you run `make dev-env`? ## Code of Conduct -Participation in the project is governed by [Code of Conduct](code-of-conduct.md). \ No newline at end of file +Participation in the project is governed by [Code of Conduct](code-of-conduct.md).