This repo contains the daemon process that manages and controlls the different applications proccesses than runs on the raspberry.
This daemon knows how to update either itself and its processes.
PS: This is under development
The operator will subscribe to the following topic:
Topic | Payload |
---|---|
/operator/:wisebot-id/healthz |
Empty Payload |
In order to react to this event, the operator will publish the following message with all the operator's processes current information:
Route: /operator/:wisebot-id/healthz:response
Message Payload:
{
"data": {
"services": [
{ "name": "core", "status": "running", "version": "e3b1730", "repo_version": "e3b1730" },
{ "name": "ble", "status": "updating", "version": "db0ba56", "repo_version": "fddc960" }
],
"daemons": [
{ "name": "led", "status": "running", "repo_version": "e3b1730" },
{ "name": "filebeat", "status": "running", "repo_version": "" }
],
},
"meta": {
"wifi_status": { "is_connected": true, "essid": "foo bar house" },
"mqtt_status": { "is_connected": false }
}
}
THe operator will be listening the following topics.
Each of the following topics will publish to Route:
/operator/:wisebot-id/healthz:response
after executing.
Route: /operator/:wisebot-id/service-start
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/service-stop
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/service-update
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/daemon-start
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/daemon-stop
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/daemon-restart
Expected Payload:
{
"name": "core"
}
Route: /operator/:wisebot-id/daemon-update
Expected Payload:
{
"name": "core"
}
- Connect to aws iot
- Update itself
- Update core process
- Connect with BLE server/service
si repo esta vacio -> fatal: your current branch 'master' does not have any commits yet