feat: revamp edgekit for open-source – server/client containers, Helm chart, CI/CD, docs#1
Merged
Merged
Conversation
…nt/helm/ci/docs Agent-Logs-Url: https://github.com/perspikapps/edgekit/sessions/6abf6214-6f32-4a54-be1c-8704e4c63d7c Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
Agent-Logs-Url: https://github.com/perspikapps/edgekit/sessions/d3e01d94-d283-4ab5-b3a7-34dd055df0ae Co-authored-by: tomgrv <1809566+tomgrv@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
tomgrv
April 21, 2026 07:27
View session
There was a problem hiding this comment.
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 on lines
+19
to
+22
| client.on('connect', () => { | ||
| console.log(`[edgekit-client] Connected to ${BROKER_URL}`); | ||
| startPublishing(); | ||
| }); |
| 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 on lines
+14
to
+19
| allow_anonymous true | ||
|
|
||
| # --- WebSocket listener (for browser / WS clients) --- | ||
| listener 9001 | ||
| protocol websockets | ||
| allow_anonymous true |
|
|
||
| ### 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 on lines
+60
to
+61
| # MQTT broker URL – defaults to the in-cluster server service | ||
| mqttBrokerUrl: "ws://edgekit-server:9001" |
Comment on lines
+5
to
+8
| # -- Global image registry prefix (optional) | ||
| global: | ||
| imageRegistry: "" | ||
|
|
Comment on lines
+15
to
+18
| image: | ||
| repository: ghcr.io/perspikapps/edgekit-server | ||
| tag: "latest" | ||
| pullPolicy: IfNotPresent |
Comment on lines
+10
to
+13
| "dependencies": { | ||
| "mqtt": "^5.10.1", | ||
| "systeminformation": "^5.31.5" | ||
| } |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete open-source revamp of edgekit, starting from the
developbranch 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/):1883(cluster-internal) and MQTT-over-WebSocket:9001entrypoint.shfor directory setup; persistence via PVC in k8s, named volume in ComposeClient (
client/)systeminformation(5.31.5 – no CVEs) to collect CPU, memory, disk, network metrics<prefix>/<client-id>/metricsat a configurable interval via MQTT over WebSocketCLIENT_IDsourced from podmetadata.namein k8sHelm chart (
helm/edgekit/)--set client.replicaCount=3Local dev
docker-compose.yml– server + client, healthcheck gates client startup./scripts/start-local.sh– builds and starts everything./scripts/stop-local.sh– tears it downCI/CD (
.github/workflows/)ci.yml– Helm lint + Docker builds on push/PR todevelopormain(least-privilege permissions)release.yml– builds & pushes images to GHCR, packages & pushes Helm chart as OCI artifact onv*.*.*tagDocumentation
README.md– architecture diagram, quick start, k3s deploy, config reference, branching strategydocs/architecture.md– detailed architecture, payload format, topic structuredocs/quickstart.md– step-by-step local and k3s guidesBranching strategy
maindevelopfeature/*Checklist
systeminformationpinned to 5.31.5)