Skip to content

Commit

Permalink
Clean up: (#186)
Browse files Browse the repository at this point in the history
## Description


Remove references to sandbox. Update versions for helm, k3d, etc. Update template images to use latest as quay.io/tinkerbell/actions/ don't have tags.

## Why is this needed



Fixes: #

## How Has This Been Tested?





## How are existing users impacted? What migration steps/scripts do we need?





## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
mergify[bot] authored Apr 16, 2024
2 parents 6fa4121 + 527cee0 commit c0b959e
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 88 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We're so glad you're here.

### Important Resources

#### bugs: [https://github.com/tinkerbell/sandbox/issues](https://github.com/tinkerbell/sandbox/issues)
#### bugs: [https://github.com/tinkerbell/playground/issues](https://github.com/tinkerbell/playground/issues)

### Code of Conduct

Expand Down Expand Up @@ -34,19 +34,19 @@ If you have `direnv` installed the included `.envrc` will make that step automat

### How to Submit Change Requests

Please submit change requests and / or features via [Issues](https://github.com/tinkerbell/sandbox/issues).
Please submit change requests and / or features via [Issues](https://github.com/tinkerbell/playground/issues).
There's no guarantee it'll be changed, but you never know until you try.
We'll try to add comments as soon as possible, though.

### How to Report a Bug

Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/tinkerbell/sandbox/issues).
Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/tinkerbell/playground/issues).

## Code Style Guides

## Implementation Details

The Sandbox is organized into two high level components: `infrastructure` and `stack`.
The Playground is organized into two high level components: `infrastructure` and `stack`.

- The `infrastructure` component is responsible for provisioning the infrastructure required to run the Tinkerbell stack. `Vagrant` and `Terraform` are the supported infrastructure tools.
- The `stack` component is responsible for provisioning the Tinkerbell stack itself. `Docker Compose` and `Helm` are the supported stack tools.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ By default the Vagrant quickstart guides automatically install Ubuntu on the VM
kubectl apply -f my-custom-workflow.yaml
```

1. Restart the machine to provision (if using the vagrant sandbox test machine this is done by running `vagrant destroy -f machine1 && vagrant up machine1`)
1. Restart the machine to provision (if using the vagrant playground test machine this is done by running `vagrant destroy -f machine1 && vagrant up machine1`)
2 changes: 1 addition & 1 deletion docs/quickstarts/KUBERNETES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You will need to bring your own hardware (machine) for this guide.
1. Download and convert a cloud image to a raw image

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

Expand Down
54 changes: 27 additions & 27 deletions docs/quickstarts/VAGRANTLVIRT.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This option will also create a VM and provision an OS onto it.
==> stack: Creating image (snapshot of base box volume).
==> stack: Creating domain with the following settings...
==> stack: -- Name: vagrant_stack
==> stack: -- Description: Source: /home/tink/repos/tinkerbell/sandbox/vagrant/Vagrantfile
==> stack: -- Description: Source: /home/tink/repos/tinkerbell/playground/vagrant/Vagrantfile
==> stack: -- Domain type: kvm
==> stack: -- Cpus: 2
==> stack: -- Feature: acpi
Expand Down Expand Up @@ -88,15 +88,15 @@ This option will also create a VM and provision an OS onto it.
stack: Removing insecure key from the guest if it's present...
stack: Key inserted! Disconnecting and reconnecting using new SSH key...
==> stack: Machine booted and ready!
==> stack: Rsyncing folder: /home/tink/repos/tinkerbell/sandbox/vagrant/ => /sandbox/stack
==> stack: Rsyncing folder: /home/tink/repos/tinkerbell/playground/vagrant/ => /playground/stack
==> stack: Configuring and enabling network interfaces...
==> stack: Running provisioner: shell...
stack: Running: /tmp/vagrant-shell20231031-285946-1krhzm0.sh
stack: + main 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 0.4.2 eth1 1.28.3 v5.6.0 ''
stack: + main 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 0.4.2 eth1 1.28.3 v5.6.0 ''
stack: + local host_ip=192.168.56.4
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local loadbalancer_ip=192.168.56.5
stack: + local helm_chart_version=0.4.2
stack: + local loadbalancer_interface=eth1
Expand Down Expand Up @@ -228,11 +228,11 @@ This option will also create a VM and provision an OS onto it.
100 47.5M 100 47.5M 0 0 24.8M 0 0:00:01 0:00:01 --:--:-- 37.9M
stack: + chmod +x ./kubectl
stack: + mv ./kubectl /usr/local/bin/kubectl
stack: + run_helm 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 0.4.2 eth1 v5.6.0
stack: + run_helm 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 0.4.2 eth1 v5.6.0
stack: + local host_ip=192.168.56.4
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local loadbalancer_ip=192.168.56.5
stack: + local helm_chart_version=0.4.2
stack: + local loadbalancer_interface=eth1
Expand Down Expand Up @@ -319,10 +319,10 @@ This option will also create a VM and provision an OS onto it.
stack: STATUS: deployed
stack: REVISION: 1
stack: TEST SUITE: None
stack: + apply_manifests 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 tink-system
stack: + apply_manifests 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 tink-system
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local host_ip=192.168.56.5
stack: + local namespace=tink-system
stack: + disk_device=/dev/sda
Expand All @@ -349,8 +349,8 @@ This option will also create a VM and provision an OS onto it.
stack: + kubectl apply -n tink-system -f /tmp/manifests.yaml
stack: hardware.tinkerbell.org/machine1 created
stack: template.tinkerbell.org/ubuntu-jammy created
stack: workflow.tinkerbell.org/sandbox-workflow created
stack: + kubectl apply -n tink-system -f /sandbox/stack//ubuntu-download.yaml
stack: workflow.tinkerbell.org/playground-workflow created
stack: + kubectl apply -n tink-system -f /playground/stack//ubuntu-download.yaml
stack: configmap/download-image created
stack: job.batch/download-ubuntu-jammy created
stack: + kubectl_for_vagrant_user
Expand Down Expand Up @@ -404,7 +404,7 @@ This option will also create a VM and provision an OS onto it.
Bringing machine 'machine1' up with 'libvirt' provider...
==> machine1: Creating domain with the following settings...
==> machine1: -- Name: vagrant_machine1
==> machine1: -- Description: Source: /home/tink/repos/tinkerbell/sandbox/vagrant/Vagrantfile
==> machine1: -- Description: Source: /home/tink/repos/tinkerbell/playground/vagrant/Vagrantfile
==> machine1: -- Domain type: kvm
==> machine1: -- Cpus: 2
==> machine1: -- Feature: acpi
Expand Down Expand Up @@ -442,29 +442,29 @@ 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 sandbox-workflow --watch
kubectl get -n tink-system workflow playground-workflow --watch
```
<details>
<summary>expected output</summary>
```bash
NAME TEMPLATE STATE
sandbox-workflow ubuntu-jammy STATE_PENDING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_SUCCESS
playground-workflow ubuntu-jammy STATE_PENDING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_SUCCESS
```
</details>
Expand Down
54 changes: 27 additions & 27 deletions docs/quickstarts/VAGRANTVBOX.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This option will also create a VM and provision an OS onto it.
1. Clone this repository

```bash
git clone https://github.com/tinkerbell/sandbox.git
cd sandbox
git clone https://github.com/tinkerbell/playground.git
cd playground
```

1. Start the stack
Expand Down Expand Up @@ -69,14 +69,14 @@ This option will also create a VM and provision an OS onto it.
stack: VirtualBox Version: 7.0
==> stack: Configuring and enabling network interfaces...
==> stack: Mounting shared folders...
stack: /sandbox/stack => ~/tinkerbell/sandbox/vagrant
stack: /playground/stack => ~/tinkerbell/playground/vagrant
==> stack: Running provisioner: shell...
stack: Running: /var/folders/xt/8w5g0fv54tj4njvjhk_0_25r0000gr/T/vagrant-shell20231031-54683-k09nai.sh
stack: + main 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 0.4.2 eth1 1.28.3 v5.6.0 ''
stack: + main 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 0.4.2 eth1 1.28.3 v5.6.0 ''
stack: + local host_ip=192.168.56.4
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local loadbalancer_ip=192.168.56.5
stack: + local helm_chart_version=0.4.2
stack: + local loadbalancer_interface=eth1
Expand Down Expand Up @@ -214,11 +214,11 @@ This option will also create a VM and provision an OS onto it.
100 47.5M 100 47.5M 0 0 21.3M 0 0:00:02 0:00:02 --:--:-- 31.6M
stack: + chmod +x ./kubectl
stack: + mv ./kubectl /usr/local/bin/kubectl
stack: + run_helm 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 0.4.2 eth1 v5.6.0
stack: + run_helm 192.168.56.4 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 0.4.2 eth1 v5.6.0
stack: + local host_ip=192.168.56.4
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local loadbalancer_ip=192.168.56.5
stack: + local helm_chart_version=0.4.2
stack: + local loadbalancer_interface=eth1
Expand Down Expand Up @@ -304,10 +304,10 @@ This option will also create a VM and provision an OS onto it.
stack: STATUS: deployed
stack: REVISION: 1
stack: TEST SUITE: None
stack: + apply_manifests 192.168.56.43 08:00:27:9e:f5:3a /sandbox/stack/ 192.168.56.5 tink-system
stack: + apply_manifests 192.168.56.43 08:00:27:9e:f5:3a /playground/stack/ 192.168.56.5 tink-system
stack: + local worker_ip=192.168.56.43
stack: + local worker_mac=08:00:27:9e:f5:3a
stack: + local manifests_dir=/sandbox/stack/
stack: + local manifests_dir=/playground/stack/
stack: + local host_ip=192.168.56.5
stack: + local namespace=tink-system
stack: + disk_device=/dev/sda
Expand All @@ -333,8 +333,8 @@ This option will also create a VM and provision an OS onto it.
stack: + kubectl apply -n tink-system -f /tmp/manifests.yaml
stack: hardware.tinkerbell.org/machine1 created
stack: template.tinkerbell.org/ubuntu-jammy created
stack: workflow.tinkerbell.org/sandbox-workflow created
stack: + kubectl apply -n tink-system -f /sandbox/stack//ubuntu-download.yaml
stack: workflow.tinkerbell.org/playground-workflow created
stack: + kubectl apply -n tink-system -f /playground/stack//ubuntu-download.yaml
stack: configmap/download-image created
stack: job.batch/download-ubuntu-jammy created
stack: + kubectl_for_vagrant_user
Expand Down Expand Up @@ -435,29 +435,29 @@ 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 sandbox-workflow --watch
kubectl get -n tink-system workflow playground-workflow --watch
```
<details>
<summary>example output</summary>
```bash
NAME TEMPLATE STATE
sandbox-workflow ubuntu-jammy STATE_PENDING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_RUNNING
sandbox-workflow ubuntu-jammy STATE_SUCCESS
playground-workflow ubuntu-jammy STATE_PENDING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_RUNNING
playground-workflow ubuntu-jammy STATE_SUCCESS
```
</details>
Expand Down
4 changes: 3 additions & 1 deletion vagrant/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ MACHINE1_MAC=08:00:27:9e:f5:3a

# https://github.com/tinkerbell/charts/pkgs/container/charts%2Fstack
HELM_CHART_VERSION=0.4.3
KUBECTL_VERSION=1.28.3
KUBECTL_VERSION=1.27.12
# K3D version v5.6.3 doesn't work with host networking. https://github.com/k3d-io/k3d/issues/964
K3D_VERSION=v5.6.0
HELM_VERSION=v3.14.4
5 changes: 3 additions & 2 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ MACHINE1_MAC = (ENV["MACHINE1_MAC"] || "08:00:27:9E:F5:3A").downcase
HELM_CHART_VERSION = ENV["HELM_CHART_VERSION"] || "0.4.0"
KUBECTL_VERSION = ENV["KUBECTL_VERSION"] || "1.28.3"
K3D_VERSION = ENV["K3D_VERSION"] || "v5.6.0"
HELM_VERSION = ENV["HELM_VERSION"] || "v3.14.4"
HELM_LOADBALANCER_INTERFACE = ENV["HELM_LOADBALANCER_INTERFACE"] || "eth1"
DEST_DIR_BASE = "/sandbox/stack/"
DEST_DIR_BASE = "/playground/stack/"

Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
Expand All @@ -46,7 +47,7 @@ Vagrant.configure("2") do |config|
override.vm.synced_folder "", DEST_DIR_BASE, type: "rsync"
end

stack.vm.provision :shell, path: "setup.sh", args: [PROVISIONER_IP, MACHINE1_IP, MACHINE1_MAC, DEST_DIR_BASE, LOADBALANCER_IP, HELM_CHART_VERSION, HELM_LOADBALANCER_INTERFACE, KUBECTL_VERSION, K3D_VERSION, GATEWAY_IP]
stack.vm.provision :shell, path: "setup.sh", args: [PROVISIONER_IP, MACHINE1_IP, MACHINE1_MAC, DEST_DIR_BASE, LOADBALANCER_IP, HELM_CHART_VERSION, HELM_LOADBALANCER_INTERFACE, KUBECTL_VERSION, K3D_VERSION, HELM_VERSION, GATEWAY_IP]
end

config.vm.define :machine1, autostart: false do |machine1|
Expand Down
2 changes: 1 addition & 1 deletion vagrant/hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- device: $DISK_DEVICE
metadata:
facility:
facility_code: sandbox
facility_code: playground
instance:
hostname: "machine1"
id: "$TINKERBELL_CLIENT_MAC"
Expand Down
Binary file removed vagrant/ipxe.efi
Binary file not shown.
11 changes: 7 additions & 4 deletions vagrant/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install_kubectl() {
}

install_helm() {
helm_ver=v3.9.4
local helm_ver=$1

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
Expand Down Expand Up @@ -47,7 +47,8 @@ install_k3d() {
}

start_k3d() {
k3d cluster create --network host --no-lb --k3s-arg "--disable=traefik,servicelb" --k3s-arg "--kube-apiserver-arg=feature-gates=MixedProtocolLBService=true" --host-pid-mode
k3d cluster create --network host --no-lb --k3s-arg "--disable=traefik,servicelb,metrics-server,local-storage"

mkdir -p ~/.kube/
k3d kubeconfig get -a >~/.kube/config
until kubectl wait --for=condition=Ready nodes --all --timeout=600s; do sleep 1; done
Expand Down Expand Up @@ -117,10 +118,11 @@ run_helm() {
local loadbalancer_interface=$7
local k3d_version=$8
local namespace="tink-system"
local helm_version=$9

install_k3d "$k3d_version"
start_k3d
install_helm
install_helm "$helm_version"
helm_install_tink_stack "$namespace" "$helm_chart_version" "$loadbalancer_interface" "$loadbalancer_ip"
apply_manifests "$worker_ip" "$worker_mac" "$manifests_dir" "$loadbalancer_ip" "$namespace"
kubectl_for_vagrant_user
Expand All @@ -136,14 +138,15 @@ main() {
local loadbalancer_interface="$7"
local kubectl_version="$8"
local k3d_version="$9"
local helm_version="${10}"

update_apt
install_docker
# https://github.com/ipxe/ipxe/pull/863
# Needed after iPXE increased the default TCP window size to 2MB.
sudo ethtool -K eth1 tx off sg off tso off
install_kubectl "$kubectl_version"
run_helm "$host_ip" "$worker_ip" "$worker_mac" "$manifests_dir" "$loadbalancer_ip" "$helm_chart_version" "$loadbalancer_interface" "$k3d_version"
run_helm "$host_ip" "$worker_ip" "$worker_mac" "$manifests_dir" "$loadbalancer_ip" "$helm_chart_version" "$loadbalancer_interface" "$k3d_version" "$helm_version"
}

if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
Expand Down
Loading

0 comments on commit c0b959e

Please sign in to comment.