Commit Graph

120 Commits

Author SHA1 Message Date
renovate[bot]
19c58fda60 chore(deps): Update module golang.org/x/sync to v0.17.0 (#135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-21 01:57:37 +00:00
renovate[bot]
551c3b50ba chore(deps): Update module github.com/spf13/viper to v1.21.0 (#134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 20:42:31 +00:00
renovate[bot]
4f56e1a568 chore(deps): Update module github.com/spf13/cobra to v1.10.1 (#133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 17:28:42 +00:00
renovate[bot]
de8ca4c27b chore(deps): Update module google.golang.org/protobuf to v1.36.9 (#132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 13:38:55 +00:00
renovate[bot]
339b6881f2 chore(deps): Update module google.golang.org/grpc to v1.75.1 (#130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 09:07:40 +00:00
renovate[bot]
7e2cb1d9c3 chore(deps): Update module github.com/spf13/pflag to v1.0.10 (#128)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 04:27:33 +00:00
renovate[bot]
c30a64acd9 chore(deps): Update module github.com/spechtlabs/go-otel-utils/otelzap to v0.0.15 (#127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 01:15:17 +00:00
renovate[bot]
055fcb98b2 chore(deps): Update module github.com/spechtlabs/go-otel-utils/otelprovider to v0.0.15 (#126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 21:52:32 +00:00
renovate[bot]
a4e4e468d1 chore(deps): Update module github.com/prometheus/client_golang to v1.23.2 (#125)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 17:25:50 +00:00
renovate[bot]
a710b17abf chore(deps): Update module github.com/stretchr/testify to v1.11.1 (#124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 23:30:10 +00:00
renovate[bot]
eaf26cabd2 chore(deps): Update module github.com/stretchr/testify to v1.11.0 (#123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 05:34:52 +00:00
renovate[bot]
b0da67eaae chore(deps): Update module github.com/spechtlabs/go-otel-utils/otelzap to v0.0.13 (#122)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:49:46 +00:00
renovate[bot]
0cfdb935b5 chore(deps): Update module github.com/spechtlabs/go-otel-utils/otelprovider to v0.0.13 (#121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-24 20:50:37 +00:00
renovate[bot]
2679c21423 chore(deps): Update module google.golang.org/protobuf to v1.36.8 (#120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 00:54:35 +00:00
renovate[bot]
4f3bea45fe chore(deps): Update module tinygo.org/x/drivers to v0.33.0 (#119)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-20 01:54:31 +00:00
renovate[bot]
a2f06d99ec chore(deps): Update module google.golang.org/protobuf to v1.36.7 (#113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-07 17:23:04 +00:00
renovate[bot]
24cb5f0d4a chore(deps): Update module github.com/prometheus/client_golang to v1.23.0 (#111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 00:39:48 +00:00
renovate[bot]
19805dd5ae chore(deps): Update module github.com/olekukonko/tablewriter to v1.0.9 (#110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 23:27:58 +00:00
github-actions[bot]
354c7b62c6 chore(main): release 0.11.1 (#109)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.11.1
2025-07-23 20:51:36 +02:00
Cedric Specht
ddee9b2c14 fix(cmd_root.go): change alias for --all flag from lowercase 'a' to uppercase 'A' for consistency with other flags (#108) 2025-07-23 20:49:29 +02:00
renovate[bot]
1471ac9376 chore(deps): Update module google.golang.org/grpc to v1.74.2 (#107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 19:49:48 +00:00
renovate[bot]
1865cc3163 chore(deps): Update module google.golang.org/grpc to v1.74.0 (#106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-17 06:36:40 +00:00
renovate[bot]
97e9dc4e5e chore(deps): Update module github.com/spf13/pflag to v1.0.7 (#105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-17 03:12:16 +00:00
renovate[bot]
25758de65d chore(deps): Update module golang.org/x/sync to v0.16.0 (#104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 23:57:09 +00:00
renovate[bot]
c5c330ffa3 chore(deps): Update module github.com/olekukonko/tablewriter to v1.0.8 (#103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 18:42:02 +00:00
renovate[bot]
2d9fa62ac0 chore(deps): Update module tinygo.org/x/drivers to v0.32.0 (#102)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 23:50:24 +00:00
Cedric Kienzler
b176f86394 refactor(bladectl): use short-commit sha in version cmd 2025-06-07 00:53:01 +02:00
Cedric Kienzler
f6234b5a3d chore(build): bump-patch-for-minor-pre-major
pre 1.0.0 we bump the minor for breaking and the patch for feature
changes.
2025-06-07 00:19:03 +02:00
github-actions[bot]
ebb492b71a chore(main): release 0.11.0 (#101)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.11.0
2025-06-07 00:16:46 +02:00
Cedric Kienzler
062e36e33a feat(bladectl): add server version information to output (#100)
add server version information to output
ensure the blade-name is always set

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 22:14:29 +00:00
github-actions[bot]
4acfa27158 chore(main): release 0.10.0 (#99)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.10.0
2025-06-06 23:05:27 +02:00
Cedric Kienzler
781ded8e43 feat(bladectl)!: add more bladectl commands (#91)
This PR introduces a comprehensive set of new subcommands to bladectl, expanding its capabilities for querying and managing compute blade state. It also includes an internal refactor to simplify interface management across the gRPC API.

* `get`
	* `fan`: Returns current fan speed.
	* `identify`: Indicates whether the identify mode is active.
	* `stealth`: Shows if stealth mode is currently enabled.
	* `status`: Prints a full blade status report.
	* `temperature`: Retrieves current SoC temperature.
	* `critical`: Shows whether critical mode is active.
	* `power`: Reports the current power source (e.g., PoE+ or USB).
* `set`
	* `stealth`: Enables stealth mode.
* `remove`
	* `stealth`: Disables stealth mode.
* `describe`
	* `fan`: Outputs the current fan curve configuration.
* `monitor`: plot some charts about the state of the compute-blade-agent

* **gRPC API refactor**: The gRPC service definitions previously located in `internal/api` have been folded into `internal/agent`. This eliminates redundant interface declarations and ensures that all ComputeBladeAgent implementations are directly compatible with the gRPC API.
This reduces duplication and improves long-term maintainability and clarity of the interface contract.

```bash
bladectl set fan --percent 90 --blade 1 --blade 2
bladectl unset identify --blade 1 --blade 2 --blade 3 --blade 4
bladectl set stealth --blade 1 --blade 2 --blade 3 --blade 4
bladectl get status --blade 1 --blade 2 --blade 3 --blade 4
┌───────┬─────────────┬────────────────────┬───────────────┬──────────────┬──────────┬───────────────┬──────────────┐
│ BLADE │ TEMPERATURE │ FAN SPEED OVERRIDE │ FAN SPEED     │ STEALTH MODE │ IDENTIFY │ CRITICAL MODE │ POWER STATUS │
├───────┼─────────────┼────────────────────┼───────────────┼──────────────┼──────────┼───────────────┼──────────────┤
│ 1     │ 50°C        │ 90%                │ 5825 RPM(90%) │ Active       │ Off      │ Off           │ poe+         │
│ 2     │ 48°C        │ 90%                │ 5825 RPM(90%) │ Active       │ Off      │ Off           │ poe+         │
│ 3     │ 49°C        │ Not set            │ 4643 RPM(56%) │ Active       │ Off      │ Off           │ poe+         │
│ 4     │ 49°C        │ Not set            │ 4774 RPM(58%) │ Active       │ Off      │ Off           │ poe+         │
└───────┴─────────────┴────────────────────┴───────────────┴──────────────┴──────────┴───────────────┴──────────────┘
bladectl rm stealth --blade 1 --blade 2 --blade 3 --blade 4
bladectl rm fan --blade 1 --blade 2 --blade 3 --blade 4
bladectl get status --blade 1 --blade 2 --blade 3 --blade 4
┌───────┬─────────────┬────────────────────┬───────────────┬──────────────┬──────────┬───────────────┬──────────────┐
│ BLADE │ TEMPERATURE │ FAN SPEED OVERRIDE │ FAN SPEED     │ STEALTH MODE │ IDENTIFY │ CRITICAL MODE │ POWER STATUS │
├───────┼─────────────┼────────────────────┼───────────────┼──────────────┼──────────┼───────────────┼──────────────┤
│ 1     │ 51°C        │ Not set            │ 5177 RPM(66%) │ Off          │ Off      │ Off           │ poe+         │
│ 2     │ 49°C        │ Not set            │ 5177 RPM(58%) │ Off          │ Off      │ Off           │ poe+         │
│ 3     │ 50°C        │ Not set            │ 4659 RPM(60%) │ Off          │ Off      │ Off           │ poe+         │
│ 4     │ 48°C        │ Not set            │ 4659 RPM(54%) │ Off          │ Off      │ Off           │ poe+         │
└───────┴─────────────┴────────────────────┴───────────────┴──────────────┴──────────┴───────────────┴──────────────┘
```

when having multiple compute-blades in your bladeconfig:

```yaml
blades:
    - name: 1
      blade:
        server: blade-pi1:8081
        cert:
            certificate-authority-data: <redacted>
            client-certificate-data: <redacted>
            client-key-data: <redacted>
    - name: 2
      blade:
        server: blade-pi2:8081
        cert:
            certificate-authority-data: <redacted>
            client-certificate-data: <redacted>
            client-key-data: <redacted>
    - name: 3
      blade:
        server: blade-pi3:8081
        cert:
            certificate-authority-data: <redacted>
            client-certificate-data: <redacted>
            client-key-data: <redacted>
    - name: 4
      blade:
        server: blade-pi4:8081
        cert:
            certificate-authority-data: <redacted>
            client-certificate-data: <redacted>
            client-key-data: <redacted>
    - name: 4
      blade:
        server: blade-pi4:8081
        cert:
            certificate-authority-data: <redacted>
            client-certificate-data: <redacted>
            client-key-data: <redacted>
current-blade: 1
```

Fixes #4, #9 (partially), should help with #5

* test: improve unit-testing

* fix: pin github.com/warthog618/gpiod

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 23:03:43 +02:00
Cedric Kienzler
7ec49ce05c feat(OpenTelemetry): Integrate OpenTelemetry into agent (#90)
* feat(OpenTelemetry): Integrate OpenTelemetry into agent

- integrate OpenTelemetry logging with zap logger for better observability
- add OpenTelemetry gRPC middleware for enhanced tracing capabilities
- document new OTLP exporter endpoint for better configuration guidance

* docs: document OTEL env var

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 22:43:37 +02:00
renovate[bot]
ca5e9258fa chore(deps): Update module github.com/warthog618/gpiod to v0.9.1 (#98)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 20:28:57 +00:00
renovate[bot]
ced33b0514 chore(deps): Update goreleaser/goreleaser-action action to v6 (#96)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 20:38:31 +02:00
renovate[bot]
9e795d0a22 chore(deps): Update module google.golang.org/grpc to v1.73.0 (#94)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 18:34:54 +00:00
renovate[bot]
39b41e0cdd chore(deps): Update module golang.org/x/sync to v0.15.0 (#93)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 18:33:55 +00:00
Cedric Kienzler
8fb8a0e100 chore: adjust renovate to use the correct semantics for commit 2025-06-06 20:32:57 +02:00
Cedric Kienzler
2b01c25d0a setup renovate 2025-06-06 20:18:25 +02:00
github-actions[bot]
56f72613b2 chore(main): release 0.9.1 (#89)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.9.1
2025-06-06 18:54:39 +02:00
Cedric Kienzler
b022133860 fix(systemd): Add User to systemd service
Add User to systemd service to prevent failure during startup

Currently, the compute-blade-agent fails to start:

```log
May 28 12:56:02 blade-pi1 compute-blade-agent[2066699]: {"level":"fatal","ts":1748433362.147768,"caller":"agent/main.go:104","msg":"Failed to create agent","app":"compute-blade-agent","error":"Failed to extract home directory"}
```

This is a result of #54 being tested with a locally modified systemd service file that had the user ecplicitly set.

In #54 a dependency to the user home directory was made to store the `bladectl` configuration file. If the systemd-service unit runs without an explicit user set, `os.UserHomeDir()` will return `err` preventing the agent from starting up
2025-06-06 18:37:18 +02:00
github-actions[bot]
0733dd594a chore(main): release 0.9.0 (#88)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.9.0
2025-06-06 18:30:40 +02:00
Cedric Kienzler
f6a70fa6a3 docs(release)!: document release process 2025-06-06 18:28:15 +02:00
Cedric Kienzler
631ddfedd4 chore: update repository references from uptime-industries to computeblade-community (#70)
* chore: update repository references from uptime-industries to compute-blade-community

chore: update repository references from uptime-industries to compute-blade-community for consistency and clarity across all files
fix: update links in CHANGELOG.md and README.md to point to the new repository location for accurate documentation
fix: update Dockerfile and systemd service file to reflect the new repository URL for proper source tracking
refactor: change import paths in Go files to use the new repository name for correct package referencing

* chore: Add CODEOWNERS

* feat: add auto-labeling

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 14:40:06 +02:00
Luke Mallon
27a87f3c0f Fix the source label for ghcr.io (#68) 2025-06-06 14:32:04 +02:00
github-actions[bot]
501caeb750 chore(main): release 0.8.2 (#64)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.8.2
2025-06-06 14:31:48 +02:00
Matthias Riegler
6faf63c76f fix: auth to ghcr.io (#63)
Signed-off-by: Matthias Riegler <me@xvzf.tech>
2025-06-06 14:29:35 +02:00
github-actions[bot]
459ab10bec chore(main): release 0.8.1 (#62)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.8.1
2025-06-06 14:29:24 +02:00
Matthias Riegler
790ea2089a fix: set goreleaser version to v2.x (#61)
* fix: set goreleaser version to v2.x

Signed-off-by: Matthias Riegler <me@xvzf.tech>

* fix: goreleaser issues

---------

Signed-off-by: Matthias Riegler <me@xvzf.tech>
Co-authored-by: Luke Mallon (Nalum) <luke@mallon.ie>
2025-06-06 14:26:53 +02:00
github-actions[bot]
2ff46c62b7 chore(main): release 0.8.0 (#60)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.8.0
2025-06-06 14:26:45 +02:00