462 Commits

Author SHA1 Message Date
oliverpool 593e679999 website: document supervisor stop on exit 0 2022-04-05 21:56:53 +02:00
oliverpool 0acbbadb6e supervisor: stop service on exit 0
fixes #125
2022-04-05 21:56:53 +02:00
Michael Stapelberg 6f134b4e77 mount tmpfs on /dev/shm and /run (if it exists)
related to https://github.com/gokrazy/gokrazy/issues/124
2022-04-03 23:11:01 +02:00
Michael Stapelberg 9944dc2079 re-generate website for platforms change 2022-04-02 15:24:14 +02:00
Michael Stapelberg 1ea77c08a7 platforms: describe community-supported platforms
Thanks to https://github.com/oliverpool for this change, which I have edited a
bit to explain to users when to use which kernel.
2022-04-02 15:23:30 +02:00
Michael Stapelberg cc7fccffa9 platforms: WPA-PSK now supported on the Pi Zero 2 W, too
related to https://github.com/gokrazy/gokrazy/issues/96
2022-03-30 19:24:49 +02:00
Chris Koch f39d1992df Run go mod tidy to fill in missing go.sum entries
Signed-off-by: Chris Koch <chrisko@google.com>
2022-03-28 22:58:16 +02:00
oliverpool ea6f2d6932 authentication: always send WWW-Authenticate, constant time comparison (#120) 2022-03-24 17:59:04 +01:00
Michael Stapelberg 5024f36b75 re-generate website for previous commit 2022-03-23 23:44:48 +01:00
Michael Stapelberg 8cc58db45f platforms: document hardware support (no encrypted WiFi on Zero 2 W)
related to https://github.com/gokrazy/gokrazy/issues/96
2022-03-23 23:44:21 +01:00
Michael Stapelberg fa6ec588a8 re-generate website for previous commit 2022-03-23 23:40:24 +01:00
Michael Stapelberg b0bdb3bd9e platforms: document Raspberry Pi Zero 2 W, performance, power usage
related to https://github.com/gokrazy/gokrazy/issues/96

fixes https://github.com/gokrazy/gokrazy/issues/70
2022-03-23 23:39:54 +01:00
Michael Stapelberg 0bcf6191bd status: allow running once or in a loop
fixes https://github.com/gokrazy/gokrazy/issues/117
2022-03-21 23:45:40 +01:00
Michael Stapelberg 87b3e6961f website: re-generate for updated tailscale guide 2022-03-20 20:20:30 +01:00
Joonas Kuorilehto ac405dceab website: update Tailscale VPN documentation (#115)
* website: update Tailscale VPN documentation

Replace use of breakglass with instructions to use interactive login.
This depends on https://github.com/tailscale/tailscale/pull/4117 being
merged.

Add mkfs into the example so that /perm filesystem is initialized.

Add instructions how to use auth-key for unattended device auth instead
of having to use browser interactively.

Append to tailscaled/flags.txt instead of overwriting.

Clarify and update the tsnet example. Add mention of TS_AUTHKEY
as alternative here too.

* website: set auth-key value on the same line for clarity

* website: require tailscale v1.22.1 to simplify instructions

Since tailscale.com v1.22.1 we do not need to set statedir and
tun=userspace-networking on gokrazy.

https://github.com/tailscale/tailscale/pull/4117#issuecomment-1063345864
2022-03-20 20:20:08 +01:00
Michael Stapelberg d0514181f7 add SECURITY.md
fixes https://github.com/gokrazy/gokrazy/issues/118
2022-03-20 16:28:50 +01:00
Michael Stapelberg d72994abd2 GitHub Actions: bump to Go 1.18 2022-03-20 16:04:04 +01:00
Michael Stapelberg dc149c2343 update prototyping guide to use freeze tool 2022-03-20 12:47:18 +01:00
Michael Stapelberg c1b50a72f3 regenerate website for bluetooth article 2022-03-20 09:57:28 +01:00
Joonas Kuorilehto d3ff664156 website: add Bluetooth to user guide 2022-03-20 09:54:51 +01:00
Michael Stapelberg 4c1cf82b51 go.mod: update all dependencies 2022-03-20 09:36:21 +01:00
Michael Stapelberg 6e97c66235 tls: revert unauthenticated access for localhost
This is not safe when using tailscale, which proxies traffic to localhost by
default. Thanks to joneskoo@ for the report!
2022-03-20 09:26:23 +01:00
Michael Stapelberg 1c3bb23654 create /dev/ttyAMA0 compatibility symlink
related to https://github.com/gokrazy/gokrazy/issues/49
2022-03-19 10:53:08 +01:00
Michael Stapelberg a4240967b6 create /dev/serial0 symlink
On current kernels:

/tmp/breakglass3180421852 # ls -l /dev/serial0
lrwxrwxrwx    1 0        0               12 Jan  1  1970 /dev/serial0 -> /dev/ttyAMA0

On future kernels when Bluetooth is enabled:

/tmp/breakglass1740469836 # ls -l /dev/serial0
lrwxrwxrwx    1 0        0               10 Jan  1  1970 /dev/serial0 -> /dev/ttyS0

related to https://github.com/gokrazy/gokrazy/issues/49
2022-03-19 10:26:19 +01:00
Michael Stapelberg 0506e68f72 Revert "reset attempt counter when restarting a service manually"
This reverts commit 2935c1de91.

Breaks breakglass
2022-03-13 10:34:36 +01:00
Michael Stapelberg 2935c1de91 reset attempt counter when restarting a service manually
fixes https://github.com/gokrazy/gokrazy/issues/117
2022-03-12 19:21:24 +01:00
Christian Heusel ff09e855be clean up header and add logo 2022-03-06 15:58:17 +01:00
Christian Heusel 6e3e6ed39f clean up status table 2022-03-06 15:58:17 +01:00
Michael Stapelberg 4c37518767 dhcp: configure route priority to eth* = 1, wlan* = 5, down = 1024
This results in seamless handover between ethernet and wifi when both interfaces
are connected to the same IP network.
2022-03-05 21:54:17 +01:00
Christian Heusel 5dd8496371 regenerate the website
Signed-off-by: Christian Heusel <christian@heusel.eu>
2022-03-04 08:27:08 +01:00
Christian Heusel e021fdbebd Simplify Wifi userguide with extrafile
https://github.com/gokrazy/wifi/commit/2553edfa41ba27c9ec89bc5bdca3ca235118ff3f
2022-03-04 08:27:08 +01:00
Michael Stapelberg c529718d04 re-generate the website 2022-03-01 08:47:27 +01:00
Michael Stapelberg a3abd0c0dc update userguide for encrypted WiFi
related to https://github.com/gokrazy/gokrazy/issues/13
2022-03-01 08:47:10 +01:00
Michael Stapelberg 931e085d7f supervise: fix nil pointer dereference when process was not created 2022-02-26 11:18:45 +01:00
Michael Stapelberg 402a8c60a3 re-generate website 2022-02-22 09:17:01 +01:00
Michael Stapelberg 71483396c4 package-config: explain extra files, too 2022-02-22 09:16:25 +01:00
Matt Layher 63413ccafb go.mod: switch to github.com/mdlayher/packet@v1.0.0 (#109)
* go.mod: switch to github.com/mdlayher/packet@v1.0.0
* go.mod: bump github.com/rtr7/dhcp4

Signed-off-by: Matt Layher <mdlayher@gmail.com>
2022-02-21 23:24:03 +01:00
Anup Chenthamarakshan 8f5fccc68c integration: add test for MBR-only booting (#108) 2022-01-30 14:52:52 +01:00
Michael Stapelberg 1fb631a0b4 GitHub Actions: remove branch restriction 2022-01-13 09:40:55 +01:00
Darshil Chanpura ca0fa41749 supervise: added optional configuration to wait for clock (#105)
gokrazy.go: added a NewWaitForClockService() which enables waitForClock configuration
supervise.go: added waitForClock boolean in service{} and changed the behaviour from environment variable to flag

Signed-off-by: Darshil Chanpura <darshil@thatwebsite.xyz>
2022-01-13 09:19:25 +01:00
Anup Chenthamarakshan f20133ae5d supervise: wait for child processes (#107)
With gokrazy/gokrazy#106, we're sending a TERM signal to service
processes and their immediate children. Service processes are being
waited on by `cmd.Wait()`, which will reap any kernel state associated
with it.  However, its child processes don't necessarily get reaped
(depending on whether its parent had time to clean up before exiting).

With this change, we explicitly wait for everything in the service
process group to exit and prevent zombies.
2022-01-13 09:09:12 +01:00
Michael Stapelberg a3a83b0408 re-generate website 2022-01-12 23:22:23 +01:00
Michael Stapelberg 0e40055eb3 README: slight editing 2022-01-12 23:21:48 +01:00
fwiedmann 43fd34ba72 docs(website): add user guide about how to access permanent data
docs(readme): add documentation description for the website
2022-01-12 23:20:38 +01:00
Anup Chenthamarakshan 87f82b194d supervise: wait for services to stop before reboot (#106)
Currently, rebooting/upgrading the instance sends a TERM signal to all
running services, waits 1 second and then reboots. Processes that take
longer to cleanly stop can't do so.

Instead, give each service up to 15s to do a clean shutdown. Reboot 15s
after the command is sent, or after all services are stopped, whichever
comes first.

To make it easier to kill entire process tree for a service, create a
per-service process group. Stopping the service can be done by sending a
single signal to the process group.
2022-01-12 21:52:51 +01:00
Anup Chenthamarakshan e42cbd86b3 update: support device-specific update handlers (#102)
Useful to update devices which expect blobs at fixed locations
2022-01-11 20:29:31 +01:00
Michael Stapelberg 813306b73d supervise: ignore -ESRCH when signaling process
This means the process has already exited, but should not be treated as an
error. This fixes using “gok run” for crash-looping processes, and also the stop
button in the web interface.
2022-01-09 10:42:08 +01:00
Felix Wiedmann 678bb92c2e docs(readme): add description about accessing permanent data (#103) 2021-12-30 11:18:56 +01:00
Michael Stapelberg 604d56adb4 json: only include pid if Process() is non-nil 2021-12-27 09:25:12 +01:00
Michael Stapelberg e76df54131 quickstart: include asciinema screencasts 2021-12-19 21:29:03 +01:00