Skip to content

Commit

Permalink
fix: finalize renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
  • Loading branch information
xvzf committed Aug 31, 2024
1 parent 4a7c244 commit 158e7fc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: computeblade-agent
project_name: compute-blade-agent

builds:
- env: &env
Expand All @@ -7,7 +7,7 @@ builds:
- linux
goarch: &goarch
- arm64
binary: computeblade-agent
binary: compute-blade-agent
id: agent
dir: ./cmd/agent/

Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
Expand All @@ -22,21 +22,21 @@ 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**:
A Kustomize environment can be found in `hack/deploy`. Use `kubectl -k hack/deploy` or employ a GitOps tool like FluxCD.
-->

## 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
Expand Down
8 changes: 4 additions & 4 deletions hack/autoinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
File renamed without changes.

0 comments on commit 158e7fc

Please sign in to comment.