From 8de9e96f2ed0d04f80240d1cc7c0f3c8a9480ce7 Mon Sep 17 00:00:00 2001 From: Le Van Nghia Date: Fri, 22 Apr 2022 10:22:45 +0900 Subject: [PATCH] Update docs to use Helm chart from OCI registry (#3565) **What this PR does / why we need it**: **Which issue(s) this PR fixes**: Fixes # **Does this PR introduce a user-facing change?**: ```release-note NONE ``` This PR was merged by Kapetanios. --- .../control-plane/installation.md | 18 +++-------- .../installation/installing-on-kubernetes.md | 31 +++++++------------ docs/content/en/docs-dev/quickstart/_index.md | 12 +++---- 3 files changed, 21 insertions(+), 40 deletions(-) diff --git a/docs/content/en/docs-dev/operator-manual/control-plane/installation.md b/docs/content/en/docs-dev/operator-manual/control-plane/installation.md index 80f30d14af..e5fbf727e9 100644 --- a/docs/content/en/docs-dev/operator-manual/control-plane/installation.md +++ b/docs/content/en/docs-dev/operator-manual/control-plane/installation.md @@ -9,21 +9,11 @@ description: > ## Prerequisites - Having a running Kubernetes cluster -- Installed [helm3](https://helm.sh/docs/intro/install/) +- Installed [Helm](https://helm.sh/docs/intro/install/) (3.8.0 or later) ## Installation -### 1. Adding helm chart repository - -Installing the control-plane will be done via the helm chart sourced in [pipe-cd/manifests](https://github.com/pipe-cd/manifests/tree/master/manifests/pipecd) GitHub repository. That chart is published in the Helm chart repository at `https://charts.pipecd.dev`. - -So before installing PipeCD, let's add the above Helm chart repository to your Helm client by the following command: - -``` console -helm repo add pipecd https://charts.pipecd.dev -``` - -### 2. Preparing an encryption key +### 1. Preparing an encryption key PipeCD requires a key for encrypting sensitive data or signing JWT token while authenticating. You can use one of the following commands to generate an encryption key. @@ -34,7 +24,7 @@ openssl rand 64 | base64 > encryption-key cat /dev/urandom | head -c64 | base64 > encryption-key ``` -### 3. Preparing control-plane configuration file and installing +### 2. Preparing control-plane configuration file and installing As described at the [architecture overview](/docs/operator-manual/control-plane/architecture-overview/) page, the control-plane's data can be stored in one of the provided fully-managed or self-managed services. So you have to decide which kind of [data store](/docs/operator-manual/control-plane/architecture-overview/#data-store) and [file store](/docs/operator-manual/control-plane/architecture-overview/#file-store) you want to use and prepare a control-plane configuration file suitable for that choice. @@ -70,7 +60,7 @@ See [ConfigurationReference](/docs/operator-manual/control-plane/configuration-r After all, install the control-plane as bellow: ``` console -helm install pipecd pipecd/pipecd --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm install pipecd oci://ghcr.io/pipe-cd/chart/pipecd --version {{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set-file config.data=path-to-control-plane-configuration-file \ --set-file secret.encryptionKey.data=path-to-encryption-key-file \ --set-file secret.firestoreServiceAccount.data=path-to-service-account-file \ diff --git a/docs/content/en/docs-dev/operator-manual/piped/installation/installing-on-kubernetes.md b/docs/content/en/docs-dev/operator-manual/piped/installation/installing-on-kubernetes.md index 6d97a6b43d..10b0813086 100644 --- a/docs/content/en/docs-dev/operator-manual/piped/installation/installing-on-kubernetes.md +++ b/docs/content/en/docs-dev/operator-manual/piped/installation/installing-on-kubernetes.md @@ -19,13 +19,6 @@ description: > ## In the cluster-wide mode This way requires installing cluster-level resources. Piped installed with this way can perform deployment workloads against any other namespaces than the where Piped runs on. -- Adding `pipecd` helm chart repository - - ``` - helm repo add pipecd https://charts.pipecd.dev - helm repo update - ``` - - Preparing a piped configuration file as the following ``` yaml @@ -46,7 +39,7 @@ This way requires installing cluster-level resources. Piped installed with this syncInterval: 1m ``` -- Installing by using `Helm 3` +- Installing by using [Helm](https://helm.sh/docs/intro/install/) (3.8.0 or later) {{< tabpane >}} {{< tab lang="bash" header="Piped" >}} @@ -54,7 +47,7 @@ This way requires installing cluster-level resources. Piped installed with this # Whenever you want to upgrade that Piped to a new version or update its config data # you have to restart it by re-running this command. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ --set-file secret.data.ssh-key={PATH_TO_PRIVATE_SSH_KEY_FILE} @@ -65,7 +58,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # This allows upgrading Piped to a new version from the web console. # But we still need to restart Piped when we want to update its config data. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ @@ -78,7 +71,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # remote-config allows loading the Piped config stored in a remote location such as a Git repository. # Whenever the config data is changed, it loads the new config and restarts Piped to use that new config. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set launcher.configFromGitRepo.enabled=true \ --set launcher.configFromGitRepo.repoUrl=git@github.com:{GIT_ORG}/{GIT_REPO}.git \ @@ -125,7 +118,7 @@ Most parts are identical to the previous way, but some are slightly different. namespace: {NAMESPACE} ``` -- Installing by using `Helm 3` +- Installing by using [Helm](https://helm.sh/docs/intro/install/) (3.8.0 or later) {{< tabpane >}} {{< tab lang="bash" header="Piped" >}} @@ -133,7 +126,7 @@ Most parts are identical to the previous way, but some are slightly different. # Whenever you want to upgrade that Piped to a new version or update its config data # you have to restart it by re-running this command. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ --set-file secret.data.ssh-key={PATH_TO_PRIVATE_SSH_KEY_FILE} \ @@ -146,7 +139,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # This allows upgrading Piped to a new version from the web console. # But we still need to restart Piped when we want to update its config data. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ @@ -161,7 +154,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # remote-config allows loading the Piped config stored in a remote location such as a Git repository. # Whenever the config data is changed, it loads the new config and restarts Piped to use that new config. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set launcher.configFromGitRepo.enabled=true \ --set launcher.configFromGitRepo.repoUrl=git@github.com:{GIT_ORG}/{GIT_REPO}.git \ @@ -182,7 +175,7 @@ Starting from OpenShift 4.2, it also inserts that user into `/etc/passwd` for us but before that version, the assigned user is missing in that file. That blocks workloads of `gcr.io/pipecd/piped` image. Therefore if you are running on OpenShift with a version before 4.2, please use `gcr.io/pipecd/piped-okd` image with the following command: -- Installing by using `Helm 3` +- Installing by using [Helm](https://helm.sh/docs/intro/install/) (3.8.0 or later) {{< tabpane >}} {{< tab lang="bash" header="Piped" >}} @@ -190,7 +183,7 @@ Therefore if you are running on OpenShift with a version before 4.2, please use # Whenever you want to upgrade that Piped to a new version or update its config data # you have to restart it by re-running this command. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ --set-file secret.data.ssh-key={PATH_TO_PRIVATE_SSH_KEY_FILE} \ @@ -209,7 +202,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # This allows upgrading Piped to a new version from the web console. # But we still need to restart Piped when we want to update its config data. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set-file config.data={PATH_TO_PIPED_CONFIG_FILE} \ --set-file secret.data.piped-key={PATH_TO_PIPED_KEY_FILE} \ @@ -230,7 +223,7 @@ helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} - # remote-config allows loading the Piped config stored in a remote location such as a Git repository. # Whenever the config data is changed, it loads the new config and restarts Piped to use that new config. -helm upgrade -i dev-piped pipecd/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ +helm upgrade -i dev-piped oci://ghcr.io/pipe-cd/chart/piped --version={{< blocks/latest_version >}} --namespace={NAMESPACE} \ --set launcher.enabled=true \ --set launcher.configFromGitRepo.enabled=true \ --set launcher.configFromGitRepo.repoUrl=git@github.com:{GIT_ORG}/{GIT_REPO}.git \ diff --git a/docs/content/en/docs-dev/quickstart/_index.md b/docs/content/en/docs-dev/quickstart/_index.md index e7a292fdbb..a41c362cc4 100644 --- a/docs/content/en/docs-dev/quickstart/_index.md +++ b/docs/content/en/docs-dev/quickstart/_index.md @@ -12,17 +12,14 @@ Note: It's not required to install the PipeCD control plane to the cluster where ### Prerequisites - Having a Kubernetes cluster -- Installed [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and [helm3](https://helm.sh/docs/intro/install/) +- Installed [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and [Helm](https://helm.sh/docs/intro/install/) (3.8.0 or later) - Forked the [Examples](https://github.com/pipe-cd/examples) repository ### 1. Installing control plane ``` console -helm repo add pipecd https://charts.pipecd.dev - -helm install pipecd pipecd/pipecd -n pipecd \ - --create-namespace \ - --dependency-update \ +helm install pipecd oci://ghcr.io/pipe-cd/chart/pipecd --version {{< blocks/latest_version >}} \ + --namespace pipecd --create-namespace \ --values https://raw.githubusercontent.com/pipe-cd/manifests/{{< blocks/latest_version >}}/quickstart/control-plane-values.yaml ``` @@ -54,7 +51,8 @@ Be sure to keep a copy for later use. Then complete the installation by running the following command after replacing `{PIPED_ID}`, `{PIPED_KEY}`, `{FORKED_GITHUB_ORG}` with what you just got: ``` console -helm install piped pipecd/piped -n pipecd \ +helm install piped oci://ghcr.io/pipe-cd/chart/piped --version {{< blocks/latest_version >}} \ + --namespace pipecd \ --set quickstart.enabled=true \ --set quickstart.pipedId={PIPED_ID} \ --set secret.data.piped-key={PIPED_KEY} \