1# Goal
2
3The goal is to deploy kubernetes on my local networks, and keep
4everything as reproducible as possible.
5
6# Stack
7
8I\'ll use Fedora Core OS, Matchbox and Terraform [^1], a match the
9requirements for Tectonic [^2]
10
11## Steps
12
13- Network Setup DHCP/TFTP/DNS [^3]
14- Matchbox [^4]
15- PXE network boot environment
16- Terraform Tectonic [^5]
17
18## Network Setup DHCP/TFTP/DNS
19
20First learning the basics again:
21
22- <https://linuxhint.com/install_dhcp_server_ubuntu/>
23- <https://www.youtube.com/watch?v=XQ3T14SIlV4>
24
25To check open ports
26
27``` {.bash org-language="sh"}
28lsof -Pni | grep LISTEN
29```
30
31Run the provided [^6] image with `dnsmasq` and PXE toolkit
32
33``` {.bash org-language="sh"}
34docker run --rm --cap-add=NET_ADMIN --net=host quay.io/coreos/dnsmasq \
35 -d -q \
36 --dhcp-range=192.168.1.3,192.168.1.254 \
37 --enable-tftp --tftp-root=/var/lib/tftpboot \
38 --dhcp-match=set:bios,option:client-arch,0 \
39 --dhcp-boot=tag:bios,undionly.kpxe \
40 --dhcp-match=set:efi32,option:client-arch,6 \
41 --dhcp-boot=tag:efi32,ipxe.efi \
42 --dhcp-match=set:efibc,option:client-arch,7 \
43 --dhcp-boot=tag:efibc,ipxe.efi \
44 --dhcp-match=set:efi64,option:client-arch,9 \
45 --dhcp-boot=tag:efi64,ipxe.efi \
46 --dhcp-userclass=set:ipxe,iPXE \
47 --dhcp-boot=tag:ipxe,http://matchbox.example.com:8080/boot.ipxe \
48 --address=/matchbox.example/192.168.1.2 \
49 --log-queries \
50 --log-dhcp
51```
52
53## Matchbox
54
55## PXE network boot environment
56
57## Terraform Tectonic
58
59------------------------------------------------------------------------
60
61# Links
62
63[^1]: <https://coreos.com/tectonic/docs/latest/install/bare-metal/metal-terraform.html>
64
65[^2]: <https://coreos.com/tectonic/docs/latest/install/bare-metal/requirements.html>
66
67[^3]: <https://coreos.com/matchbox/docs/latest/network-setup.html>
68
69[^4]: <https://coreos.com/matchbox/docs/latest/deployment.html>
70
71[^5]: <https://coreos.com/tectonic/releases/>
72
73[^6]: <https://github.com/poseidon/matchbox/tree/v0.7.0/contrib/dnsmasq>