4 ms·
Gokrazy is easily the most pleasant way I've found to deploy code to a raspberry pi. The worst part about setting up a raspberry pi is having to get out a keybo
by psanford 3y ago
Gokrazy is easily the most pleasant way I've found to deploy code to a raspberry pi. The worst part about setting up a raspberry pi is having to get out a keyboard and monitor (or serial cable) to manually configure a the rpi before you can start using it. Gokrazy builds fully configured system images, so the rpi comes up properly without having to shell into it first. Gokrazy also lets you push updated images over the network.
The other issue I often had with raspberry pi systems was the high probability that an `apt-get upgrade` would trigger a filesystem error on mediocre sdcards. Gokrazy also helps with this 1) by having a read-only file system by default, 2) by using a/b partitions for updates, and 3) having very small image sizes.
It has honestly rejuvenated my enthusiasm for running code on raspberries pi.
- ripley12 3y agoHave you tried recent versions of the Raspberry Pi Imager utility? It lets you build pre-configured Raspbian images, similar to what you're describing.
- rcarmo 3y agoI never had any serious issue with SD cards since the Pi 2B (and I've kept Pis running for years). Anyway, for those wanting to deploy more generic apps, that is why I initially wrote https://github.com/piku/piku https://github.com/piku/piku - you still have to flash the OS (and rpi-imager does that with sane defaults these days), but once you're done you have Heroku-like deployments for any language runtime you install on the Pi. I also have https://github.com/rcarmo/ground-init https://github.com/rcarmo/ground-init, a cloud-init like shim that simplifies setting up machines (I'm a big fan of cloud-init, but since Raspbian doesn't support it and Ubuntu on ARM requires some fiddling to make it work I decided it wasn't too hard to roll my own). (I probably should look into glueing that into rpi-imager, but there is are only so many hours in the day...)
- jchw 3y agoGokrazy seems pretty great and I loved the idea the moment I saw a description of what it does. (Though, disappointingly, I've never actually tried it.) I've long been interested in trying to write the entire usermode of a Linux system just because it seems interesting what you could do; the Linux kernel offers a whole lot of functionality. I've had the thought that this would be really fun to do on Pinephone, although in that case it does sort-of feel like you're just inventing another Android... Maybe focusing on making Wayland work better on phones would be a more productive use of everyone's time :) However, I will say one thing about Raspberry Pi's: If you ever find yourself needing to use Raspbian for any reason, you can configure a lot of things by editing the boot files on the FAT32 boot partition. For example, you can throw a wpa_supplicant config to get WiFi working, enable SSH, etc. just using the boot partition. This is basically how I manage Raspberry Pis that I'm just messing around with, although cooking a fresh root image every time would definitely be a nicer solution for "real" work. (My weapon of choice would probably be NixOS in most cases, but I have to try gokrazy first if I ever deploy anything interesting and less temporary to a Raspberry Pi in the near future.)
- throwaway894345 3y agoHow do you do databases with Gokrazy?