diff --git a/stack/README.md b/stack/README.md index 870b694..b4fa639 100644 --- a/stack/README.md +++ b/stack/README.md @@ -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 @@ -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 diff --git a/stack/docs/quickstarts/KUBERNETES.md b/stack/docs/quickstarts/KUBERNETES.md index cf2fe1e..2a9fc51 100644 --- a/stack/docs/quickstarts/KUBERNETES.md +++ b/stack/docs/quickstarts/KUBERNETES.md @@ -24,35 +24,28 @@ 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= - 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. @@ -60,6 +53,6 @@ You will need to bring your own hardware (machine) for this guide. 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. ``` diff --git a/stack/docs/quickstarts/VAGRANTLVIRT.md b/stack/docs/quickstarts/VAGRANTLVIRT.md index 54e710d..4a75e2c 100644 --- a/stack/docs/quickstarts/VAGRANTLVIRT.md +++ b/stack/docs/quickstarts/VAGRANTLVIRT.md @@ -364,28 +364,44 @@ This option will also create a VM and provision an OS onto it. -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. ```
example output + 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 + ``` +
1. Start the machine to be provisioned @@ -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 ```
@@ -477,3 +493,11 @@ This option will also create a VM and provision an OS onto it. ```bash ssh tink@192.168.56.43 # user/pass => tink/tink ``` + +1. Clean up + + After you're done with the playground, clean up all VMs: + + ```bash + vagrant destroy + ``` diff --git a/stack/docs/quickstarts/VAGRANTVBOX.md b/stack/docs/quickstarts/VAGRANTVBOX.md index 14c5484..fd6e666 100644 --- a/stack/docs/quickstarts/VAGRANTVBOX.md +++ b/stack/docs/quickstarts/VAGRANTVBOX.md @@ -349,28 +349,44 @@ This option will also create a VM and provision an OS onto it.
-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. ```
example output + 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 + ``` +
1. Start the machine to be provisioned @@ -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 ```
@@ -470,3 +486,11 @@ This option will also create a VM and provision an OS onto it. ```bash ssh tink@192.168.56.43 # user/pass => tink/tink ``` + +1. Clean up + + After you're done with the playground, clean up all VMs: + + ```bash + vagrant destroy + ``` diff --git a/stack/vagrant/.env b/stack/vagrant/.env index 430cb07..58b1ca4 100644 --- a/stack/vagrant/.env +++ b/stack/vagrant/.env @@ -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 diff --git a/stack/vagrant/Vagrantfile b/stack/vagrant/Vagrantfile index 9c2ea76..131e30f 100644 --- a/stack/vagrant/Vagrantfile +++ b/stack/vagrant/Vagrantfile @@ -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" diff --git a/stack/vagrant/setup.sh b/stack/vagrant/setup.sh old mode 100644 new mode 100755 index 5552eec..b5e1cf5 --- a/stack/vagrant/setup.sh +++ b/stack/vagrant/setup.sh @@ -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() { @@ -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}" diff --git a/stack/vagrant/template.yaml b/stack/vagrant/template.yaml index 9eb9f42..85cbb73 100644 --- a/stack/vagrant/template.yaml +++ b/stack/vagrant/template.yaml @@ -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