Files
Eliott van Nuffel df38148149
Some checks failed
Native Verification / Build Docs (pull_request) Successful in 1m12s
Native Verification / Build App-Service Native (pull_request) Successful in 1m27s
Native Verification / Build Daemon Native (pull_request) Successful in 42s
Lint and Test Charts / lint-test (pull_request_target) Failing after 19s
Lint and Test Charts / test-version (pull_request_target) Successful in 0s
Lint and Test Charts / push-image (pull_request_target) Failing after 15s
Lint and Test Charts / upload-cli (pull_request_target) Failing after 1m15s
Lint and Test Charts / upload-daemon (pull_request_target) Failing after 1m12s
Lint and Test Charts / push-deps (pull_request_target) Has been skipped
Lint and Test Charts / push-deps-arm64 (pull_request_target) Has been skipped
Lint and Test Charts / push-image-arm64 (pull_request_target) Has been cancelled
Lint and Test Charts / upload-package (pull_request_target) Has been cancelled
Lint and Test Charts / install-test (pull_request_target) Has been cancelled
continue beOS rebrand and add native verification
2026-03-10 13:48:45 +01:00
..
2026-03-09 09:05:07 +01:00
2026-03-10 08:05:41 +01:00
2026-03-10 08:05:41 +01:00

beOS Pro System Daemon (beosd)

beosd is the foundational process that boots on every beOS Pro node. It runs as a systemd service on port 18088, exposing a secure REST API for hardware abstraction, network orchestration, storage management, and turnkey cluster operations before Kubernetes starts.

The daemon is installed as a systemd service in /etc/systemd/system/beosd.service.

Key features

  • System monitoring: Continuous health checks of cluster and node status.
  • Cluster lifecycle management: Automated install, upgrade, IP-switching, restart, and maintenance operations.
  • Hardware Abstraction: USB auto-mounting, storage provisioning, and management.
  • Network Management: mDNS service discovery, WiFi onboarding, and network interface control.

REST API reference

The daemon provides an authenticated REST API (using signature-based auth):

Base URL: http://<node-ip>:18088

System commands /command/

Lifecycle operations

Method Endpoint Description
POST /command/install Install beOS Pro
POST /command/uninstall Uninstall beOS Pro
POST /command/upgrade Upgrade beOS Pro
DELETE /command/upgrade Cancel upgrade
POST /command/reboot Reboot node
POST /command/shutdown Shutdown node

Network configuration

Method Endpoint Description
POST /command/connect-wifi Connect to WiFi
POST /command/change-host Change beOS Pro IP binding

Storage management

Method Endpoint Description
POST /command/mount-samba Mount SMB shares
POST /command/v2/mount-samba Enhanced SMB mounting
POST /command/umount-samba Unmount SMB shares
POST /command/umount-samba-incluster Cluster-wide SMB unmount
POST /command/umount-usb Unmount USB device
POST /command/umount-usb-incluster Cluster-wide USB unmount

System Maintenance

Method Endpoint Description
POST /command/collect-logs Collect system logs for diagnostics

System information (/system/)

System status

Method Endpoint Description
GET /system/status Get full system status
GET /system/ifs List network interfaces
GET /system/hosts-file View /etc/hosts
POST /system/hosts-file Update /etc/hosts

Mount information

Method Endpoint Description
GET /system/mounted-usb Mounted USB devices
GET /system/mounted-hdd Mounted hard drives
GET /system/mounted-smb Mounted SMB shares
GET /system/mounted-path All mount points

Cluster-wide mounts

Method Endpoint Description
GET /system/mounted-usb-incluster USB mounts in cluster
GET /system/mounted-hdd-incluster HDD mounts in cluster
GET /system/mounted-smb-incluster SMB mounts in cluster
GET /system/mounted-path-incluster All cluster mounts

Container management (/containerd/)

Registry Management

Method Endpoint Description
GET /containerd/registries List registries
GET /containerd/registry/mirrors/ List registry mirrors
GET /containerd/registry/mirrors/:registry Get specific registry mirror
PUT /containerd/registry/mirrors/:registry Update registry mirror
DELETE /containerd/registry/mirrors/:registry Delete registry mirror

Image Management

Method Endpoint Description
GET /containerd/images/ List container images
DELETE /containerd/images/:image Delete specific image
POST /containerd/images/prune Remove unused images

Build from source

Prerequisites

  • Go 1.24+
  • GoReleaser (Optional, for creating release artifacts)

Steps

  1. Navigate to the daemon directory:

    cd daemon
    
  2. Build for your host OS/architecture:

    go build -o beosd ./cmd/terminusd/main.go
    
  3. Cross-compile for another target (e.g., Linux AMD64):

    GOOS=linux GOARCH=amd64 go build -o beosd ./cmd/terminusd/main.go
    
  4. Produce release artifacts (optional):

    goreleaser release --snapshot --clean
    

Extend beosd

To add a new command API:

  1. Define command: Add a new command struct in pkg/commands/.
  2. Implement handler: Create the corresponding HTTP handler logic in internal/apiserver/handlers/.
  3. Register route: Register the new API route in internal/apiserver/server.go.
  4. Update state: If the command modifies the cluster's state, ensure you update the logic in pkg/cluster/state/.
  5. Validate: Run go vet ./... && go test ./... to check for issues and ensure all tests pass before opening a pull request.

Test a custom build

  1. Copy the binary to your beOS Pro node.

  2. On the node, replace the existing binary:

    # Move the new binary into place
    sudo cp -f /tmp/beosd /usr/local/bin/
    
    
  3. Restart the daemon to apply changes:

    sudo systemctl restart beosd