packer: update build system

Adding TPM tooling, dnsmasq.
This commit is contained in:
2023-04-13 22:14:39 -07:00
parent 581b3972d1
commit 2528abf8c6
13 changed files with 147 additions and 100 deletions

View File

@@ -0,0 +1,7 @@
listen-address=::1,127.0.0.1,192.168.4.64
interface=eth0
domain=wntrmute.lan
expand-hosts
server=8.8.8.8
server=8.8.4.4
address=/wntrmute.lan/192.168.4.64

32
packer/files/hosts Normal file
View File

@@ -0,0 +1,32 @@
127.0.0.1 localhost
##########################
# cluster compute nodes #
##########################
192.168.4.1 node01 # compute-blade
192.168.4.2 node02 # compute-blade
192.168.4.3 node03 # compute-blade
192.168.4.4 node04 # compute-blade
192.168.4.5 node05 # compute-blade
192.168.4.6 node06 # compute-blade
192.168.4.7 node07 # compute-blade
192.168.4.8 node08 # compute-blade
192.168.4.9 node09 # compute-blade
192.168.4.10 node10 # compute-blade
192.168.4.11 node11 # pi4
192.168.4.12 node12 # pi4
192.168.4.13 node13 # pi4
192.168.4.14 node14 # pi4
192.168.4.15 node15 # reserved
192.168.4.16 node16 # reserved
##########################
# infrastructure systems #
##########################
192.168.4.32 chaven01 # Zymbit D35 secure services system
192.168.4.33 cbuild01 # build server
192.168.4.64 control # cluster controller and router
192.168.4.65 cdev # cluster dev machine

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Tailscale
Documentation=https://tailscale.com/kb/
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/bin/tailscaled
[Service]
User=root
Group=root
ExecStart=/usr/bin/tailscale up --advertise-routes=192.168.4.1/24
ExecStop=
# Let systemd restart this service always
Restart=always
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,40 @@
#cloud-config
# NOTE: this is a dev-environment fixture where I want a known user:pass to
# login on the serial console if things go sideways.
chpasswd:
expire: false
list:
- name: ubuntu
password: ubuntu
type: text
hostname: cluster-cdev
ssh_pwauth: true
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM47gCbb0BQOm6H4Ol8DEKD+CXTNYDJxe7QvJhdLZR/F kyle@petrichor
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGea83yMIdCi0QUUPgmhRgIrii7lS1dYxZ6LSxSsDOph kyle@europa
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbkHs8zGZ3L6tRILjX7Cph8kXSpuw665mxe4ak2dwIx kyle@hermes
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICOCXJx+3ynRraM0JIsUy6Cin9JByPW/EUV9ggtuUCbC kyle@freeside
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINfRxWmx30LhGnsXpauLrj3GPvBWLhAKs0EznA9cNT5q kyle@deimos
ssh_deletekeys: true
ssh_genkeytypes: [rsa, ecdsa, ed25519]
disable_root: true
resize_rootfs: true
network:
Version: 2
Renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses:
"192.168.4.64/24"
label: "cluster"
lifetime: forever
eth1:
dhcp4: yes
dhcp6: yes

View File

@@ -9,7 +9,7 @@ chpasswd:
password: ubuntu
type: text
hostname: rp3b-cdev
hostname: node16
ssh_pwauth: true
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM47gCbb0BQOm6H4Ol8DEKD+CXTNYDJxe7QvJhdLZR/F kyle@petrichor
@@ -23,23 +23,6 @@ disable_root: true
resize_rootfs: true
## Update apt database and upgrade packages on first boot
#package_update: true
#package_upgrade: true
## Install additional packages on first boot
#packages:
#- avahi-daemon
#- rng-tools
#- python3-gpiozero
#- [python3-serial, 3.5-1]
## Run arbitrary commands at rc.local like time
#runcmd:
#- [ ls, -l, / ]
#- [ sh, -xc, "echo $(date) ': hello world!'" ]
#- [ wget, "http://ubuntu.com", -O, /run/mydir/index.html ]
network:
Version: 2
Renderer: networkd
@@ -47,10 +30,3 @@ network:
eth0:
dhcp4: yes
dhcp6: yes
eth1:
dhcp4: no
dhcp6: no
addresses:
"192.168.4.64/24"
label: "cluster"
lifetime: forever