Skip to content

Commit

Permalink
Update docs to use Helm chart from OCI registry (#3565)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

**Which issue(s) this PR fixes**:

Fixes #

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
-->
```release-note
NONE
```

This PR was merged by Kapetanios.
  • Loading branch information
nghialv authored Apr 22, 2022
1 parent 0955d84 commit 8de9e96
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,15 +39,15 @@ 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" >}}
# This command just installs a Piped with the specified version.
# 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}
Expand All @@ -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} \
Expand All @@ -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 [email protected]:{GIT_ORG}/{GIT_REPO}.git \
Expand Down Expand Up @@ -125,15 +118,15 @@ 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" >}}
# This command just installs a Piped with the specified version.
# 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} \
Expand All @@ -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} \
Expand All @@ -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 [email protected]:{GIT_ORG}/{GIT_REPO}.git \
Expand All @@ -182,15 +175,15 @@ 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" >}}
# This command just installs a Piped with the specified version.
# 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} \
Expand All @@ -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} \
Expand All @@ -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 [email protected]:{GIT_ORG}/{GIT_REPO}.git \
Expand Down
12 changes: 5 additions & 7 deletions docs/content/en/docs-dev/quickstart/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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} \
Expand Down

0 comments on commit 8de9e96

Please sign in to comment.