From 0cc5677c25bc28b3f775b1903bdf42c84305d487 Mon Sep 17 00:00:00 2001 From: Zhonghu Xu Date: Wed, 28 Jun 2023 11:55:11 +0800 Subject: [PATCH] Add helm repo installation doc (#348) * update release pkg name Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update doc Signed-off-by: Zhonghu Xu * update Signed-off-by: Zhonghu Xu --------- Signed-off-by: Zhonghu Xu --- .../en/boilerplates/build-from-source.md | 1 + .../boilerplates/install-cluster-operator.md | 11 ++-- .../en/boilerplates/install-fleet-manager.md | 8 +-- docs/content/en/docs/setup/insatll-kurator.md | 24 +++------ .../en/docs/setup/install-cluster-operator.md | 45 +++++++++++----- .../en/docs/setup/install-fleet-manager.md | 52 +++++++++++-------- hack/release-artifacts.sh | 2 +- 7 files changed, 82 insertions(+), 61 deletions(-) diff --git a/docs/content/en/boilerplates/build-from-source.md b/docs/content/en/boilerplates/build-from-source.md index ea43512cc..616a23234 100644 --- a/docs/content/en/boilerplates/build-from-source.md +++ b/docs/content/en/boilerplates/build-from-source.md @@ -9,4 +9,5 @@ Load image to kind cluster: ```console kind load docker-image ghcr.io/kurator-dev/cluster-operator:{{< kurator-version >}} --name kurator-host +kind load docker-image ghcr.io/kurator-dev/fleet-manager:{{< kurator-version >}} --name kurator-host ``` diff --git a/docs/content/en/boilerplates/install-cluster-operator.md b/docs/content/en/boilerplates/install-cluster-operator.md index 71b229378..c336e6c51 100644 --- a/docs/content/en/boilerplates/install-cluster-operator.md +++ b/docs/content/en/boilerplates/install-cluster-operator.md @@ -1,13 +1,14 @@ +Install cluster operator into the management cluster. + ```console -# Please make sure cert manager is ready before install cluster operator -helm install --create-namespace kurator-cluster-operator out/charts/cluster-operator-{{< kurator-version >}}.tgz -n kurator-system +helm install --create-namespace kurator-cluster-operator cluster-operator-{{< kurator-version >}}.tgz -n kurator-system ``` -After a while, you can see kurator cluster operator running. +Verify the cluster operator chart installation: ```bash -$ kubectl get pod -n kurator-system +$ kubectl get pod -l app.kubernetes.io/name=kurator-cluster-operator -n kurator-system NAME READY STATUS RESTARTS AGE -kurator-cluster-operator-84d64c89db-brmv2 1/1 Running 0 14s +kurator-cluster-operator-5977486c8f-7b5rc 1/1 Running 0 21h ``` diff --git a/docs/content/en/boilerplates/install-fleet-manager.md b/docs/content/en/boilerplates/install-fleet-manager.md index 5603ff694..d3af8af6d 100644 --- a/docs/content/en/boilerplates/install-fleet-manager.md +++ b/docs/content/en/boilerplates/install-fleet-manager.md @@ -1,11 +1,13 @@ +Install fleet manager into the management cluster. + ```console -helm install --create-namespace kurator-fleet-manager out/charts/fleet-manager-{{< kurator-version >}}.tgz -n kurator-system +helm install --create-namespace kurator-fleet-manager fleet-manager-{{< kurator-version >}}.tgz -n kurator-system ``` -After a while, you can see kurator fleet manager running. +Verify the fleet manager chart installation: ```bash -$ kubectl get pod -l app.kubernetes.io/name=kurator-fleet-manager -n kurator-system +kubectl get pod -l app.kubernetes.io/name=kurator-fleet-manager -n kurator-system NAME READY STATUS RESTARTS AGE kurator-fleet-manager-d587f54b6-d4ldd 1/1 Running 0 53s ``` diff --git a/docs/content/en/docs/setup/insatll-kurator.md b/docs/content/en/docs/setup/insatll-kurator.md index f0c2a3278..9a14ad28f 100644 --- a/docs/content/en/docs/setup/insatll-kurator.md +++ b/docs/content/en/docs/setup/insatll-kurator.md @@ -20,23 +20,11 @@ And then move the executable binary to your PATH. ## Install from release package -1. Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. +Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. - ```console - curl -L https://github.com/kurator-dev/kurator/releases/download/{{< kurator-version >}}/kurator-{{< kurator-version >}}.tar.gz - tar -zxvf kurator-{{< kurator-version >}}.tar.gz - ``` - -1. Move to release package directory. - - ```console - cd kurator-{{< kurator-version >}} - ``` - - kurator binary is under `bin/` directory, and cluster operator helm chart is under `charts` directory. - -1. Add kurator to your PATH +```console +curl -L https://github.com/kurator-dev/kurator/releases/download/v{{< kurator-version >}}/kurator-{{< kurator-version >}}-linux-amd64.tar.gz +tar -zxvf kurator-{{< kurator-version >}}-linux-amd64.tar.gz +``` - ```console - export PATH=$PWD/bin:$PATH - ``` +kurator binary is in the current directory, move it to your user PATH diff --git a/docs/content/en/docs/setup/install-cluster-operator.md b/docs/content/en/docs/setup/install-cluster-operator.md index 74fae3367..8929ac766 100644 --- a/docs/content/en/docs/setup/install-cluster-operator.md +++ b/docs/content/en/docs/setup/install-cluster-operator.md @@ -14,29 +14,50 @@ description: > {{< boilerplate build-from-source >}} -Install cluster operator into the management cluster. + +Change directory to the helm charts + +```bash +cd out/charts/ +``` {{< boilerplate install-cluster-operator >}} + ## Install cluster operator from release package +Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. + +```bash +curl -L https://github.com/kurator-dev/kurator/releases/download/v{{< kurator-version >}}/cluster-operator-{{< kurator-version >}}.tgz +``` + +{{< boilerplate install-cluster-operator >}} + +## Install cluster operator from helm repo + +Configure the Helm repository: + +```bash +helm repo add kurator https://kurator-dev.github.io/helm-charts +helm repo update +``` -1. Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. +Install cluster operator into the management cluster. - ```console - curl -L https://github.com/kurator-dev/kurator/releases/download/{{< kurator-version >}}/kurator-{{< kurator-version >}}.tar.gz - tar -zxvf kurator-{{< kurator-version >}}.tar.gz - ``` +```console +helm install --create-namespace kurator-cluster-operator kurator/cluster-operator --version={{< kurator-version >}} -n kurator-system -1. Move to release package directory. +``` - ```console - cd kurator-{{< kurator-version >}} - ``` +Verify the cluster operator chart installation: -1. Install cluster operator into the management cluster. +```bash +$ kubectl get pod -l app.kubernetes.io/name=kurator-cluster-operator -n kurator-system +NAME READY STATUS RESTARTS AGE +kurator-cluster-operator-5977486c8f-7b5rc 1/1 Running 0 21h +``` - {{< boilerplate install-cluster-operator >}} ## Try to deploy a cluster with cluster operator diff --git a/docs/content/en/docs/setup/install-fleet-manager.md b/docs/content/en/docs/setup/install-fleet-manager.md index 07aeb5512..df5a99f5f 100644 --- a/docs/content/en/docs/setup/install-fleet-manager.md +++ b/docs/content/en/docs/setup/install-fleet-manager.md @@ -16,7 +16,7 @@ Fleet manager depends on [Fluxcd](https://fluxcd.io/flux/), Kurator use helm cha Setup with following command: -```console +```bash helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts cat <}} -```console -VERSION={{< kurator-version >}} make docker -VERSION={{< kurator-version >}} make gen-chart +Change directory to the helm charts + +```bash +cd out/charts/ ``` -Load image to kind cluster: +{{< boilerplate install-fleet-manager >}} -```console -kind load docker-image ghcr.io/kurator-dev/fleet-manager:{{< kurator-version >}} --name kurator-host +## Install fleet manager from release package + +Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. + +```bash +curl -L https://github.com/kurator-dev/kurator/releases/download/v{{< kurator-version >}}/fleet-manager-{{< kurator-version >}}.tgz ``` -Install fleet manager into the management cluster. {{< boilerplate install-fleet-manager >}} -## Install fleet manager from release package +## Install fleet manager from helm repo -1. Go to [Kurator release](https://github.com/kurator-dev/kurator/releases) page to download the release package for your OS and extract. +Configure the Helm repository: - ```console - curl -L https://github.com/kurator-dev/kurator/releases/download/{{< kurator-version >}}/kurator-{{< kurator-version >}}.tar.gz - tar -zxvf kurator-{{< kurator-version >}}.tar.gz - ``` +```bash +helm repo add kurator https://kurator-dev.github.io/helm-charts +helm repo update +``` -1. Move to release package directory. +Install fleet manager into the management cluster. - ```console - cd kurator-{{< kurator-version >}} - ``` +```console +helm install --create-namespace kurator-fleet-manager kurator/fleet-manager --version={{< kurator-version >}} -n kurator-system +``` -1. Install fleet manager into the management cluster. +Verify the fleet manager chart installation: - {{< boilerplate install-fleet-manager >}} +```bash +kubectl get pod -l app.kubernetes.io/name=kurator-fleet-manager -n kurator-system +NAME READY STATUS RESTARTS AGE +kurator-fleet-manager-d587f54b6-d4ldd 1/1 Running 0 53s +``` ## Try to create a fleet with fleet manager diff --git a/hack/release-artifacts.sh b/hack/release-artifacts.sh index 1246e75fb..2b7670b75 100755 --- a/hack/release-artifacts.sh +++ b/hack/release-artifacts.sh @@ -21,7 +21,7 @@ BINS=("kurator") # tar kurator binary for BIN in "${BINS[@]}"; do echo "TAR BINARY: ${BIN}" - BIN_RELEASE="${BIN}_${VERSION}_${GOOS}-${GOARCH}.tar.gz" + BIN_RELEASE="${BIN}-${VERSION}-${GOOS}-${GOARCH}.tar.gz" pushd "${OUT_BASE_PATH}/${GOOS}-${GOARCH}/" tar -zcvf "${BIN_RELEASE}" "./${BIN}" popd