Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rgl/talos-vagrant

Vagrant Environment for playing with Talos
https://github.com/rgl/talos-vagrant

bare-metal ipmi kubernetes matchbox pxe pxe-boot redfish talos uefi-boot

Last synced: 2 days ago
JSON representation

Vagrant Environment for playing with Talos

Awesome Lists containing this project

README

        

This is a [Vagrant](https://www.vagrantup.com/) Environment for a playing with [Talos](https://www.talos.dev).

For playing with [Sidero](https://www.sidero.dev) see the [rgl/sidero-vagrant](https://github.com/rgl/sidero-vagrant) repository.

# Table Of Contents

* [Architecture](#architecture)
* [Usage](#usage)
* [Network Packet Capture](#network-packet-capture)
* [Network Booting](#network-booting)
* [Tested Physical Machines](#tested-physical-machines)
* [Troubleshoot](#troubleshoot)
* [Alternatives and Related Projects](#alternatives-and-related-projects)
* [References](#references)

# Architecture

![](architecture.png)

# Usage

Install docker, vagrant, vagrant-libvirt, and the [Ubuntu Base Box](https://github.com/rgl/ubuntu-vagrant).

Login into docker hub to have a [higher rate limits](https://www.docker.com/increase-rate-limits).

If you want to connect to the external physical network, you must configure your host network as described in [rgl/ansible-collection-tp-link-easy-smart-switch](https://github.com/rgl/ansible-collection-tp-link-easy-smart-switch#take-ownership-procedure) (e.g. have the `br-rpi` linux bridge) and set `CONFIG_PANDORA_BRIDGE_NAME` in the `Vagrantfile`.

Bring up the cluster virtual machines:

```bash
time ./bring-up.sh | tee bring-up.log
```

Access talos:

```bash
export TALOSCONFIG="$PWD/shared/talosconfig"
./shared/talosctl --nodes cp1,w1 version
```

Access kubernetes:

```bash
export KUBECONFIG="$PWD/shared/kubeconfig"
./shared/kubectl get nodes -o wide
```

Start an example service in each worker node:

```bash
vagrant ssh -c 'bash /vagrant/provision-example-daemonset.sh' pandora
```

Access the example service:

```bash
vagrant ssh -c "watch -n .2 'wget -qO- http://example-daemonset.\$(hostname --domain)?format=text | tail -25; kubectl get pod -l app=example-daemonset -o=custom-columns=NODE:.spec.nodeName,STATUS:.status.phase,NAME:.metadata.name'" pandora
```

List this repository dependencies (and which have newer versions):

```bash
export GITHUB_COM_TOKEN='YOUR_GITHUB_PERSONAL_TOKEN'
./renovate.sh
```

## Network Packet Capture

You can easily capture and see traffic from the host with the `wireshark.sh`
script, e.g., to capture the traffic from the `eth1` interface:

```bash
./wireshark.sh pandora eth1
```

## Host DNS resolver

To delegate the `talos.test` zone to the kubernetes managed external dns server (running in pandora) you need to configure your system to delegate that DNS zone to the pandora DNS server, for that, you can configure your system to only use dnsmasq.

For example, on my Ubuntu 22.04 Desktop, I have uninstalled `resolvconf`, disabled `NetworkManager`, and manually configured the network interfaces:

```bash
sudo su -l
for n in NetworkManager NetworkManager-wait-online NetworkManager-dispatcher network-manager; do
systemctl mask --now $n
done
apt-get remove --purge resolvconf
cat >/etc/network/interfaces <<'EOF'
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto enp3s0
iface enp3s0 inet dhcp
EOF
reboot
```

Then, replaced `systemd-resolved` with `dnsmasq`:

```bash
sudo su -l
apt-get install -y --no-install-recommends dnsutils dnsmasq
systemctl mask --now systemd-resolved
cat >/etc/dnsmasq.d/local.conf </etc/dnsmasq.d/talos.test.conf </etc/resolv.conf <