Skip to content

Commit da25e81

Browse files
Add doc for playground development:
This will help with local development of CAPT. Signed-off-by: Jacob Weinstock <[email protected]>
1 parent 4a27bad commit da25e81

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/PLAYGROUND.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# CAPT development setup with the Playground
2+
3+
This document describes how to set up a development environment for CAPT using the Playground.
4+
5+
The following repositories are required for the CAPT development setup.
6+
7+
- `github.com/tinkerbell/cluster-api-provider-tinkerbell`
8+
- `github.com/tinkerbell/playground`.
9+
10+
## Setup
11+
12+
1. Fork the CAPT repository in GitHub.
13+
1. Clone CAPT and the Playground repositories to your local machine.
14+
15+
```bash
16+
git clone [email protected]:<your user>/cluster-api-provider-tinkerbell.git
17+
git clone https://github.com/tinkerbell/playground.git
18+
```
19+
20+
1. Create a local release in CAPT.
21+
22+
```bash
23+
cd cluster-api-provider-tinkerbell
24+
make release-local
25+
```
26+
27+
1. In the `config.yaml`, set `capt.providerRepository` to the local release directory, minus the version. For example: `capt.providerRepository: /home/user/cluster-api-provider-tinkerbell/out/release/infrastructure-tinkerbell`
28+
29+
```bash
30+
cd playground/capt
31+
sed -i 's|providerRepository:.*|providerRepository: /home/user/cluster-api-provider-tinkerbell/out/release/infrastructure-tinkerbell|' config.yaml
32+
```
33+
34+
1. Create the CAPT playground. Once the playground gets to the prompt waiting for user input, leave it for now and move on to the next step in this doc.
35+
36+
```bash
37+
cd playground/capt
38+
task create-playground
39+
```
40+
41+
1. Deploy the local CAPT code.
42+
43+
```bash
44+
cd cluster-api-provider-tinkerbell
45+
export KUBECONFIG=<playground repo>/capt/output/kind.kubeconfig
46+
tilt up --stream
47+
```
48+
49+
1. Enter `y` in the CAPT Playground prompt and follow the post creation instructions.

0 commit comments

Comments
 (0)