Skip to content

wisegrowth/wisebot-operator

Repository files navigation

Wisebot Operator

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

Wisebot

Subscribable topics

Healthz - Current Status

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 }
  }
}

Publishable topics

THe operator will be listening the following topics.

Each of the following topics will publish to Route: /operator/:wisebot-id/healthz:response after executing.

Start Service

Route: /operator/:wisebot-id/service-start

Expected Payload:

{
  "name": "core"
}

Stop Service

Route: /operator/:wisebot-id/service-stop

Expected Payload:

{
  "name": "core"
}

Update Service

Route: /operator/:wisebot-id/service-update

Expected Payload:

{
  "name": "core"
}

Start Daemon

Route: /operator/:wisebot-id/daemon-start

Expected Payload:

{
  "name": "core"
}

Stop Daemon

Route: /operator/:wisebot-id/daemon-stop

Expected Payload:

{
  "name": "core"
}

Restart Daemon

Route: /operator/:wisebot-id/daemon-restart

Expected Payload:

{
  "name": "core"
}

Update Daemon

Route: /operator/:wisebot-id/daemon-update

Expected Payload:

{
  "name": "core"
}

TODO

  • 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

About

Wisebot Process Supervisor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •