Skip to content

Commit 0d380c4

Browse files
committed
docs: add prerequisites/usage guide for development
Signed-off-by: cheese-cakee <farzanaman99@gmail.com>
1 parent 1c045f7 commit 0d380c4

1 file changed

Lines changed: 36 additions & 26 deletions

File tree

CONTRIBUTING.md

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ If your change introduces a user-facing change, please update the following sect
161161

162162
```md
163163
**Does this PR introduce a user-facing change?**:
164+
164165
- **How are users affected by this change**:
165166
- **Is this breaking change**:
166167
- **How to migrate (if breaking change)**:
@@ -170,6 +171,15 @@ Note that if it's a new breaking change, make sure to complete the two latter qu
170171

171172
## Development
172173

174+
### Prerequisites
175+
176+
Before you start, ensure you have the following installed:
177+
178+
- **Go** (Check `go.mod` for the required version)
179+
- **Docker** (For running local clusters)
180+
- **Make** (For build commands)
181+
- **Python & Pip** (Optional, for pre-commit hooks)
182+
173183
PipeCD consists of several components and docs:
174184

175185
- **cmd/pipecd**: A centralized component that manages deployment data and provides a gRPC API for connecting pipeds, as well as web functionalities such as authentication. [README.md](./cmd/pipecd/README.md)
@@ -193,7 +203,7 @@ Run `make update/go-deps` and `make update/web-deps` to update the dependencies.
193203

194204
In order to start a local development environment, a registry needs to be running locally.
195205

196-
Run `make up/local-cluster` to start a local registry.
206+
Run `make up/local-cluster` to start a local registry.
197207

198208
This will create the kubernetes namespace `pipecd` if it does not exist and start a local registry in the namespace which can then be accessed by other components.
199209

@@ -224,38 +234,38 @@ To login, you can use the configured static admin account as below:
224234

225235
2. Access to Control Plane console, go to Piped list page - click the three vertical dots on the top right corner and then click on settings. After clicking on settings you will land on the Piped settings page. Next, add a new piped.
226236

227-
Alternatively, you can go to `http://localhost:8080/settings/piped?project=quickstart`, please adjust the port and the project in the url if they are different from default.
237+
Alternatively, you can go to `http://localhost:8080/settings/piped?project=quickstart`, please adjust the port and the project in the url if they are different from default.
228238

229239
Then, copy generated Piped ID and base64 key for `piped-config.yaml`
230240

231241
3. Create the piped configuration file `piped-config.yaml`, ideally in the root of the repository.
232242

233-
>**NOTE**
234-
>If you want to work on multiple piped configuration files, it is recommended to create a .dev folder in the root of the repository and save them there. The .dev folder is configured in .gitignore, and thus, would not include your piped files in your commits.
243+
> **NOTE**
244+
> If you want to work on multiple piped configuration files, it is recommended to create a .dev folder in the root of the repository and save them there. The .dev folder is configured in .gitignore, and thus, would not include your piped files in your commits.
235245
236246
Below is an exampled piped v0 configuration using the Kubernetes platform provider. Use the PipeD ID and base64 key you created in step 2 here.
237247

238-
```yaml
239-
apiVersion: pipecd.dev/v1beta1
240-
kind: Piped
241-
spec:
242-
projectID: quickstart
243-
pipedID: <YOUR PIPED ID> # Base64 encoded string of the piped private key.
244-
pipedKeyData: <YOUR PIPED BASE64 KEY> # FIXME: Replace here with your piped base64 key.
245-
apiAddress: localhost:8080 # Write in a format "localhost:port"
246-
#Replace with your piped address if you connect Piped to a control plane that does not run locally, or runs on a different port.
247-
repositories:
248-
- repoId: example
249-
remote: git@github.com:pipe-cd/examples.git
250-
branch: master
251-
syncInterval: 1m
252-
platformProviders:
253-
- name: example-kubernetes
254-
type: KUBERNETES
255-
config:
256-
# FIXME: Replace here with your kubeconfig absolute file path.
257-
kubeConfigPath: /path/to/.kube/config
258-
```
248+
```yaml
249+
apiVersion: pipecd.dev/v1beta1
250+
kind: Piped
251+
spec:
252+
projectID: quickstart
253+
pipedID: <YOUR PIPED ID> # Base64 encoded string of the piped private key.
254+
pipedKeyData: <YOUR PIPED BASE64 KEY> # FIXME: Replace here with your piped base64 key.
255+
apiAddress: localhost:8080 # Write in a format "localhost:port"
256+
#Replace with your piped address if you connect Piped to a control plane that does not run locally, or runs on a different port.
257+
repositories:
258+
- repoId: example
259+
remote: git@github.com:pipe-cd/examples.git
260+
branch: master
261+
syncInterval: 1m
262+
platformProviders:
263+
- name: example-kubernetes
264+
type: KUBERNETES
265+
config:
266+
# FIXME: Replace here with your kubeconfig absolute file path.
267+
kubeConfigPath: /path/to/.kube/config
268+
```
259269
260270
4. Once you have configured your piped configuration file, start the Piped agent with the following command:
261271
@@ -265,7 +275,7 @@ CONFIG_FILE=path/to/piped-config.yaml \
265275
INSECURE=true
266276
```
267277

268-
where the `CONFIG_FILE` is the path to your piped confiuration file and the `INSECURE` flag is set to `true` to allow `piped` to connect to the control plane without TLS verification.
278+
where the `CONFIG_FILE` is the path to your piped configuration file and the `INSECURE` flag is set to `true` to allow `piped` to connect to the control plane without TLS verification.
269279

270280
Replace `path/to/piped-config.yaml` with the actual path to your configuration file.
271281

0 commit comments

Comments
 (0)