* chore: remove duplicated import Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * chore: rename bcm273x -> bcm2711 to avoid confusion Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: add configuration support Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * docs: update docs & add install script Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: split workflows until release-please is setup on org level Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> --------- Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
computeblade-agent
⚠️ this is still a beta-release & configuration&APIs might see breaking changes!
The computeblade-agent is an OS agent interfacing with the ComputeBlade hardware.
It controls fan speed, LEDs and handles common events e.g. to identify/find an individual blade in a server rack.
In addition, it exposes hardware- and agent-related metrics on a Prometheus endpoint.
TL;DR, I just want it running on my blade script:
curl -L -o /tmp/computeblade-agent-installer.sh https://raw.githubusercontent.com/Uptime-Lab/computeblade-agent/main/hack/autoinstall.sh
chmod +x /tmp/computeblade-agent-installer.sh
/tmp/computeblade-agent-installer.sh
Components
computeblade-agent
The agent is an event-loop handler that's reacting on system events such as button presses and temperature changes. It also exposes a prometheus endpoint allowing monitoring of core-metrics such as PoE status.
By default, the computeblade agent runs in normal operation mode; the LEDs are static and fanspeed is set based on the configuration. In case the SoC temperature raises above a predefined level, the critical mode is active and sets the fan-speed to 100% alongside changing the LED color (Red by default)
Aside from the above mentioned normal and critical modes, the identify action (independend of the mode), which lets the edge LED blink.
This can be toggled using bladectl on the blade (bladectl identify) or by pressing the edge button.
bladectl - interacting with the agent
The bladectl interacts with the blade-local API exposed by the computeblade-agent.
You can e.g. identify the blade in a rack using bladectl identify --wait, which will block & make the edge-LED blink until the button is pressed.
Install Options
The agent and bladectl are provided as package for Debian, RPM and ArchLinux or as OCI image to run within docker/Kubernetes.
Packages ship with a systemd unit which can be enabled using systemd enable computeblade-agent.service --now.
bladectl is available globally, but has to be executed as root since the socket (default /tmp/computeblade-agent.sock) does not have a user/group accessed due to privileged access on critical resources.
Kubernetes deployment:
A kustomize environment can be found in hack/deploy. A kubectl -k hack/deploy does the trick - or use a GitOps tool such as FluxCD.
Configuration
The configuration is driven by a config file or environment variables. Linux packages ship with the default configuration placed in /etc/computeblade-agent/config.yaml.
Alternatively (specifically for running within Kubernetes), all parameters in the YAML configuration can be overwritten using environment variables, prefixed with BLADE_:
Changing the metric address defined in YAML like this:
# Listen configuration
listen:
metrics: ":9666"
is driven by the environment variable BLADE_LISTEN_METRICS=":1234".
Some useful parameters:
BLADE_STEALTH_MODE=falseEnables/disables stealth modeBLADE_FAN_SPEED_PERCENT=80Sets static fan-speed (by default, there's a linear fan-curve of 40-80%BLADE_CRITICAL_TEMPERATURE_THRESHOLD=60Configures critical temperature threshold of the agentBLADE_HAL_BCM2711_DISABLE_FANSPEED_MEASUREMENT=falseenables/disables fan speed measnurement (disabling it reduces CPU load of the agent)