Skip to content

Commit 7f09e56

Browse files
highbGoshaDo
andauthored
docs: Documentation Improvements (#23)
* docs: Proofreading and some MD linting * docs: Reword and rephrase * Update docs/getting_started/installation.md --------- Co-authored-by: Brandon High <[email protected]> Co-authored-by: GoshaDo <[email protected]>
1 parent 73a31b3 commit 7f09e56

File tree

11 files changed

+98
-90
lines changed

11 files changed

+98
-90
lines changed

README.md

+9-11
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ Welcome to Piper! Piper is open source project that aimed at providing multibran
55

66
## Table of Contents
77

8-
- [Getting Started](#getting-started)
9-
- [Reporting Issues](#reporting-issues)
10-
- [How to Contribute](docs/CONTRIBUTING.md#how-to-contribute)
11-
- [License](#license)
8+
- [Piper](#piper)
9+
- [Table of Contents](#table-of-contents)
10+
- [Getting Started](#getting-started)
11+
- [Reporting Issues](#reporting-issues)
12+
- [How to Contribute](#how-to-contribute)
13+
- [License](#license)
1214

1315
## Getting Started
1416

15-
Piper configures a webhook in git provider and listens to the webhooks sends. It will create a Workflow CRD out of branches that contains `.workflows` folder.
16-
This folder should contain declarations of the templates and main DAG that will be running.
17-
Finally, it will submit the Workflow as a K8s resource in the cluster.
17+
Piper configures a webhook in git provider and listens to the webhooks sends. It will create a Workflow CRD out of branches that contains `.workflows` folder.
18+
This folder should contain declarations of the templates and main DAG that will be running.
19+
Finally, it will submit the Workflow as a K8s resource in the cluster.
1820
To access more detailed explanations, please navigate to the [Documentation site](https://piper.quickube.com).
1921

2022
https://github.com/quickube/piper/assets/106976988/09b3a5d8-3428-4bdc-9146-3034d81164bf
@@ -29,7 +31,6 @@ If you encounter any issues or bugs while using Piper, please help us improve by
2931
4. Add appropriate labels to categorize the issue (e.g., bug, enhancement, question).
3032
5. Submit the issue, and our team will review and address it as soon as possible.
3133

32-
3334
## How to Contribute
3435

3536
If you're interested in contributing to this project, please feel free to submit a pull request. We welcome all contributions and feedback.
@@ -38,6 +39,3 @@ Please check out our [Contribution guidelines for this project](docs/CONTRIBUTIN
3839
## License
3940

4041
This project is licensed under the Apache License. Please see the [LICENSE](LICENSE) file for details.
41-
42-
43-
+19-18
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
## Environment Variables
22

3-
The environment variables used by Piper to configure its functionality.
4-
The helm chart populate them using [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml) file
3+
Piper uses the following environment variables to configure its functionality.
4+
The helm chart populates them using [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml) file
55

66
### Git
77

88
* GIT_PROVIDER
9-
The git provider that Piper will use, possible variables: GitHub (will support bitbucket and gitlab)
9+
The git provider that Piper will use, possible variables: GitHub . We plan to support Bitbucket and GitLab, as well.
1010

1111
* GIT_TOKEN
12-
The git token that will be used.
12+
The git token that will be used to connect to the git provider.
1313

1414
* GIT_ORG_NAME
1515
The organization name.
1616

1717
* GIT_ORG_LEVEL_WEBHOOK
18-
Boolean variable, whether to config webhook in organization level. default `false`
18+
Boolean variable, whether to config webhook at the organization level. Defaults to `false`.
1919

2020
* GIT_WEBHOOK_REPO_LIST
2121
List of repositories to configure webhooks to.
2222

2323
* GIT_WEBHOOK_URL
24-
URL of piper ingress, to configure webhooks.
24+
URL of Piper ingress, to configure webhooks.
2525

2626
* GIT_WEBHOOK_AUTO_CLEANUP
27-
Will cleanup all webhook that were created with piper.
28-
Notice that there will be a race conditions between pod that being terminated and the new one.
27+
Boolean variable that, if true, will cause Piper to automatically cleanup all webhooks that it creates when they are no longer necessary.
28+
Notice that there is a race condition between a pod that is being terminated and the new one being scheduled.
2929

3030
* GIT_ENFORCE_ORG_BELONGING
31-
Boolean variable, whether to enforce organizational belonging of git event creator. default `false`
31+
Boolean variable that, if true, will cause Piper to enforce organizational belonging of git event creator. Defaults to `false`.
3232

3333
* GIT_FULL_HEALTH_CHECK
34-
Enables full health check of webhook. Full health check contains expecting and validating ping event from a webhook.
35-
Doesn't work for bitbucket, because the API call doesn't exists.
36-
34+
Boolean variable that, if true, enables full health checks on webhooks. A full health check contains expecting and validating ping event from a webhook.
35+
Doesn't work for Bitbucket, because the API call doesn't exist on that platform.
3736

3837
### Argo Workflows Server
38+
3939
* ARGO_WORKFLOWS_TOKEN
40-
The token of Argo Workflows server.
40+
This token is used to authenticate with the Argo Workflows server.
4141

4242
* ARGO_WORKFLOWS_ADDRESS
4343
The address of Argo Workflows Server.
44-
44+
4545
* ARGO_WORKFLOWS_CREATE_CRD
46-
Whether to directly send Workflows instruction or create a CRD in the Cluster.
46+
Boolean variable that deterines whether to directly send Workflows instructions or create a CRD in the Cluster.
4747

4848
* ARGO_WORKFLOWS_NAMESPACE
4949
The namespace of Workflows creation for Argo Workflows.
@@ -52,9 +52,10 @@ The helm chart populate them using [values.yaml](https://github.com/quickube/pip
5252
Used to configure Argo Workflows client with local kube configurations.
5353

5454
### Rookout
55+
5556
* ROOKOUT_TOKEN
5657
The token used to configure Rookout agent. If not provided, will not start the agent.
57-
* ROOKOUT_LABELS
58-
The labels to label instances at Rookout, default to "service:piper"
58+
* ROOKOUT_LABELS
59+
The labels to label instances at Rookout, defaults to "service:piper"
5960
* ROOKOUT_REMOTE_ORIGIN
60-
The repo URL for source code fetching, default:"https://github.com/quickube/piper.git".
61+
The repo URL for source code fetching, default:"https://github.com/quickube/piper.git".

docs/configuration/health_check.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Health Check
22

3-
Health check executed every 1 minute as configured in the helm chart under `livenessProbe`, and triggered by `/healthz` endpoint:
3+
The following examples shows a health check being executed every 1 minute as configured in the helm chart under `livenessProbe`, and triggered by `/healthz` endpoint:
4+
45
```yaml
56
livenessProbe:
67
httpGet:
@@ -18,14 +19,13 @@ The mechanism for checking the health of Piper is:
1819
1920
1. Piper set health status of all webhooks to not-healthy.
2021
21-
2. Piper requests ping from all the webhooks configured.
22+
2. Piper requests ping from all the webhooks configured.
2223
2324
3. Git Provider send ping to `/webhook` endpoint, this will set the health status to `healthy` with timeout of 5 seconds.
2425

2526
4. Piper check the status of all webhooks configured.
2627

2728
Therefore, the criteria for health checking are:
28-
1. The registered webhook exists.
29-
2. The webhook send a ping in 5 seconds.
30-
3129

30+
1. The registered webhook exists.
31+
2. The webhook send a ping in 5 seconds.

docs/getting_started/installation.md

+25-22
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
## Instalation
1+
## Installation
22

3-
Piper should be deployed in the cluster with Argo Workflows.
4-
Piper will create a CRD that Argo Workflows will pick, so install or configure Piper to create those CRDs in the right namespace.
3+
You must deploy Piper to a cluster with a pre-existing Argo Workflows deployment.
4+
Piper will create a CRD that Argo Workflows will pick, so install or configure Piper to create those CRDs in the right namespace.
55

66
Please check out [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml) file of the helm chart configurations.
77

88
To add piper helm repo run:
9+
910
```bash
1011
helm repo add piper https://piper.quickube.com
1112
```
1213

1314
After configuring Piper [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml), run the following command for installation:
15+
1416
```bash
1517
helm upgrade --install piper piper/piper \
1618
-f YOUR_VALUES_FILE.yaml
@@ -22,33 +24,34 @@ helm upgrade --install piper piper/piper \
2224

2325
### Ingress
2426

25-
Piper should listen to webhooks from your git provider.
26-
Expose it using ingress or service, then provide the address to `piper.webhook.url` as followed:
27-
`https://PIPER_EXPOESED_URL/webhook`
27+
Piper works best when it is able to listen to webhooks from your git provider.
28+
Expose Piper using an ingress or service, then provide the address to `piper.webhook.url` as follows:
29+
`https://PIPER_EXPOSED_URL/webhook`
2830

29-
Checkout [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml)
31+
Refer to [values.yaml](https://github.com/quickube/piper/tree/main/helm-chart/values.yaml) for more information.
3032

3133
### Git
3234

33-
Piper will use git for fetching `.workflows` folder and receiving events using webhooks.
35+
Piper will use git to fetch the `.workflows` folder and receive events using webhooks.
3436

35-
To pick which git provider you are using provide `gitProvider.name` configuration in helm chart (Now only supports GitHub and Bitbucket).
37+
To pick which git provider you are using provide `gitProvider.name` configuration in helm chart (Currently we only support GitHub and Bitbucket).
3638

37-
Also configure you organization (Github) or workspace (Bitbucket) name using `gitProvider.organization.name` in helm chart.
39+
You must also configure your organization (GitHub) or workspace (Bitbucket) name using `gitProvider.organization.name` in the helm chart.
3840

3941
#### Git Token Permissions
4042

4143
The token should have access for creating webhooks and read repositories content.
42-
For GitHub configure `admin:org` and `write:org` permissions in Classic Token.
43-
For Bitbucket configure `Repositories:read`, `Webhooks:read and write` and `Pull requests:read` permissions (for multiple repos use workspace token).
44+
For GitHub, configure `admin:org` and `write:org` permissions in Classic Token.
45+
For Bitbucket, configure `Repositories:read`, `Webhooks:read and write` and `Pull requests:read` permissions (for multiple repos use workspace token).
4446

4547
#### Token
4648

47-
The git token should be passed as secret in the helm chart at `gitProvider.token`.
48-
Can be passed as parameter in helm install command using `--set piper.gitProvider.token=YOUR_GIT_TOKEN`
49+
The git token should be passed as secret in the helm chart at `gitProvider.token`.
50+
The token can be passed as parameter via helm install command using `--set piper.gitProvider.token=YOUR_GIT_TOKEN`
51+
52+
Alternatively, you can consume an already existing secret by configuring `piper.gipProvider.existingSecret`.
53+
The key should have the name `token`. You can be create a Secret using this command:
4954

50-
Alternatively, you can consume already existing secret and fill up `piper.gipProvider.existingSecret`.
51-
The key should be name `token`. Can be created using
5255
```bash
5356
kubectl create secret generic piper-git-token --from-literal=token=YOUR_GIT_OKEN
5457
```
@@ -57,17 +60,17 @@ kubectl create secret generic piper-git-token --from-literal=token=YOUR_GIT_OKEN
5760

5861
Piper will create a webhook configuration for you, for the whole organization or for each repo you configure.
5962

60-
Configure `piper.webhook.url` the address of piper that exposed with ingress with `/webhook` postfix.
63+
Configure `piper.webhook.url` with the address of Piper that you exposed using an Ingress or Service with `/webhook` postfix.
6164

62-
For organization level configure: `gitProvider.webhook.orgLevel` to `true`.
65+
For organization level configuration: `gitProvider.webhook.orgLevel` to `true`.
6366

64-
For granular repo webhook provide list of repos at: `gitProvider.webhook.repoList`.
67+
For granular repo webhook provide list of repos at: `gitProvider.webhook.repoList`.
6568

66-
Piper implements graceful shutdown, it will delete all the webhooks when terminated.
69+
Piper implements graceful shutdown, it will delete all the webhooks when terminated.
6770

6871
#### Status check
6972

70-
Piper will handle status checks for you.
73+
Piper will handle status checks for you.
7174
It will notify the GitProvider for the status of Workflow for specific commit that triggered Piper.
7275
For linking provide valid URL of your Argo Workflows server address at: `argoWorkflows.server.address`
7376

@@ -81,4 +84,4 @@ To lint the workflow before submitting it, please configure the internal address
8184

8285
#### Skip CRD Creation (On development)
8386

84-
Piper can communicate directly to Argo Workflow using ARGO_WORKFLOWS_CREATE_CRD environment variable, if you want to skip the creation of CRD change `argoWorkflows.crdCreation` to `false`.
87+
Piper can communicate directly to Argo Workflow using ARGO_WORKFLOWS_CREATE_CRD environment variable, if you want to skip the creation of CRD change `argoWorkflows.crdCreation` to `false`.

docs/index.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
<p align="center">
44
<img src="https://www.quickube.com/wp-content/uploads/2022/10/ArgoPipeline_1.0_Hero.png.webp?raw=true" />
55
</p>
6-
7-
Welcome to Piper!
86

9-
Piper is an open source project that aimed at providing multibranch pipeline functionality to Argo Workflows, allows users to create distinct Workflows based on Git branches. Supports GitHub and Bitbucket.
7+
Welcome to Piper!
108

11-
## General explanation
9+
Piper is an open source project that aimed at providing multibranch pipeline functionality to Argo Workflows. This allows users to create distinct Workflows based on Git branches. We supports GitHub and Bitbucket.
10+
11+
## General Explanation
1212

1313
<p align="center">
1414
<img src="https://raw.githubusercontent.com/quickube/piper/main/docs/img/flow.svg" />
1515
</p>
1616

17-
To achieve multibranch pipeline functionality Piper will do the hard works for us.
18-
At initialization, it will load all configuration and create a webhook in repository or organization scope.
19-
Then each branch that have `.workflows` folder will create a Workflow CRD out of the files in this folder.
17+
Piper handles the hard work of configuring multibranch pipelines for us! At initialization, it will load all configuration and create a webhook in repository or organization scope. Then, for each branch that has a `.workflows` folder, Piper will create a Workflow CRD out of the files in this folder. Finally, when Piper detects changes in the repository via the webhook, it triggers the workflows that match the branch and event.
2018

21-
![type:video](./img/piper-demo-1080.mp4)
19+
![type:video](./img/piper-demo-1080.mp4)

docs/usage/global_variables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Global variables
1+
## Global Variables
22

33
Piper will automatically add Workflow scope parameters that can be referenced from any template.
44
The parameters taken from webhook metadata, and will be populated respectively to GitProvider and event that triggered the workflow.

docs/usage/workflows_config.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ Piper can inject configuration for Workflows that Piper creates.
55
`default` config used as a convention for all Workflows that piper will create, even if not explicitly mentioned in triggers.yaml file.
66

77
### ConfigMap
8+
89
Piper will mount a configMap when helm used.
910
`piper.workflowsConfig` variable in helm chart, will create a configMap that hold set of configuration for Piper.
1011
Here is an [examples](https://github.com/quickube/piper/tree/main/examples/config.yaml) of such configuration.
1112

1213
### Spec
13-
This will be injected to Workflow spec field. can hold all configuration of the Workflow.
14+
15+
This will be injected to Workflow spec field. can hold all configuration of the Workflow.
1416
> :warning: Please notice that the fields `entrypoint` and `onExit` should not exist in spec. both of them are managed fields.
1517
1618
### onExit
17-
This is the exit handler for each of the Workflows create by piper.
18-
It configures a DAG that will be executed when the workflow ends.
19-
You can provide the templates to it us in the following [Examples](https://github.com/quickube/piper/tree/main/examples/config.yaml).
19+
20+
This is the exit handler for each of the Workflows create by piper.
21+
It configures a DAG that will be executed when the workflow ends.
22+
You can provide the templates to it us in the following [Examples](https://github.com/quickube/piper/tree/main/examples/config.yaml).

docs/usage/workflows_folder.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ We will explain each of the files that should be included in the `.workflows` fo
55

66
### triggers.yaml (convention name)
77

8-
This file holds a list of triggers that will be executed `onStart` by `events` from specific `branches`.
8+
This file holds a list of triggers that will be executed `onStart` by `events` from specific `branches`.
99
Piper will execute each of matching triggers, so configure it wisely.
10+
1011
```yaml
1112
- events:
1213
- push
@@ -17,50 +18,57 @@ Piper will execute each of matching triggers, so configure it wisely.
1718
templates: ["templates.yaml"]
1819
config: "default"
1920
```
20-
Can be found [here](https://github.com/quickube/piper/tree/main/examples/.workflows/triggers.yaml).
21+
22+
This example can be found [here](https://github.com/quickube/piper/tree/main/examples/.workflows/triggers.yaml).
2123
2224
In this example `main.yaml` will be executed as DAG when `push` or `pull_request.synchronize` events will be applied in `main` branch.
2325
`onExit` will be executed `exit.yaml` when finished the workflow as exit handler.
2426

25-
2627
`onExit` can overwrite the default `onExit` configuration from by reference existing DAG tasks as in the [example](https://github.com/quickube/piper/tree/main/examples/.workflows/exit.yaml).
2728

2829
`config` field used for workflow configuration selection. the default value is `default` configuration.
2930

3031
#### events
31-
Events field used to terminate when the trigger will be executed. name of the event depends on the git provider.
32+
33+
Events field used to terminate when the trigger will be executed. name of the event depends on the git provider.
3234

3335
For instance, GitHub pull_request event have few action, one of them is synchronize.
3436

3537
#### branches
38+
3639
For which branch that trigger will be executed.
3740

38-
#### onStart
41+
#### onStart
42+
3943
This [file](https://github.com/quickube/piper/tree/main/examples/.workflows/main.yaml) can be named as you wish and will be referenced in `triggers.yaml` file. It will define an entrypoint DAG that the Workflow will execute.
4044

4145
As a best practice, this file should contain the dependencies logic and parametrization of each of referenced templates. It should not implement new templates, for this, use template.yaml file.
4246

43-
#### onExit
47+
#### onExit
48+
4449
This field used to pass verbose exitHandler to the triggered workflow.
4550
It will override the default onExit from the provided `config` or the default `config`.
4651

4752
In the provided `exit.yaml` describes a DAG that will overwrite the default `onExit` configuration.
4853
[Example](https://github.com/quickube/piper/tree/main/examples/.workflows/exit.yaml)
4954

50-
#### templates
51-
This field will have additional templates that will be injected to the workflows.
55+
#### templates
56+
57+
This field will have additional templates that will be injected to the workflows.
5258
The purpose of this field is to create repository scope templates that can be referenced from the DAGs templates at `onStart` or `onExit`.
5359
[Example](https://github.com/quickube/piper/tree/main/examples/.workflows/templates.yaml)
5460

5561
As a best practice, use this field for template implementation and reference them from executed.
5662
[Example](https://github.com/quickube/piper/tree/main/examples/.workflows/main.yaml).
5763

5864
### config
59-
configured by `piper-workflows-config` [configMap](workflows_config.md).
65+
66+
configured by `piper-workflows-config` [configMap](workflows_config.md).
6067
Can be passed explicitly, or will use `deafault` configuration.
6168

6269
### parameters.yaml (convention name)
63-
Will hold a list of global parameters of the Workflow.
64-
can be referenced from any template with `{{ workflow.parameters.___ }}.`
6570

66-
[Example](https://github.com/quickube/piper/tree/main/examples/.workflows/parameters.yaml)
71+
Will hold a list of global parameters of the Workflow.
72+
Can be referenced from any template with `{{ workflow.parameters.___ }}.`
73+
74+
[Example](https://github.com/quickube/piper/tree/main/examples/.workflows/parameters.yaml)

examples/.workflows/templates.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
image: alpine
77
command: [ sh ]
88
source: |
9-
echo "wellcome to {{ workflow.parameters.global }}
10-
echo "{{ inputs.parameters.message }}"
9+
echo "welcome to {{ workflow.parameters.global }}
10+
echo "{{ inputs.parameters.message }}"

0 commit comments

Comments
 (0)