scottmuc / infrastructure

Documentation / Automation for personal third-party infrastructure
The Unlicense
11 stars 2 forks source link

Rebuild Raspbery PI - September 2022 #41

Closed scottmuc closed 2 years ago

scottmuc commented 2 years ago

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

Post OS install steps on desktop

How Do I Know I Am Done?

scottmuc commented 2 years ago

Main playbook failed at installer kea. Thank you @diefida for finding that kea-dhcp-server isn't in bullseye debian's package repository: https://packages.debian.org/sid/kea-dhcp4-server

ansible@raspberrypi:/etc/apt $ uname -a
Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
ansible@raspberrypi:/etc/apt $ more sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian bullseye main contrib non-free
#deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

We've chosen (adding @lx4r) to comment out the kea install and move forward with the playbook and fix later.

ISC recommends using their package repositories because they are often more up-to-date than the OS repositories: https://kb.isc.org/docs/isc-kea-packages

scottmuc commented 2 years ago

Second run of the main playbook succeeded. I made a typo in re-adding port forwarding (incorrect TLS port), but once that was changed, nginx was reachable.

For some reason, the samba share isn't working, and need to fix the DHCP server installation.

The new ansible tasks worked as well as the resolver role that was created.

Lastly, the gum enabled script worked like a charm.

scottmuc commented 2 years ago

Now that the playbook is getting a bit large, I want to skip most of the playbook while iterating on a certain task. For the next repave, I'm going to look into using ansible tags and integrate this bit of code into the ansible runner script.

scottmuc commented 2 years ago

Reviewing the key management in the playbook, I saw the apt_key might be going soon. Or at least it's implementation will be changing drastically.

Something to possibly alter before the next repave.

scottmuc commented 2 years ago

Attempting to using the Cloudsmith repositories doesn't look promising. There doesn't appear to exist a package for the PI cpu architecture: https://cloudsmith.io/~isc/repos/kea-2-2/packages/detail/deb/isc-kea-dhcp6-server/2.2.0-isc20220726061131/a=amd64;d=debian%252Fbullseye;t=binary/ (I can only find amd64).

So having a running dhcpd-server is blocked because the OS repositories don't have the package, and the "supported" Cloudsmith repositories don't have the package with the correct architecture.

scottmuc commented 2 years ago

The following output feels like it would be valuable to add to each repave issue after completion:

ansible@raspberrypi:~ $ cat /etc/os-release
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/"
ansible@raspberrypi:~ $ uname -a
Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
scottmuc commented 2 years ago

@diefida, @lx4r, thanks for following along with this repave! Looks like the KEA package thing is going to be a pain. For now I'm sticking with my router for DHPCD until the next repave. Something I could possibly do is repave with an older base image, but that defeats the purpose of doing this to keep things up-to-date.

Another alternative is to bypass apt and install the .deb directly. Not sure what ramifications that would have.

Calling this repave done. The main consequence of not having the dhcpd stuff sorted out is that my network won't be using the blocking DNS resolver (unless set manually). It's an ok compromise for now.

scottmuc commented 2 years ago

Using the sid repository might be an extreme and dangerous option: https://chromeunboxed.com/how-to-add-the-sid-testing-repository-and-get-the-latest-linux-apps-on-your-chromebook/

and: https://serverfault.com/questions/22414/how-can-i-run-debian-stable-but-install-some-packages-from-testing