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
8 changes: 4 additions & 4 deletions stack/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Tinkerbell Stack Playground

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

## Quick-Starts

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

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/).
1. Add your template. Template documentation can be found [here](https://tinkerbell.org/docs/concepts/templates/).

```bash
kubectl apply -f my-OS-template.yaml
```

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

```bash
kubectl apply -f my-custom-workflow.yaml
Expand Down
27 changes: 10 additions & 17 deletions stack/docs/quickstarts/KUBERNETES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,35 @@ You will need to bring your own hardware (machine) for this guide.

1. Install the Tinkerbell stack Helm chart

```bash
trusted_proxies=$(kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}' | tr ' ' ',')
LB_IP=<specify a Load balancer IP>
STACK_CHART_VERSION=0.6.2
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"
```

> 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.
To install Tinkerbell, follow the official [install documentation](https://tinkerbell.org/docs/setup/install/).

1. Verify the stack is up and running

```bash
kubectl get pods -n tink-system # verify all pods are running
kubectl get svc -n tink-system # Verify the tink-stack service has the IP you specified with $LB_IP under the EXTERNAL-IP column
kubectl get pods -n tinkerbell # verify all pods are running
kubectl get svc -n tinkerbell # Verify the tink-stack service has the IP you specified with $LB_IP under the EXTERNAL-IP column
```

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

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

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.
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.

```bash
kubectl apply -n tink-system -f my-hardware.yaml
kubectl apply -n tink-system -f my-template.yaml
kubectl apply -n tink-system -f my-workflow.yaml
kubectl apply -n tinkerbell -f my-hardware.yaml
kubectl apply -n tinkerbell -f my-template.yaml
kubectl apply -n tinkerbell -f my-workflow.yaml
```

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

1. Watch the progress of the workflow.

```bash
kubectl get workflow -n tink-system --watch
# Once the workflow is state is `STATE_SUCCESS`, you can login to the machine via the console or via SSH.
kubectl get workflow -n tinkerbell --watch
# Once the workflow state is `SUCCESS`, you can login to the machine via the console or via SSH.
```
36 changes: 30 additions & 6 deletions stack/docs/quickstarts/VAGRANTLVIRT.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,28 +364,44 @@ This option will also create a VM and provision an OS onto it.

</details>

1. Wait for HookOS and Ubuntu image to be downloaded
1. Wait for Ubuntu image and HookOS to be downloaded

```bash
vagrant ssh stack
kubectl get jobs -n tink-system --watch
kubectl get jobs -n tinkerbell --watch
kubectl get pods -n tinkerbell --watch
exit
# There are 2 Kubernetes jobs that run to download HookOS and the Ubuntu image.
# Once both jobs are complete exit the stack VM.
# There is one Kubernetes job to download the Ubuntu image and an init
# container in the hookos pod downloading the HookOS artifacts.
# Once the job is completed and the hookos pod is in running state, exit
# the stack VM.
```

<details>
<summary>example output</summary>

Ubuntu image download:

```bash
kubectl get jobs -n tinkerbell --watch
NAME COMPLETIONS DURATION AGE
download-hook 1/1 27s 72s
download-ubuntu-jammy 0/1 49s 49s
download-ubuntu-jammy 0/1 70s 70s
download-ubuntu-jammy 0/1 72s 72s
download-ubuntu-jammy 1/1 72s 72s
```

HookOS pod:

```bash
kubectl get pods -n tinkerbell --watch
NAME READY STATUS RESTARTS AGE
download-ubuntu-jammy-2w4wn 0/1 Completed 0 38m
hookos-58b848576b-hzsv4 2/2 Running 0 38m
kube-vip-kzr6k 1/1 Running 0 38m
tinkerbell-94b85bb97-tkr9q 1/1 Running 0 38m
```

</details>

1. Start the machine to be provisioned
Expand Down Expand Up @@ -442,7 +458,7 @@ This option will also create a VM and provision an OS onto it.

# watch for the workflow to complete
# once the workflow is complete (see the expected output below for completion), move on to the next step
kubectl get -n tink-system workflow playground-workflow --watch
kubectl get -n tinkerbell workflow playground-workflow --watch
```

<details>
Expand Down Expand Up @@ -477,3 +493,11 @@ This option will also create a VM and provision an OS onto it.
```bash
ssh [email protected] # user/pass => tink/tink
```

1. Clean up

After you're done with the playground, clean up all VMs:

```bash
vagrant destroy
```
36 changes: 30 additions & 6 deletions stack/docs/quickstarts/VAGRANTVBOX.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,28 +349,44 @@ This option will also create a VM and provision an OS onto it.

</details>

1. Wait for HookOS and Ubuntu image to be downloaded
1. Wait for Ubuntu image and HookOS to be downloaded

```bash
vagrant ssh stack
kubectl get jobs -n tink-system --watch
kubectl get jobs -n tinkerbell --watch
kubectl get pods -n tinkerbell --watch
exit
# There are 2 Kubernetes jobs that run to download HookOS and the Ubuntu image.
# Once both jobs are complete exit the stack VM.
# There is one Kubernetes job to download the Ubuntu image and an init
# container in the hookos pod downloading the HookOS artifacts.
# Once the job is completed and the hookos pod is in running state, exit
# the stack VM.
```

<details>
<summary>example output</summary>

Ubuntu image download:

```bash
kubectl get jobs -n tinkerbell --watch
NAME COMPLETIONS DURATION AGE
download-hook 1/1 27s 72s
download-ubuntu-jammy 0/1 49s 49s
download-ubuntu-jammy 0/1 70s 70s
download-ubuntu-jammy 0/1 72s 72s
download-ubuntu-jammy 1/1 72s 72s
```

HookOS pod:

```bash
kubectl get pods -n tinkerbell --watch
NAME READY STATUS RESTARTS AGE
download-ubuntu-jammy-2w4wn 0/1 Completed 0 38m
hookos-58b848576b-hzsv4 2/2 Running 0 38m
kube-vip-kzr6k 1/1 Running 0 38m
tinkerbell-94b85bb97-tkr9q 1/1 Running 0 38m
```

</details>

1. Start the machine to be provisioned
Expand Down Expand Up @@ -435,7 +451,7 @@ This option will also create a VM and provision an OS onto it.

# watch for the workflow to complete
# once the workflow is complete (see the example output below for completion), move on to the next step
kubectl get -n tink-system workflow playground-workflow --watch
kubectl get -n tinkerbell workflow playground-workflow --watch
```

<details>
Expand Down Expand Up @@ -470,3 +486,11 @@ This option will also create a VM and provision an OS onto it.
```bash
ssh [email protected] # user/pass => tink/tink
```

1. Clean up

After you're done with the playground, clean up all VMs:

```bash
vagrant destroy
```
2 changes: 1 addition & 1 deletion stack/vagrant/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MACHINE1_IP=192.168.56.43
MACHINE1_MAC=08:00:27:9e:f5:3a

# https://github.com/tinkerbell/tinkerbell/pkgs/container/charts%2Ftinkerbell
HELM_CHART_VERSION=v0.17.1
HELM_CHART_VERSION=v0.19.2
KUBECTL_VERSION=1.32.4
K3D_VERSION=v5.8.3
HELM_VERSION=v3.17.0
2 changes: 1 addition & 1 deletion stack/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LOADBALANCER_IP_2 = ENV["LOADBALANCER_IP_2"] || "192.168.56.41"
GATEWAY_IP = ENV["GATEWAY_IP"] || ""
MACHINE1_IP = ENV["MACHINE1_IP"] || "192.168.56.43"
MACHINE1_MAC = (ENV["MACHINE1_MAC"] || "08:00:27:9E:F5:3A").downcase
HELM_CHART_VERSION = ENV["HELM_CHART_VERSION"] || "0.17.0"
HELM_CHART_VERSION = ENV["HELM_CHART_VERSION"] || "0.19.1"
KUBECTL_VERSION = ENV["KUBECTL_VERSION"] || "1.28.3"
K3D_VERSION = ENV["K3D_VERSION"] || "v5.6.0"
HELM_VERSION = ENV["HELM_VERSION"] || "v3.14.4"
Expand Down
6 changes: 3 additions & 3 deletions stack/vagrant/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ helm_install_tink_stack() {
--wait \
--set "trustedProxies={${trusted_proxies}}" \
--set "publicIP=$loadbalancer_ip" \
--set "artifactsFileServer=http://$loadbalancer_ip_2:8080" \
--set "artifactsFileServer=http://$loadbalancer_ip_2:7173" \
--set "deployment.init.sourceInterface=$interface" \
--set "kubevip.interface=$interface"
--set "optional.kubevip.interface=$interface"
}

apply_manifests() {
Expand Down Expand Up @@ -119,7 +119,7 @@ run_helm() {
local helm_chart_version=$6
local loadbalancer_interface=$7
local k3d_version=$8
local namespace="tink-system"
local namespace="tinkerbell"
local helm_version=$9
local loadbalancer_ip_2="${10}"

Expand Down
2 changes: 1 addition & 1 deletion stack/vagrant/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
timeout: 600
environment:
DEST_DISK: {{ index .Hardware.Disks 0 }}
IMG_URL: "http://$TINKERBELL_HOST_IP:8080/jammy-server-cloudimg-amd64.raw.gz"
IMG_URL: "http://$TINKERBELL_HOST_IP:7173/jammy-server-cloudimg-amd64.raw.gz"
COMPRESSED: true
- name: "grow-partition"
image: quay.io/tinkerbell/actions/cexec:latest
Expand Down