Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit b2f710b

Browse files
authored
Merge pull request #407 from cprivitere/Update-build-guide
📖 Update build guide
2 parents d475426 + 157b8cb commit b2f710b

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

docs/BUILD.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,98 @@ This document describes how to build and iterate upon the Equinix Metal (formerl
55
This is _not_ intended for regular users.
66

77
We recommend following the upstream [Developing Cluster API with Tilt](https://cluster-api.sigs.k8s.io/developer/tilt.html) guide for iterative test and development of CAPP.
8+
9+
## Example workflow
10+
11+
1. `git clone kubernetes-sigs/cluster-api-provider-packet`
12+
13+
1. `git clone kubernetes-sigs/cluster-api`
14+
15+
1. Move to the cluster-api-provider-packet directory
16+
17+
```sh
18+
cd cluster-api-provider-packet
19+
```
20+
21+
1. `git checkout "branch-you're-testing"`
22+
23+
1. Move to the cluster-api directory you checked out earlier:
24+
25+
```sh
26+
cd ../cluster-api
27+
```
28+
29+
1. Install tilt and kind
30+
31+
```sh
32+
brew install tilt
33+
brew install kind
34+
```
35+
36+
1. Create the tilt-settings.json file in the cluster-api folder.
37+
38+
```sh
39+
touch cluster-api/tilt-settings.json
40+
```
41+
42+
1. Copy the following into that file, updating the <> sections with relevant info:
43+
44+
```json
45+
{
46+
"default_registry": "ghcr.io/<your github username>",
47+
"provider_repos": ["../cluster-api-provider-packet"],
48+
"enable_providers": ["packet","kubeadm-bootstrap","kubeadm-control-plane"],
49+
"kustomize_substitutions": {
50+
"PACKET_API_KEY": "<API_KEY>",
51+
"EXP_CLUSTER_RESOURCE_SET": "true",
52+
"EXP_MACHINE_POOL": "true",
53+
"CLUSTER_TOPOLOGY": "true"
54+
}
55+
}
56+
```
57+
58+
1. Create a cluster.
59+
1. Change to the directory where you checked out both projects
60+
61+
```sh
62+
cd ~
63+
```
64+
65+
1. Run the kind install for capd script included in the cluster-api repository:
66+
67+
```sh
68+
cluster-api/hack/kind-install-for-capd.sh
69+
```
70+
71+
1. Navigate to the cluster-api directory and run:
72+
73+
```sh
74+
tilt up
75+
```
76+
77+
1. Get another terminal window
78+
79+
```sh
80+
cd cluster-api-provider-packet
81+
```
82+
83+
1. You now have a choice:
84+
85+
* clusterctl
86+
87+
```sh
88+
clusterctl generate cluster my-cluster --kubernetes-version=1.23.6 --control-plane-machine-count=1 --worker-machine-count=1 --from templates/cluster-template-kube-vip.yaml > test-kube-vip.yaml
89+
```
90+
91+
1. Set your kubernetes context to the cluster created in kind
92+
93+
```sh
94+
kubectl apply -f test-kube-vip.yaml
95+
```
96+
97+
* e2e testing
98+
1. Run your e2e tests.
99+
100+
```sh
101+
make test-e2e-local
102+
```

0 commit comments

Comments
 (0)