Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/content/en/docs-v1.0.x/user-guide/managing-piped/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Managing Piped"
linkTitle: "Managing Piped"
weight: 3
description: >
This guide is for administrators and operators wanting to install and configure piped for other developers.
---

In order to use Piped you will need to register a piped through the PipeCD control plane. Check out [how to register a Piped](../managing-controlplane/registering-a-piped/) if you have not have already. After registering successfully, you can monitor your Piped live state via the PipeCD console on the settings page.

![piped-list-page](/images/piped-list-page.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Adding a git repository"
linkTitle: "Adding git repository"
weight: 2
description: >
This page describes how to add a new Git repository.
---

In the `piped` configuration file, we specify the list of Git repositories should be handled by the `piped`.
A Git repository contains one or more deployable applications where each application is put inside a directory called as [application directory](../../../concepts/#application-directory).
That directory contains an application configuration file as well as application manifests.
The `piped` periodically checks the new commits and fetches the needed manifests from those repositories for executing the deployment.

A single `piped` can be configured to handle one or more Git repositories.
In order to enable a new Git repository, let's add a new [GitRepository](../configuration-reference/#gitrepository) block to the `repositories` field in the `piped` configuration file.

For example, with the following snippet, `piped` will take the `master` branch of [pipe-cd/examples](https://github.com/pipe-cd/examples) repository as a target Git repository for doing deployments.

``` yaml
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
...
repositories:
- repoId: examples
remote: [email protected]:pipe-cd/examples.git
branch: master
```

In most of the cases, we want to deal with private Git repositories. For accessing those private repositories, `piped` needs a private SSH key, which can be configured while [installing](../../../installation/install-piped/installing-on-kubernetes/) with `secret.sshKey` in the Helm chart.

``` console
helm install dev-piped pipecd/piped --version={VERSION} \
--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}
```

You can see this [configuration reference](../configuration-reference/#git) for more configurable fields about Git commands.

Currently, `piped` allows configuring only one private SSH key for all specified Git repositories. So you can configure the same SSH key for all of those private repositories, or break them into separate `piped`s. In the near future, we also want to update `piped` to support loading multiple SSH keys.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: "Adding an analysis provider"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of plugin docs instead of piped docs, wdyt?

linkTitle: "Adding analysis provider"
weight: 6
description: >
This page describes how to add an analysis provider for doing deployment analysis.
---

To enable [Automated deployment analysis](../../managing-application/customizing-deployment/automated-deployment-analysis/) feature, you have to set the needed information for Piped to connect to the [Analysis Provider](../../../concepts/#analysis-provider).

Currently, PipeCD supports the following providers:

- [Prometheus](https://prometheus.io/)
- [Datadog](https://datadoghq.com/)

## Prometheus

Piped queries the [range query endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) to obtain metrics used to evaluate the deployment.

You need to define the Prometheus server address accessible to Piped.

```yaml
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
analysisProviders:
- name: prometheus-dev
type: PROMETHEUS
config:
address: https://your-prometheus.dev
```

The full list of configurable fields are [here](configuration-reference/#analysisproviderprometheusconfig).

## Datadog

Piped queries the [MetricsApi.QueryMetrics](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-points) endpoint to obtain metrics used to evaluate the deployment.

```yaml
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
analysisProviders:
- name: datadog-dev
type: DATADOG
config:
apiKeyFile: /etc/piped-secret/datadog-api-key
applicationKeyFile: /etc/piped-secret/datadog-application-key
```

The full list of configurable fields are [here](configuration-reference/#analysisproviderdatadogconfig).

If you choose `Helm` as the installation method, we recommend using `--set-file` to mount the key files while performing the [upgrading process](../../../installation/install-piped/installing-on-kubernetes/#in-the-cluster-wide-mode).

```console
--set-file secret.data.datadog-api-key={PATH_TO_API_KEY_FILE} \
--set-file secret.data.datadog-application-key={PATH_TO_APPLICATION_KEY_FILE}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: "Adding a Helm chart repository or registry"
linkTitle: "Adding Helm chart repo or registry"
weight: 5
description: >
This page describes how to add a new Helm chart repository or registry.
---

PipeCD supports Kubernetes applications that are using Helm for templating and packaging. In addition to being able to deploy a Helm chart that is sourced from the same Git repository (`local chart`) or from a different Git repository (`remote git chart`), an application can use a chart sourced from a Helm chart repository.

### Adding Helm chart repository

A Helm [chart repository](https://helm.sh/docs/topics/chart_repository/) is a location backed by an HTTP server where packaged charts can be stored and shared. Before an application can be configured to use a chart from a Helm chart repository, that chart repository must be enabled in the related `piped` by adding the [ChartRepository](../configuration-reference/#chartrepository) struct to the piped configuration file.

``` yaml
# piped configuration file
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
...
chartRepositories:
- name: pipecd
address: https://charts.pipecd.dev
```

For example, the above snippet enables the official chart repository of PipeCD project. After that, you can configure the Kubernetes application to load a chart from that chart repository for executing the deployment.

``` yaml
# Application configuration file.
apiVersion: pipecd.dev/v1beta1
kind: Application
spec:
input:
# Helm chart sourced from a Helm Chart Repository.
helmChart:
repository: pipecd
name: helloworld
version: v0.5.0
```

In case the chart repository is backed by HTTP basic authentication, the username and password strings are required in [configuration](../configuration-reference/#chartrepository).

### Adding Helm chart registry

A Helm chart [registry](https://helm.sh/docs/topics/registries/) is a mechanism enabled by default in Helm 3.8.0 and later that allows the OCI registry to be used for storage and distribution of Helm charts.

Before an application can be configured to use a chart from a registry, that registry must be enabled in the related `piped` by adding the [ChartRegistry](../configuration-reference/#chartregistry) struct to the piped configuration file if authentication is enabled at the registry.

``` yaml
# piped configuration file
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
...
chartRegistries:
- type: OCI
address: registry.example.com
username: sample-username
password: sample-password
```
Loading