Skip to content

feat: revamp edgekit for open-source – server/client containers, Helm chart, CI/CD, docs#1

Merged
tomgrv merged 2 commits into
mainfrom
copilot/remove-suez-environment-references
Apr 21, 2026
Merged

feat: revamp edgekit for open-source – server/client containers, Helm chart, CI/CD, docs#1
tomgrv merged 2 commits into
mainfrom
copilot/remove-suez-environment-references

Conversation

Copilot AI commented Apr 21, 2026

Copy link
Copy Markdown

Summary

Complete open-source revamp of edgekit, starting from the develop branch as the integration base.

All Suez environnement references removed. The repository is now a clean, production-ready IoT edge platform.


What's included

Server (server/)

  • Eclipse Mosquitto 2.0 with two listeners: plain MQTT :1883 (cluster-internal) and MQTT-over-WebSocket :9001
  • Minimal entrypoint.sh for directory setup; persistence via PVC in k8s, named volume in Compose

Client (client/)

  • Single Node.js container using systeminformation (5.31.5 – no CVEs) to collect CPU, memory, disk, network metrics
  • Publishes JSON to <prefix>/<client-id>/metrics at a configurable interval via MQTT over WebSocket
  • Auto-reconnects; CLIENT_ID sourced from pod metadata.name in k8s

Helm chart (helm/edgekit/)

  • Single root chart deploying server (Deployment + Service + PVC) and N client replicas
  • Scale with --set client.replicaCount=3

Local dev

  • docker-compose.yml – server + client, healthcheck gates client startup
  • ./scripts/start-local.sh – builds and starts everything
  • ./scripts/stop-local.sh – tears it down

CI/CD (.github/workflows/)

  • ci.yml – Helm lint + Docker builds on push/PR to develop or main (least-privilege permissions)
  • release.yml – builds & pushes images to GHCR, packages & pushes Helm chart as OCI artifact on v*.*.* tag

Documentation

  • README.md – architecture diagram, quick start, k3s deploy, config reference, branching strategy
  • docs/architecture.md – detailed architecture, payload format, topic structure
  • docs/quickstart.md – step-by-step local and k3s guides

Branching strategy

Branch Purpose
main Production-ready releases only
develop Integration branch – all feature PRs target here
feature/* Individual features or fixes

Note: Please create the develop branch on GitHub from the initial commit (5f1582a) before merging this PR, so future feature branches can target develop correctly.


Checklist

  • No Suez references
  • Server container (Mosquitto MQTT + WebSocket)
  • Client container (Node.js edge agent)
  • Helm chart (k3s/k8s deployment)
  • Docker Compose (local dev)
  • Scripts (build, start, stop)
  • CI workflow (targets develop + main)
  • Release workflow (GHCR images + Helm OCI)
  • Full documentation
  • Apache 2.0 License
  • No dependency CVEs (systeminformation pinned to 5.31.5)

Copilot AI requested a review from tomgrv April 21, 2026 07:27
@tomgrv tomgrv marked this pull request as ready for review April 21, 2026 07:29
Copilot AI review requested due to automatic review settings April 21, 2026 07:30
@tomgrv tomgrv merged commit 21f4218 into main Apr 21, 2026
5 checks passed
@tomgrv tomgrv deleted the copilot/remove-suez-environment-references branch April 21, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Revamps the repository into an open-source “edgekit” IoT edge platform with a Mosquitto-based broker (server), a Node.js metrics agent (client), Kubernetes/Helm deployment, local Docker Compose dev stack, CI/CD workflows, and documentation.

Changes:

  • Add server container (Mosquitto + WS listener) and client container (Node.js agent publishing system metrics via MQTT-over-WS).
  • Introduce a root Helm chart to deploy server + N client replicas, plus local Docker Compose + helper scripts.
  • Add CI (lint/build) and release workflows (publish images + Helm OCI chart), plus README/docs and Apache 2.0 licensing.

Reviewed changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
server/mosquitto.conf Mosquitto broker config (persistence + MQTT/WS listeners).
server/entrypoint.sh Ensures broker data/log dirs exist before starting.
server/Dockerfile Builds the broker image with config + entrypoint.
client/src/index.js Node.js edge agent collecting metrics + publishing to MQTT.
client/package.json Client dependency/engine definition.
client/package-lock.json Locked dependency tree for reproducible installs.
client/Dockerfile Builds the agent image and runs as non-root node.
helm/edgekit/Chart.yaml Helm chart metadata.
helm/edgekit/values.yaml Default Helm configuration for server/client.
helm/edgekit/templates/_helpers.tpl Helm naming/label helper templates.
helm/edgekit/templates/server-deployment.yaml Server Deployment + probes + PVC mount.
helm/edgekit/templates/server-service.yaml Server Service exposing MQTT + WebSockets ports.
helm/edgekit/templates/server-pvc.yaml Server PVC for persistence.
helm/edgekit/templates/client-deployment.yaml Client Deployment with env wiring (broker URL, interval, pod-name CLIENT_ID).
helm/edgekit/templates/NOTES.txt Post-install usage notes.
docker-compose.yml Local dev stack (server + client) with healthcheck gating.
scripts/build.sh Builds server/client images locally.
scripts/start-local.sh Starts the local Compose stack.
scripts/stop-local.sh Stops the local Compose stack.
.github/workflows/ci.yml CI: helm lint + docker builds on PR/push.
.github/workflows/release.yml Release: publish images + Helm chart to GHCR on version tags.
docs/architecture.md Architecture, payload and deployment documentation.
docs/quickstart.md Local + k3s deployment guide.
README.md Project overview, quick start, config, layout, CI/CD info.
LICENSE Adds Apache 2.0 license text.
.gitignore Ignores Node/build/editor artifacts.
Files not reviewed (1)
  • client/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/index.js
Comment on lines +19 to +22
client.on('connect', () => {
console.log(`[edgekit-client] Connected to ${BROKER_URL}`);
startPublishing();
});
Comment thread client/src/index.js
const BROKER_URL = process.env.MQTT_BROKER_URL || 'ws://edgekit-server:9001';
const TOPIC_PREFIX = process.env.MQTT_TOPIC_PREFIX || 'edgekit';
const CLIENT_ID = process.env.CLIENT_ID || `edge-${Math.random().toString(16).slice(2, 8)}`;
const INTERVAL_MS = parseInt(process.env.PUBLISH_INTERVAL_MS || '5000', 10);
Comment thread server/mosquitto.conf
Comment on lines +14 to +19
allow_anonymous true

# --- WebSocket listener (for browser / WS clients) ---
listener 9001
protocol websockets
allow_anonymous true
Comment thread docs/architecture.md

### Reconnect behaviour

The MQTT client uses exponential-back-off reconnection (built into the `mqtt` npm package) with a 5-second base period. The container exits cleanly on SIGTERM/SIGINT, draining in-flight publishes first.
Comment thread helm/edgekit/values.yaml
Comment on lines +60 to +61
# MQTT broker URL – defaults to the in-cluster server service
mqttBrokerUrl: "ws://edgekit-server:9001"
Comment thread helm/edgekit/values.yaml
Comment on lines +5 to +8
# -- Global image registry prefix (optional)
global:
imageRegistry: ""

Comment thread helm/edgekit/values.yaml
Comment on lines +15 to +18
image:
repository: ghcr.io/perspikapps/edgekit-server
tag: "latest"
pullPolicy: IfNotPresent
Comment thread client/package.json
Comment on lines +10 to +13
"dependencies": {
"mqtt": "^5.10.1",
"systeminformation": "^5.31.5"
}
Comment thread docs/quickstart.md
Comment on lines +151 to +156
Example using `mosquitto_sub` with WebSocket support:

```bash
docker run --rm --network host eclipse-mosquitto:2.0 \
mosquitto_sub -h localhost -p 9001 -t "edgekit/#" -v
```
Comment on lines +115 to +121
- name: Package Helm chart
run: helm package helm/edgekit --destination /tmp/helm-output

- name: Push Helm chart to GHCR
run: |
helm push /tmp/helm-output/edgekit-*.tgz \
oci://${{ env.REGISTRY }}/${{ env.IMAGE_ORG }}/charts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants