One-command local stack with mTLS MQTT, HTTPS control plane, agent enrollment, and a sample signed deploy command.
- Docker and Docker Compose
- Python 3.10+
make prod-upThis will:
- Generate PKI assets, signing keys, and
.env(make setup-dev) - Start Mosquitto (mTLS on
8883) and control plane (https://localhost:8080) - Bootstrap-enroll
edge-agent-001and write credentials toruntime/agent-credentials/ - Start the edge agent with Docker socket access
curl -sk https://localhost:8080/health
curl -sk https://localhost:8080/ready
curl -sk https://localhost:8080/metrics
curl -s http://localhost:9090/health
curl -s http://localhost:9090/ready
curl -s http://localhost:9090/metricsmake prod-deploy-exampleThis publishes a signed deploy command for nginx:alpine mapped to host port 8088.
Verify:
docker ps --filter name=nginx-edge-demo
curl -s http://localhost:8088make prod-down- Control plane logs: JSON to stdout (
logging.json: true) - Agent metrics:
http://localhost:9090/metrics - Useful metrics:
edge_mqtt_connected,edge_commands_accepted_total,control_plane_commands_published_total
| Symptom | Check |
|---|---|
| Agent not ready | curl -s http://localhost:9090/ready — MQTT must be connected |
| Enroll fails | Control plane healthy? EDGE_BOOTSTRAP_TOKEN in .env? |
| Deploy rejected | Image must match policy (nginx:*) |
| MQTT TLS errors | Re-run make setup-dev and make prod-up |