Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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: git@github.com: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,68 @@
---
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 to analyize the metrics of your deployment.
---

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 so that it can be accessed by your `piped`.

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

To know more, see the full list of [configurable fields](configuration-reference/#analysisproviderdatadogconfig).

## 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:
plugins:
- name: analysis
port:
url:
config:
analysisProviders:
- name: datadog-dev
type: DATADOG
config:
apiKeyFile: /etc/piped-secret/datadog-api-key
applicationKeyFile: /etc/piped-secret/datadog-application-key
```

To know more, see the full list of [configurable fields](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).

```bash
--set-file secret.data.datadog-api-key={PATH_TO_API_KEY_FILE} \
--set-file secret.data.datadog-application-key={PATH_TO_APPLICATION_KEY_FILE}
```
Loading