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
7 changes: 7 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
docker_build(
'ghcr.io/tinkerbell/cluster-api-provider-tinkerbell',
'.',
dockerfile='Dockerfile',
)
k8s_yaml(kustomize('./config/default'))
default_registry('ttl.sh/meohmy-dghentld')
49 changes: 49 additions & 0 deletions docs/PLAYGROUND.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# CAPT development setup with the Playground

This document describes how to set up a development environment for CAPT using the Playground.

The following repositories are required for the CAPT development setup.

- `github.com/tinkerbell/cluster-api-provider-tinkerbell`
- `github.com/tinkerbell/playground`.

## Setup

1. Fork the CAPT repository in GitHub.
1. Clone CAPT and the Playground repositories to your local machine.

```bash
git clone [email protected]:<your user>/cluster-api-provider-tinkerbell.git
git clone https://github.com/tinkerbell/playground.git
```

1. Create a local release in CAPT.

```bash
cd cluster-api-provider-tinkerbell
make release-local
```

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`

```bash
cd playground/capt
sed -i 's|providerRepository:.*|providerRepository: /home/user/cluster-api-provider-tinkerbell/out/release/infrastructure-tinkerbell|' config.yaml
```

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.

```bash
cd playground/capt
task create-playground
```

1. Deploy the local CAPT code.

```bash
cd cluster-api-provider-tinkerbell
export KUBECONFIG=<playground repo>/capt/output/kind.kubeconfig
tilt up --stream
```

1. Enter `y` in the CAPT Playground prompt and follow the post creation instructions.
Loading