Skip to content

Commit 72b5afd

Browse files
Merge pull request #414 from jacobweinstock/add-tilt
Add tilt and doc on CAPT development with the Playground: ## Description <!--- Please describe what this PR is going to change --> Add tilt and doc on CAPT development with the Playground ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 29325b7 + da25e81 commit 72b5afd

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

Tiltfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
docker_build(
2+
'ghcr.io/tinkerbell/cluster-api-provider-tinkerbell',
3+
'.',
4+
dockerfile='Dockerfile',
5+
)
6+
k8s_yaml(kustomize('./config/default'))
7+
default_registry('ttl.sh/meohmy-dghentld')

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)