Skip to content
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

[FEAT] Update build pipeline to build arm64 binaries #61

Closed
AnalogJ opened this issue Sep 29, 2020 · 4 comments · Fixed by #77
Closed

[FEAT] Update build pipeline to build arm64 binaries #61

AnalogJ opened this issue Sep 29, 2020 · 4 comments · Fixed by #77
Labels
enhancement New feature or request

Comments

@AnalogJ
Copy link
Owner

AnalogJ commented Sep 29, 2020

https://www.reddit.com/r/selfhosted/comments/j1d101/scrutiny_open_sourced_as_promised_hard_drive/g72i61m/?context=3

@AnalogJ AnalogJ added the enhancement New feature or request label Sep 29, 2020
@AnalogJ
Copy link
Owner Author

AnalogJ commented Oct 3, 2020

For anyone tracking the status of this issue: I just added Arm(32/64) builds to the CI.

If you're interested in testing it out, you can download the binaries.zip file from the CI here: AnalogJ/scrutiny/actions/runs/285389324
You'll need to extract the file, chmod +x scrutiny-collector-metrics-linux-arm, and then run it via the manual install instructions

If you could respond to this issue with the results of your testing (either success & failure), that would fantastic, since this is a brand new binary. Once I've gotten a couple of +1's I'll start including these with every release.

@Zorlin
Copy link
Contributor

Zorlin commented Oct 5, 2020

On arm32, running your version of scrutiny-web doesn't seem to work. In both cases I'm using the same configuration file and no existing database.

root@clyde:~# /etc/scrutiny/bin/scrutiny-web-linux-arm start --config /etc/scrutiny/config/scrutiny.yaml
2020/10/05 18:39:22 No configuration file found at /scrutiny/config/scrutiny.yaml. Using Defaults.

 ___   ___  ____  __  __  ____  ____  _  _  _  _
/ __) / __)(  _ \(  )(  )(_  _)(_  _)( \( )( \/ )
\__ \( (__  )   / )(__)(   )(   _)(_  )  (  \  /
(___/ \___)(_)\_)(______) (__) (____)(_)\_) (__)
github.com/AnalogJ/scrutiny                       linux.arm-0.2.4

Start the scrutiny server
2020/10/05 18:39:22 Loading configuration file: /etc/scrutiny/config/scrutiny.yaml
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

Trying to connect to database stored: /etc/scrutiny/config/scrutiny.db
panic: Failed to connect to database!

goroutine 1 [running]:
github.com/analogj/scrutiny/webapp/backend/pkg/web/middleware.DatabaseMiddleware(0x8740c8, 0x100e6b0, 0x876720, 0x129a700, 0x874af8)
        /go/src/github.com/analogj/scrutiny/webapp/backend/pkg/web/middleware/sqlite3.go:18 +0x3d0
github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup(0x100ea10, 0x876720, 0x129a700, 0x0)
        /go/src/github.com/analogj/scrutiny/webapp/backend/pkg/web/server.go:23 +0x88
github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Start(0x100ea10, 0x0, 0x0)
        /go/src/github.com/analogj/scrutiny/webapp/backend/pkg/web/server.go:80 +0x188
main.main.func2(0x100b3e0, 0x4, 0x6)
        /go/src/github.com/analogj/scrutiny/webapp/backend/cmd/scrutiny/scrutiny.go:112 +0x144
github.com/urfave/cli/v2.(*Command).Run(0x1276fc0, 0x100b260, 0x0, 0x0)
        /go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/command.go:164 +0x3c0
github.com/urfave/cli/v2.(*App).RunContext(0x12aa000, 0x86eba8, 0x108e010, 0x1078100, 0x4, 0x4, 0x0, 0x0)
        /go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:306 +0x5c0
github.com/urfave/cli/v2.(*App).Run(...)
        /go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:215
main.main()
        /go/src/github.com/analogj/scrutiny/webapp/backend/cmd/scrutiny/scrutiny.go:137 +0x5f8

Compare that with my own build:

root@clyde:~# /etc/scrutiny/bin/scrutiny-web-linux-armhf start --config /etc/scrutiny/config/scrutiny.yaml
2020/10/05 18:40:28 No configuration file found at /scrutiny/config/scrutiny.yaml. Skipping

 ___   ___  ____  __  __  ____  ____  _  _  _  _
/ __) / __)(  _ \(  )(  )(_  _)(_  _)( \( )( \/ )
\__ \( (__  )   / )(__)(   )(   _)(_  )  (  \  /
(___/ \___)(_)\_)(______) (__) (____)(_)\_) (__)
github.com/AnalogJ/scrutiny                             dev-0.2.4

Start the scrutiny server
2020/10/05 18:40:28 Loading configuration file: /etc/scrutiny/config/scrutiny.yaml
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

Trying to connect to database stored: /etc/scrutiny/config/scrutiny.db
[GIN-debug] GET    /api/health               --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func1 (5 handlers)
[GIN-debug] POST   /api/health/notify        --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.SendTestNotification (5 handlers)
[GIN-debug] POST   /api/devices/register     --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.RegisterDevices (5 handlers)
[GIN-debug] GET    /api/summary              --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDevicesSummary (5 handlers)
[GIN-debug] POST   /api/device/:wwn/smart    --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceMetrics (5 handlers)
[GIN-debug] POST   /api/device/:wwn/selftest --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.UploadDeviceSelfTests (5 handlers)
[GIN-debug] GET    /api/device/:wwn/details  --> github.com/analogj/scrutiny/webapp/backend/pkg/web/handler.GetDeviceDetails (5 handlers)
[GIN-debug] GET    /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] HEAD   /web/*filepath            --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (5 handlers)
[GIN-debug] GET    /                         --> github.com/analogj/scrutiny/webapp/backend/pkg/web.(*AppEngine).Setup.func2 (5 handlers)
[GIN-debug] Listening and serving HTTP on 0.0.0.0:8080

@Zorlin
Copy link
Contributor

Zorlin commented Oct 5, 2020

The collector, however, appears to work perfectly. (arm32)

@AnalogJ
Copy link
Owner Author

AnalogJ commented Oct 6, 2020

thats incredibly weird. let me do some research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants