Skip to content
Merged
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,43 @@
---
title: "Adding a git repository"
linkTitle: "Adding git repository"
weight: 2
description: >
Learn how to add a git repository in the the `piped` configuration file.

---
In the `piped` configuration file, all the git repositories that you want to be tracked by the `piped` agent are specified.

A Git repository contains one or more deployable applications where each application is put inside a directory called as [application directory](../../../concepts/#application-directory).

An application 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, add a new [GitRepository](../configuration-reference/#gitrepository) block to the `repositories` field in the `piped` configuration file.

For example, in 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 deployments.

``` yaml
apiVersion: pipecd.dev/v1beta1
kind: Piped
spec:
...
repositories:
- repoId: examples
remote: git@github.com:pipe-cd/examples.git
branch: master
```

In most cases, you would want to deal with private git repositories. For accessing 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 the [git configuration reference](../configuration-reference/#git) to learn more about the configurable fields.

Currently, `piped` allows configuring only one private SSH key for all specified git repositories. For working with multiple repositories, you either have configure the same SSH key for all of those private repositories, or use separate `piped`s for each repository. We are working on adding support for multiple SSH keys for a single `piped`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: "Adding an analysis provider"
Copy link
Copy Markdown
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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will be change after this PR be merged, right? 👀

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