-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gokrazy Update Service (GUS) #167
Comments
If the --gus_server command line flag is configured, this program will periodically check in with GUS (gokrazy Update Service). related to #167
heartbeat is a no-op if not configured. related to gokrazy/gokrazy#167
related to gokrazy/gokrazy#167
a potential enhancement to this would be being able to serve root/kernel/initrd/firmware over the network via nbd/nfs/styx/9p to do test boots for bakery validation, I'd imagine as part of early init the device could ask the update server if it should boot over the network. |
That is certainly possible, and I have considered netbooting in the past. The big issue however is that I really want the “boot from SD card” workflow to work 100% of the time, and the only way to achieve that is to exercise exactly this flow in our CI setup. This might sound over-the-top, but I have seen behavioral differences on the Raspberry Pi depending on which boot mechanism was used: rebooting just hangs indefinitely when my Pi 4 is (was?) booted from a USB stick instead of an SD card. That’s a shame, because writing images to the USB stick is much faster, but if I get a different set of bugs, it doesn’t make sense to develop with that setup. I have also diagnosed Linux kernel bugs that only happened when you run the Pi headless, without an HDMI monitor connected. Hence, my current stance is that we should use a standard setup as much as possible, that is as close to the recommended setup (boot from SD card, with/without a monitor connected) as possible. |
No that makes complete sense to me, SD boot should be the guaranteed boot mode and thus tested out of the box. I'd still see utility in it for devices that don't have much local storage as a primary boot mechanism, I was considering trying to do something with some of the devices that I have that are currently running OpenWRT today, I have an old Wireless Access Point that has a decent amount of RAM (128MB) but little flash (16MB), the smallest I could get the core services in gokrazy was about 9MB by additionally stripping the binaries as part of the build, but storing it on the flash is impractical, I was able to copy the squashed root to tmpfs, mount and pivot however. On the otherhand I could also potentially just write a service that would configure it over SSH and UCI and deploy that onto one of the other gokrazy devices. also as an aside given you have the interfaces.json definition for gokrazy/rtr7, have you seen http://netjson.org/ it appears to be an attempt to standardize something similar and have features for fleet management that might be a useful addition to this as well. |
related to gokrazy/gokrazy#167
related to gokrazy/gokrazy#167
would it be possible to make the update service more generic to allow it to also return config files as well (or is this already part of the sbom?) and maybe allow other commands like reboot, exec, ... also I think the Api calls could be reduced to one, by just returning the command payload (update_firmware, update_config, reboot, .. in the heartbeat response and putting the attempt_update payload in the heartbeat message. |
Impressive!
Yep, that seems like a good architecture.
Thanks for the pointer! |
You can run I think you’re talking about the gokrazy instance config. Distributing this file alone is not very useful — to build a gokrazy image, you currently need:
You’re welcome to store all of these files in a private git repository and distribute that in a way that’s convenient for you. I don’t think this is a useful addition to GUS in the general case, though.
You always need the web interface to do updates, even when said update is done through the selfupdate program. If you want to interactively control your device, just install tailscale to make the web interface available. This doesn’t need to go through GUS.
While that’s technically true, I don’t think it would be good design. I don’t see a reason to deviate from small, targeted requests/responses (see https://github.com/gokrazy/gokapi for an up-to-date description and docs browser). |
Thank you for the effort! |
related to #25
@damdo and I have been working on a little project called gokrazy Update Service (GUS).
You can find the design document at https://docs.google.com/document/d/1q2TbB3DlO01_1EO7sQqFH4eMJE21XzniMs5hCqfqM8A/edit?usp=sharing
This issue tracks overall progress. Feel free to leave a comment or ask a question if you have any feedback!
gok sbom
subcommandPlugin support is tracked in #173
The text was updated successfully, but these errors were encountered: