Closed scottmuc closed 1 year ago
ansible@raspberrypi:~ $ cat /etc/os-release && uname -a
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Yay for Repaving!
As much as possible is documented inline in this issue template. In case of problems you may find help by viewing all the previous repave issues. Have fun!
Things to do with the existing build
[x] Disable DHCP on the PI
Ensure that when we renew our DCHP lease, it comes from our router.
sudo systemctl stop dnsmasq
[x] Enable DHCP on the router and remove port mapping and release/renew IP address
Windows:
ipconfig /release
and thenipconfig /renew
[x] Shutdown PI
Make sure the USB drive has spun down before doing any work.
sudo shutdown -h now
[x] Create SD card with the latest Raspberry Pi OS
Using the SD card in the now powered down PI.
The new installer has options to enable SSH and create a user.
installer download
note check if the underlying Debian distribution is changing as this might result in some issues in the playbook execution.
The Bullseye 64-bit lite image seems to work for now.
Post OS install steps on desktop
[x] Ensure a working ansible enviroment
This will exercise the
asdf
setup.[x] Turn on the PI and note the IP obtained from the Router
[x] Clean up old host keys
The new instance will have new host keys so to ensure host key warning messages don't distract us from the repaving, run the following:
[x] Transfer local public ssh key to PI
In order to avoid the use of
sshpass
, copy the current sessions public ssh key to to./ssh/authorized_keys
of thepi
user on the PI. This user is only necessary to run the bootstrap playbook (which creates an adminansible
user) and will be subsequently cleaned up.ssh-copy-id pi@<pi ip>
[x] Bootstrap with Ansible
./ansible.sh
and select thebootstrap-playbook.yml
[x] Add the PI port forwarding
Needed for the
certbot
ACME challenge in the next step.[x] Complete full configuration
./ansible.sh
and select themain-playbook.yml
[x] Reboot PI
[x] Re-add port mapping to the static IP
[x] Disable DHCP on the router
[x] Deploy goodenoughmoney.com
[x] Create
pi
Samba userRun the following on the PI
sudo smbpasswd -a smbrw
[x] Make this template slightly better
How Do I Know I Am Done?
[x] https://www.goodenoughmoney.com/ displays stuff
[x] https://home.scottmuc.com/music/ loads navidrome and the music is playable
[x] https://home.scottmuc.com/prometheus/ loads and has data
[x] https://home.scottmuc.com/grafana/ loads and has data
[x] Z:\ on my Windows PC works
[x]
ipconfig /release
and thenipconfig /renew
works[x]
nslookup analytics.google.com
is refused[x] Print out newly repaved machine details
cat /etc/os-release && uname -a