Skip to content

chore: upgrade grokrazy - #18209

Merged
andig merged 26 commits into
masterfrom
fix/gok
Feb 1, 2025
Merged

andig merged 26 commits into
masterfrom
fix/gok

Conversation

@andig

@andig andig commented Jan 13, 2025 •

Copy link
Copy Markdown
Member

TODO

Out of scope

  • authorized_keys
  • HTTP Password
  • Tailscale or Wireguard (optional)

@andig
andig requested a review from naltatis January 13, 2025 17:35
@andig andig added the infrastructure Basic functionality label Jan 13, 2025
@andig
andig marked this pull request as ready for review January 13, 2025 17:35
@naltatis naltatis self-assigned this Jan 13, 2025
@naltatis

Copy link
Copy Markdown
Member

Da passt noch was mit den Pfaden nicht.

Die config.json wird im Projektverzeichnis erstellt, aber scheinbar nicht von dort gelesen. Ich hab sie erst einmal händisch nach ~/gokrazy/evcc/config.json kopiert.

Der Task läuft aber trotzdem nicht durch:

make gokrazy
which gok || go install github.com/gokrazy/tools/cmd/gok@main
/Users/michael/go/bin/gok
sed 's!"GoBuildFlags": null!"GoBuildFlags": ["-tags=release,gokrazy -ldflags=-X github.com/evcc-io/evcc/server.Version=0.132.1 -X github.com/evcc-io/evcc/server.Commit=b956b6571 -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID= -s -w"]!g' packaging/gokrazy/config.tmpl.json > config.json
# gok -i evcc add tailscale.com/cmd/tailscaled
# gok -i evcc add tailscale.com/cmd/tailscale
gok -i evcc overwrite --root=evcc_0.132.1.image --target_storage_bytes=1258299392
gokrazy gok gca8464 on GOARCH=arm64 GOOS=darwin

Build target: CGO_ENABLED=0 GOARCH=arm64 GOOS=linux
Build timestamp: 2025-01-15T09:40:27+01:00
Loading system CA certificates from bundled Mozilla CA list
Building 6 Go packages:

  github.com/gokrazy/breakglass
    will be started with command-line flags
      from /Users/michael/gokrazy/evcc/config.json
      last modified: 2025-01-15T09:39:57+01:00 (30s ago)

  github.com/gokrazy/mkfs

  github.com/gokrazy/fbstatus

  github.com/gokrazy/serial-busybox

  github.com/gokrazy/wifi

  github.com/evcc-io/evcc
    will be compiled with build flags
      from /Users/michael/gokrazy/evcc/config.json
      last modified: 2025-01-15T09:39:57+01:00 (30s ago)
    will be started with environment variables
      from /Users/michael/gokrazy/evcc/config.json
      last modified: 2025-01-15T09:39:57+01:00 (30s ago)

[building (go compiler)]2025/01/15 09:40:28 getting incomplete packages [github.com/evcc-io/evcc]
/Users/michael/go/pkg/mod/github.com/evcc-io/evcc@v0.0.0-20250114155240-961968e5b3b1/main.go:15:13: pattern dist: no matching files found
[done] in 1.90s                        
2025/01/15 09:40:29 [go list -tags gokrazy -json github.com/evcc-io/evcc]: exit status 1
make: *** [gokrazy] Error 1

@andig

andig commented Jan 15, 2025

Copy link
Copy Markdown
Member Author

Irgendwas verstehe ich noch nicht am Buildprozess: gokrazy/gokrazy#287 (comment)

@naltatis naltatis added the needs documentation Triggers issue creation in evcc-io/docs label Jan 15, 2025
@naltatis

Copy link
Copy Markdown
Member

@andig sollte das Image direkt auf SD-Karte flashbar sein? Hab die durch make gokrazy erzeugte Datei mit "Raspberry Pi Imager" geflasht. Das scheint aber noch nicht korrekt zu sein. Von der Karte möchte er nicht booten.

IMG_3643

@andig

andig commented Jan 15, 2025

Copy link
Copy Markdown
Member Author

Gleiches Problem habe ich mich

make gokrazy-run

im Simulator auch. Irgendwas fehlt noch :O

@andig
andig marked this pull request as draft January 15, 2025 15:48
@andig

andig commented Jan 15, 2025

Copy link
Copy Markdown
Member Author

Argh, da fehlt ein --full beim overwrite für MBR und Boot FS.

Comment thread Makefile Resolved
@naltatis

Copy link
Copy Markdown
Member

Image startet nun. Allerdings gibts scheinbar noch Probleme mit Schreibzugriff und den Assets.

Bildschirmfoto 2025-01-15 um 17 49 11

IMG_3644

@naltatis

Copy link
Copy Markdown
Member

Können wir da an den Ports drehen? In diesem Szenario kann evcc ja auf 80 laufen. Das Management-UI (aktuell auf 80) ist ja eher zweitrangig.

@andig

andig commented Jan 15, 2025

Copy link
Copy Markdown
Member Author

Mit dem config.json sollte evcc schon auf port 80 sein- kanns leider nicht testen mangels funktionierendem Emulator.

@andig

andig commented Jan 15, 2025 •

Copy link
Copy Markdown
Member Author

@andig

andig commented Jan 23, 2025

Copy link
Copy Markdown
Member Author

@naltatis du könntest nochmal testen. Leider klappt bei mir das gokrazy-run nicht. Das ging aber mal...

@naltatis

naltatis commented Jan 24, 2025 •

Copy link
Copy Markdown
Member

Test of the image via SD Card on RP4 worked. evcc runs as expected on port 80. Gokrazy debug web interface on 8080. Full system boot incl. evcc start takes <25s.

I had to manually create an empty packaging/gokrazy/evcc/builddir/github.com/gokrazy/breakglass/breakglass.authorized_keys file to make make gokrazy work.

Now we only need the lasts steps of config ui and we have a low effort RPI image we could publish. 🎉

@andig

andig commented Jan 25, 2025

Copy link
Copy Markdown
Member Author

I had to manually create an empty

Das sollte egtl. nicht nötig sein und geht bei mir ohne. Was passiert?

@naltatis

naltatis commented Jan 25, 2025 •

Copy link
Copy Markdown
Member

Das sollte egtl. nicht nötig sein und geht bei mir ohne. Was passiert?

Fehlermeldung, dass die nicht existiert. Lösch die bei dir mal weg und probier make gokrazy.

@andig

andig commented Jan 25, 2025 •

Copy link
Copy Markdown
Member Author

Hab ich, geht :) Bitte nochmal gok@master installieren.

@andig
andig marked this pull request as ready for review January 31, 2025 12:27
@naltatis

naltatis commented Jan 31, 2025 •

Copy link
Copy Markdown
Member

Added empty breakglass.authorized_keys to make build work.
Added empty evcc.yaml to enter Config UI mode.
Image tested on hardware (rpi4). Persistence works.

@andig we have an issue with restart behavior. Gokrazy does not restart our process if we exit 0 (which we do when user triggers it). We need a solution for this. See docs

If the process exits with status code 0 (or 125), gokrazy will stop supervision. Exiting immediately with status code 0 when the GOKRAZY_FIRST_START=1 environment variable is set means “don’t start the program on boot”

https://gokrazy.org/development/process-interface/

@andig

andig commented Jan 31, 2025

Copy link
Copy Markdown
Member Author

We need a solution for this.

Weisst Du wo das passiert? Dann können wir da einfach anderen Exit Code nehmen.

@andig

andig commented Jan 31, 2025

Copy link
Copy Markdown
Member Author

Gefunden, das ist einfach

@andig
andig merged commit 31e476c into master Feb 1, 2025
@andig
andig deleted the fix/gok branch February 1, 2025 10:48
@andig

andig commented Feb 1, 2025

Copy link
Copy Markdown
Member Author

Weitere Todos: update Prozess fürs gok Image, Tailscale connect via UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Basic functionality needs documentation Triggers issue creation in evcc-io/docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants