Commit Graph

102 Commits

Author SHA1 Message Date
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
Cedric Kienzler
ff6898f514 chore(go version)!: Bump go version to 1.24 (#58)
* refactor(workflows): Improve GitHub Action workflows

* bump go version to 1.24

* set coverage report baseline to correct workflow

* nit: keep same

* require older go version

* let semantic-prs write to PR

* let semantic-prs write to PR

* bump go version to 1.24

* bump dependencies

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 14:19:42 +02:00
github-actions[bot]
ac573c805f chore(main): release 0.7.0 (#52)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.7.0
2025-06-06 14:19:21 +02:00
Cedric Kienzler
70541d86ba feat(agent)!: add support for mTLS authentication in gRPC server (#54)
* refactor(fancontroller): improve fan controller validation logic and error handling for temperature steps

* refactor(agent): restructure gRPC server implementation by moving it to a new api package for better organization and maintainability

* feat(agent): implement gRPC server for managing compute blade agents and add graceful shutdown support
refactor(agent): restructure agent code by moving API logic to a dedicated file and improving error handling
fix(agent): update logging messages for clarity and consistency across the agent's operations
chore(agent): remove unused API code and consolidate event handling logic for better maintainability
style(agent): improve code formatting and organization for better readability and adherence to conventions

* feat(agent): add support for TLS configuration in gRPC server

* feat(api): add gRPC server authentication

* fix

* feat(config): add listen mode configuration to support tcp or unix sockets
feat(agent): implement listen mode in gRPC service to allow flexible socket types
feat(bladectl): enhance configuration loading and add support for TLS credentials
fix(bladectl): improve error handling for gRPC connection and event emission
style(logging): change log level from Warn to Info for better clarity in logs

* add logging middleware + fixes

* fix remote-connection to gRPC API Server

debugging the SAN issues took the soul out of me... And then the stupid
mistake in cmd_root where I didn't construct the TLS credentials
correctly... Oh dear...

* cleanup

* cleanup

* cleanup commands

* cleanup

* make README.md nicer

* Update cmd/agent/main.go

Co-authored-by: Matthias Riegler <github@m4tbit.de>

* Update cmd/bladectl/cmd_root.go

Co-authored-by: Matthias Riegler <github@m4tbit.de>

* move bladectl config into correct directory

* fix bugs

* // FIXME: No dead code

* nit: code style

* nit(YAGNI): you aint gonna need it. Don't make life harder than it needs to be

* nit(YAGNI): you aint gonna need it. Don't make life harder than it needs to be

* nit(YAGNI): you aint gonna need it. Don't make life harder than it needs to be

* nit(cmd_identify)

---------

Co-authored-by: Matthias Riegler <github@m4tbit.de>
2025-05-12 00:00:55 +02:00
Cedric Kienzler
ec6229ad86 chore: some improvements in bladectl sub-command handling, error logging, and CI (#51)
chore(ci): update Go setup action to v5 and simplify caching configuration for improved performance
chore(release): update Go setup action to v5 and simplify caching configuration for improved performance
fix(.gitignore): add .idea directory to ignore list to prevent IDE files from being tracked
feat(goreleaser): add versioning information to builds for better traceability
feat(agent): expose version, commit, and date information in logs for better tracking
feat(bladectl): implement command structure for managing compute-blade features
fix(bladectl): improve error handling in identify command for better user feedback
chore(go.mod): update dependencies to latest versions for improved stability and features
2025-05-03 11:13:37 +02:00
github-actions[bot]
c5ff21d522 chore(main): release 0.6.6 (#48)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.6
2025-01-14 22:26:13 +01:00
Matthias Duve
67b3411e32 fix: correct package name from computeblade-agent to compute-blade-agent (#47)
* fix: correct package name from computeblade-agent to compute-blade-agent

* fix: update autoinstall script to use correct GitHub repository format and improve error handling

---------

Co-authored-by: Matthias Duve <morzan1001@mail.runforest.run>
2025-01-14 22:24:47 +01:00
github-actions[bot]
485f5ac79b chore(main): release 0.6.5 (#44)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.5
2024-08-31 15:08:21 +02:00
Matthias Riegler
ca690d418f fix: pin golang/tinygo versions
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-31 15:07:31 +02:00
github-actions[bot]
9048a4afca chore(main): release 0.6.4 (#43)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.4
2024-08-31 15:03:44 +02:00
Matthias Riegler
158e7fc1bd fix: finalize renaming
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-31 15:02:45 +02:00
github-actions[bot]
4a7c244cde chore(main): release 0.6.3 (#42)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.3
2024-08-05 18:51:23 +02:00
Matthias Riegler
3cbf7a8733 fix: oci reg typo
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-05 18:50:44 +02:00
github-actions[bot]
349c8b5199 chore(main): release 0.6.2 (#41)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.2
2024-08-05 18:47:39 +02:00
Matthias Riegler
d088a1ba0a fix: cleanup uf2 files
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-05 18:45:55 +02:00
github-actions[bot]
4649d02952 chore(main): release 0.6.1 (#40)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.1
2024-08-05 18:42:47 +02:00
Matthias Riegler
3278678768 fix: bump tinygo release (#39)
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-05 18:42:13 +02:00
github-actions[bot]
ae843db32c chore(main): release 0.6.0 (#38)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.6.0
2024-08-05 18:32:02 +02:00
Matthias Riegler
6421521bfc feat: migrate to uptime-industries gh org (#37)
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2024-08-05 00:00:01 +02:00