Skip to content

Commit c7bb9bc

Browse files
authored
Align playground to newest tinkerbell (#212)
## Description This PR makes a couple of changes to align the playground examples with the newest Tinkerbell releases: - Updates in-repo docs to newest Helm chart - Updates the Tinkerbell release to the newest `0.19.1` - Replaces the `tink-system` namespace with the `tinkerbell` namespace, aligning the playground examples with the newest Tinkerbell Helm chart install instructions from [tinkerbell.org](https://tinkerbell.org/docs/setup/install/) ## Why is this needed Fixes: #211 ## How Has This Been Tested? I've run through the playground setup steps with the libvirt provider and successfully provisioned `machine1`. ## How are existing users impacted? What migration steps/scripts do we need? There should be no existing user impact. ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required)
2 parents 091b761 + 47ed120 commit c7bb9bc

File tree

8 files changed

+80
-39
lines changed

8 files changed

+80
-39
lines changed

stack/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Tinkerbell Stack Playground
22

3-
The following section container the Tinkerbell stack playground instructions. It is not a production reference architecture.
4-
Please use the [Helm chart](https://github.com/tinkerbell/charts) for production deployments.
3+
The following section contains the Tinkerbell stack playground instructions. It is not a production reference architecture.
4+
Please use the [Helm chart](https://github.com/tinkerbell/tinkerbell/tree/main/helm/tinkerbell) for production deployments.
55

66
## Quick-Starts
77

@@ -25,13 +25,13 @@ By default the Vagrant quickstart guides automatically install Ubuntu on the VM
2525
vagrant ssh stack
2626
```
2727

28-
1. Add your template. An example Template object can be found [here](https://github.com/tinkerbell/tink/tree/main/config/crd/examples/template.yaml) and more Template documentation can be found [here](https://tinkerbell.org/docs/concepts/templates/).
28+
1. Add your template. Template documentation can be found [here](https://tinkerbell.org/docs/concepts/templates/).
2929

3030
```bash
3131
kubectl apply -f my-OS-template.yaml
3232
```
3333

34-
1. Create the workflow. An example Workflow object can be found [here](https://github.com/tinkerbell/tink/tree/main/config/crd/examples/workflow.yaml).
34+
1. Create the workflow. Documentation on Workflows can be found [here](https://tinkerbell.org/docs/concepts/workflows/).
3535

3636
```bash
3737
kubectl apply -f my-custom-workflow.yaml

stack/docs/quickstarts/KUBERNETES.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,42 +24,35 @@ You will need to bring your own hardware (machine) for this guide.
2424

2525
1. Install the Tinkerbell stack Helm chart
2626

27-
```bash
28-
trusted_proxies=$(kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}' | tr ' ' ',')
29-
LB_IP=<specify a Load balancer IP>
30-
STACK_CHART_VERSION=0.6.2
31-
helm install tink-stack oci://ghcr.io/tinkerbell/charts/stack --version "$STACK_CHART_VERSION" --create-namespace --namespace tink --wait --set "global.trustedProxies={${trusted_proxies}}" --set "global.publicIP=$LB_IP"
32-
```
33-
34-
> These instructions above should be checked against the Charts repo before using. See the [README.md](https://github.com/tinkerbell/charts/tree/main/tinkerbell/stack) in the Helm chart repository for more information on how to use the Helm chart.
27+
To install Tinkerbell, follow the official [install documentation](https://tinkerbell.org/docs/setup/install/).
3528

3629
1. Verify the stack is up and running
3730

3831
```bash
39-
kubectl get pods -n tink-system # verify all pods are running
40-
kubectl get svc -n tink-system # Verify the tink-stack service has the IP you specified with $LB_IP under the EXTERNAL-IP column
32+
kubectl get pods -n tinkerbell # verify all pods are running
33+
kubectl get svc -n tinkerbell # Verify the tink-stack service has the IP you specified with $LB_IP under the EXTERNAL-IP column
4134
```
4235

4336
1. Download and convert a cloud image to a raw image
4437

4538
```bash
46-
kubectl apply -n tink-system -f https://raw.githubusercontent.com/tinkerbell/playground/main/vagrant/ubuntu-download.yaml
39+
kubectl apply -n tinkerbell -f https://raw.githubusercontent.com/tinkerbell/playground/refs/heads/main/stack/vagrant/ubuntu-download.yaml
4740
# This will download and convert the Ubuntu Jammy 22.04 cloud image.
4841
```
4942

50-
1. Create and/or customize Hardware, Template, and Workflow objects and apply them to the cluster. You can use the Hardware, Template, and Workflow in this repo, in the `vagrant/` directory, as a base from which to start.
43+
1. Create and/or customize Hardware, Template, and Workflow objects and apply them to the cluster. You can use the Hardware, Template, and Workflow in this repo, in the `stack/vagrant/` directory, as a base from which to start.
5144

5245
```bash
53-
kubectl apply -n tink-system -f my-hardware.yaml
54-
kubectl apply -n tink-system -f my-template.yaml
55-
kubectl apply -n tink-system -f my-workflow.yaml
46+
kubectl apply -n tinkerbell -f my-hardware.yaml
47+
kubectl apply -n tinkerbell -f my-template.yaml
48+
kubectl apply -n tinkerbell -f my-workflow.yaml
5649
```
5750

5851
1. Start the machine provision process by rebooting, into a netbooting state, the machine you have specified in the Hardware object above.
5952

6053
1. Watch the progress of the workflow.
6154

6255
```bash
63-
kubectl get workflow -n tink-system --watch
64-
# Once the workflow is state is `STATE_SUCCESS`, you can login to the machine via the console or via SSH.
56+
kubectl get workflow -n tinkerbell --watch
57+
# Once the workflow state is `SUCCESS`, you can login to the machine via the console or via SSH.
6558
```

stack/docs/quickstarts/VAGRANTLVIRT.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,28 +364,44 @@ This option will also create a VM and provision an OS onto it.
364364
365365
</details>
366366
367-
1. Wait for HookOS and Ubuntu image to be downloaded
367+
1. Wait for Ubuntu image and HookOS to be downloaded
368368
369369
```bash
370370
vagrant ssh stack
371-
kubectl get jobs -n tink-system --watch
371+
kubectl get jobs -n tinkerbell --watch
372+
kubectl get pods -n tinkerbell --watch
372373
exit
373-
# There are 2 Kubernetes jobs that run to download HookOS and the Ubuntu image.
374-
# Once both jobs are complete exit the stack VM.
374+
# There is one Kubernetes job to download the Ubuntu image and an init
375+
# container in the hookos pod downloading the HookOS artifacts.
376+
# Once the job is completed and the hookos pod is in running state, exit
377+
# the stack VM.
375378
```
376379
377380
<details>
378381
<summary>example output</summary>
379382
383+
Ubuntu image download:
384+
380385
```bash
386+
kubectl get jobs -n tinkerbell --watch
381387
NAME COMPLETIONS DURATION AGE
382-
download-hook 1/1 27s 72s
383388
download-ubuntu-jammy 0/1 49s 49s
384389
download-ubuntu-jammy 0/1 70s 70s
385390
download-ubuntu-jammy 0/1 72s 72s
386391
download-ubuntu-jammy 1/1 72s 72s
387392
```
388393
394+
HookOS pod:
395+
396+
```bash
397+
kubectl get pods -n tinkerbell --watch
398+
NAME READY STATUS RESTARTS AGE
399+
download-ubuntu-jammy-2w4wn 0/1 Completed 0 38m
400+
hookos-58b848576b-hzsv4 2/2 Running 0 38m
401+
kube-vip-kzr6k 1/1 Running 0 38m
402+
tinkerbell-94b85bb97-tkr9q 1/1 Running 0 38m
403+
```
404+
389405
</details>
390406
391407
1. Start the machine to be provisioned
@@ -442,7 +458,7 @@ This option will also create a VM and provision an OS onto it.
442458
443459
# watch for the workflow to complete
444460
# once the workflow is complete (see the expected output below for completion), move on to the next step
445-
kubectl get -n tink-system workflow playground-workflow --watch
461+
kubectl get -n tinkerbell workflow playground-workflow --watch
446462
```
447463
448464
<details>
@@ -477,3 +493,11 @@ This option will also create a VM and provision an OS onto it.
477493
```bash
478494
ssh [email protected] # user/pass => tink/tink
479495
```
496+
497+
1. Clean up
498+
499+
After you're done with the playground, clean up all VMs:
500+
501+
```bash
502+
vagrant destroy
503+
```

stack/docs/quickstarts/VAGRANTVBOX.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,28 +349,44 @@ This option will also create a VM and provision an OS onto it.
349349
350350
</details>
351351
352-
1. Wait for HookOS and Ubuntu image to be downloaded
352+
1. Wait for Ubuntu image and HookOS to be downloaded
353353
354354
```bash
355355
vagrant ssh stack
356-
kubectl get jobs -n tink-system --watch
356+
kubectl get jobs -n tinkerbell --watch
357+
kubectl get pods -n tinkerbell --watch
357358
exit
358-
# There are 2 Kubernetes jobs that run to download HookOS and the Ubuntu image.
359-
# Once both jobs are complete exit the stack VM.
359+
# There is one Kubernetes job to download the Ubuntu image and an init
360+
# container in the hookos pod downloading the HookOS artifacts.
361+
# Once the job is completed and the hookos pod is in running state, exit
362+
# the stack VM.
360363
```
361364
362365
<details>
363366
<summary>example output</summary>
364367
368+
Ubuntu image download:
369+
365370
```bash
371+
kubectl get jobs -n tinkerbell --watch
366372
NAME COMPLETIONS DURATION AGE
367-
download-hook 1/1 27s 72s
368373
download-ubuntu-jammy 0/1 49s 49s
369374
download-ubuntu-jammy 0/1 70s 70s
370375
download-ubuntu-jammy 0/1 72s 72s
371376
download-ubuntu-jammy 1/1 72s 72s
372377
```
373378
379+
HookOS pod:
380+
381+
```bash
382+
kubectl get pods -n tinkerbell --watch
383+
NAME READY STATUS RESTARTS AGE
384+
download-ubuntu-jammy-2w4wn 0/1 Completed 0 38m
385+
hookos-58b848576b-hzsv4 2/2 Running 0 38m
386+
kube-vip-kzr6k 1/1 Running 0 38m
387+
tinkerbell-94b85bb97-tkr9q 1/1 Running 0 38m
388+
```
389+
374390
</details>
375391
376392
1. Start the machine to be provisioned
@@ -435,7 +451,7 @@ This option will also create a VM and provision an OS onto it.
435451

436452
# watch for the workflow to complete
437453
# once the workflow is complete (see the example output below for completion), move on to the next step
438-
kubectl get -n tink-system workflow playground-workflow --watch
454+
kubectl get -n tinkerbell workflow playground-workflow --watch
439455
```
440456
441457
<details>
@@ -470,3 +486,11 @@ This option will also create a VM and provision an OS onto it.
470486
```bash
471487
ssh [email protected] # user/pass => tink/tink
472488
```
489+
490+
1. Clean up
491+
492+
After you're done with the playground, clean up all VMs:
493+
494+
```bash
495+
vagrant destroy
496+
```

stack/vagrant/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MACHINE1_IP=192.168.56.43
66
MACHINE1_MAC=08:00:27:9e:f5:3a
77

88
# https://github.com/tinkerbell/tinkerbell/pkgs/container/charts%2Ftinkerbell
9-
HELM_CHART_VERSION=v0.17.1
9+
HELM_CHART_VERSION=v0.19.2
1010
KUBECTL_VERSION=1.32.4
1111
K3D_VERSION=v5.8.3
1212
HELM_VERSION=v3.17.0

stack/vagrant/Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LOADBALANCER_IP_2 = ENV["LOADBALANCER_IP_2"] || "192.168.56.41"
1616
GATEWAY_IP = ENV["GATEWAY_IP"] || ""
1717
MACHINE1_IP = ENV["MACHINE1_IP"] || "192.168.56.43"
1818
MACHINE1_MAC = (ENV["MACHINE1_MAC"] || "08:00:27:9E:F5:3A").downcase
19-
HELM_CHART_VERSION = ENV["HELM_CHART_VERSION"] || "0.17.0"
19+
HELM_CHART_VERSION = ENV["HELM_CHART_VERSION"] || "0.19.1"
2020
KUBECTL_VERSION = ENV["KUBECTL_VERSION"] || "1.28.3"
2121
K3D_VERSION = ENV["K3D_VERSION"] || "v5.6.0"
2222
HELM_VERSION = ENV["HELM_VERSION"] || "v3.14.4"

stack/vagrant/setup.sh

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ helm_install_tink_stack() {
8181
--wait \
8282
--set "trustedProxies={${trusted_proxies}}" \
8383
--set "publicIP=$loadbalancer_ip" \
84-
--set "artifactsFileServer=http://$loadbalancer_ip_2:8080" \
84+
--set "artifactsFileServer=http://$loadbalancer_ip_2:7173" \
8585
--set "deployment.init.sourceInterface=$interface" \
86-
--set "kubevip.interface=$interface"
86+
--set "optional.kubevip.interface=$interface"
8787
}
8888

8989
apply_manifests() {
@@ -119,7 +119,7 @@ run_helm() {
119119
local helm_chart_version=$6
120120
local loadbalancer_interface=$7
121121
local k3d_version=$8
122-
local namespace="tink-system"
122+
local namespace="tinkerbell"
123123
local helm_version=$9
124124
local loadbalancer_ip_2="${10}"
125125

stack/vagrant/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
timeout: 600
2121
environment:
2222
DEST_DISK: {{ index .Hardware.Disks 0 }}
23-
IMG_URL: "http://$TINKERBELL_HOST_IP:8080/jammy-server-cloudimg-amd64.raw.gz"
23+
IMG_URL: "http://$TINKERBELL_HOST_IP:7173/jammy-server-cloudimg-amd64.raw.gz"
2424
COMPRESSED: true
2525
- name: "grow-partition"
2626
image: quay.io/tinkerbell/actions/cexec:latest

0 commit comments

Comments
 (0)