fix: finalize renaming

Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
This commit is contained in:
Matthias Riegler
2024-08-31 15:02:13 +02:00
parent 4a7c244cde
commit 158e7fc1bd
5 changed files with 24 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
project_name: computeblade-agent
project_name: compute-blade-agent
builds:
- env: &env
@@ -7,7 +7,7 @@ builds:
- linux
goarch: &goarch
- arm64
binary: computeblade-agent
binary: compute-blade-agent
id: agent
dir: ./cmd/agent/
@@ -66,9 +66,9 @@ signs:
# Regular OS packages (for now only systemd based OSes)
nfpms:
- id: computeblade-agent
- id: compute-blade-agent
maintainer: Matthias Riegler <me@xvzf.tech>
description: Computeblade Agent
description: compute-blade Agent
homepage: https://github.com/github.com/uptime-industries/compute-blade-agent
license: Apache 2.0
formats:
@@ -77,13 +77,13 @@ nfpms:
- archlinux
bindir: /usr/bin
contents:
- src: ./hack/systemd/computeblade-agent.service
dst: /etc/systemd/system/computeblade-agent.service
- src: ./hack/systemd/compute-blade-agent.service
dst: /etc/systemd/system/compute-blade-agent.service
- src: ./cmd/agent/default-config.yaml
dst: /etc/computeblade-agent/config.yaml
dst: /etc/compute-blade-agent/config.yaml
type: config
- src: ./fanunit.uf2
dst: /usr/share/computeblade-agent/fanunit.uf2
dst: /usr/share/compute-blade-agent/fanunit.uf2
release:
extra_files:

View File

@@ -2,6 +2,6 @@ FROM cgr.dev/chainguard/wolfi-base
LABEL org.opencontainers.image.source https://github.com/github.com/uptime-induestries/compute-blade-agent
# Copy binaries generated by goreleaser
COPY computeblade-agent bladectl /bin
COPY compute-blade-agent bladectl /bin
ENTRYPOINT ["/bin/computeblade-agent"]
ENTRYPOINT ["/bin/compute-blade-agent"]

View File

@@ -1,19 +1,19 @@
# computeblade-agent
# compute-blade-agent
> :warning: **Beta Release**: This software is currently in beta, and both configurations and APIs may undergo breaking changes. It is not yet 100% feature complete, but it functions as intended.
The `computeblade-agent` serves as an operating system agent interfacing with [ComputeBlade](http://computeblade.com) hardware. It takes charge of fan speed, LEDs, and manages common events, such as identifying or locating an individual blade in a server rack. Additionally, it exposes hardware- and agent-related metrics on a [Prometheus](http://prometheus.io) endpoint.
The `compute-blade-agent` serves as an operating system agent interfacing with [ComputeBlade](http://computeblade.com) hardware. It takes charge of fan speed, LEDs, and manages common events, such as identifying or locating an individual blade in a server rack. Additionally, it exposes hardware- and agent-related metrics on a [Prometheus](http://prometheus.io) endpoint.
**Quick Setup with TL;DR**:
```bash
curl -L -o /tmp/computeblade-agent-installer.sh https://raw.githubusercontent.com/github.com/uptime-induestries/compute-blade-agent/main/hack/autoinstall.sh
chmod +x /tmp/computeblade-agent-installer.sh
/tmp/computeblade-agent-installer.sh
curl -L -o /tmp/compute-blade-agent-installer.sh https://raw.githubusercontent.com/github.com/uptime-induestries/compute-blade-agent/main/hack/autoinstall.sh
chmod +x /tmp/compute-blade-agent-installer.sh
/tmp/compute-blade-agent-installer.sh
```
## Components
### computeblade-agent
### compute-blade-agent
This event-loop handler responds to system events, such as button presses and temperature changes. It offers a Prometheus endpoint for monitoring core metrics, including Power over Ethernet (PoE) status.
In normal operation mode, the agent maintains static LEDs and fan speed based on the configuration. If the System on Chip (SoC) temperature exceeds a predefined level, the critical mode is activated, setting the fan speed to 100% and changing the LED color to red. The _identify_ action, independent of the mode, makes the edge LED blink. This can be toggled using `bladectl` on the blade (`bladectl identify`) or by pressing the edge button (or smart fan unit button).
@@ -22,13 +22,13 @@ In normal operation mode, the agent maintains static LEDs and fan speed based on
This firmware controls fan speed and LEDs on the fan unit using a UART-based protocol with agents running on the blades. It reports metrics (fan RPM and airflow temperature) regularly to the blades and forwards button presses (1x -> left blade, 2x -> right blade). The fan unit determines the highest requested fan speed, configuring the fan control chip on the board. Advanced functionalities, such as airflow-based fan curve control, are possible with the EMC2101 chip on the smart fan unit, currently implemented in software on the agent side.
### bladectl - interacting with the agent
`bladectl` interacts with the blade-local API exposed by the computeblade-agent. For instance, you can identify the blade in a rack using `bladectl identify --wait`, which blocks and makes the edge LED blink until the button is pressed.
`bladectl` interacts with the blade-local API exposed by the compute-blade-agent. For instance, you can identify the blade in a rack using `bladectl identify --wait`, which blocks and makes the edge LED blink until the button is pressed.
## Installation Options
The agent and `bladectl` are available as packages for Debian, RPM, and ArchLinux or as an OCI image to run within Docker/Kubernetes. Packages include a systemd unit, which can be enabled using `systemd enable computeblade-agent.service --now`.
The agent and `bladectl` are available as packages for Debian, RPM, and ArchLinux or as an OCI image to run within Docker/Kubernetes. Packages include a systemd unit, which can be enabled using `systemd enable compute-blade-agent.service --now`.
For global access, `bladectl` requires root privileges since the socket (default `/tmp/computeblade-agent.sock`) does not have user/group access due to privileged access to critical resources.
For global access, `bladectl` requires root privileges since the socket (default `/tmp/compute-blade-agent.sock`) does not have user/group access due to privileged access to critical resources.
<!-- WIP
**Kubernetes Deployment**:
@@ -36,7 +36,7 @@ A Kustomize environment can be found in `hack/deploy`. Use `kubectl -k hack/depl
-->
## Configuration
Configuration can be driven by a config file or environment variables. Linux packages ship with the default configuration in `/etc/computeblade-agent/config.yaml`. Alternatively, especially for Kubernetes, all parameters in the YAML configuration can be overwritten using environment variables prefixed with `BLADE_`.
Configuration can be driven by a config file or environment variables. Linux packages ship with the default configuration in `/etc/compute-blade-agent/config.yaml`. Alternatively, especially for Kubernetes, all parameters in the YAML configuration can be overwritten using environment variables prefixed with `BLADE_`.
For example, changing the metric address defined in YAML:
```yaml

View File

@@ -25,13 +25,13 @@ get_latest_release() {
curl -s "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
}
github_repo="github.com/uptime-induestries/compute-blade-agent"
github_repo="github.com/uptime-industries/compute-blade-agent"
package_suffix=$(detect_package_suffix)
latest_release=$(get_latest_release "$github_repo")
# Construct the download URL and filename based on the detected package manager and latest release
download_url="https://github.com/$github_repo/releases/download/$latest_release/${github_repo##*/}_${latest_release#v}_linux_arm64.$package_suffix"
target_file="$tmp_dir/computeblade-agent.$package_suffix"
target_file="$tmp_dir/compute-blade-agent.$package_suffix"
# Download the package
echo "Downloading $download_url"
@@ -52,5 +52,5 @@ case "$package_suffix" in
esac
# Enable and start the service
echo "Enabling and starting computeblade-agent"
sudo systemctl enable computeblade-agent --now
echo "Enabling and starting compute-blade-agent"
sudo systemctl enable compute-blade-agent --now