Health check
Last updated
Last updated
Consider this line described in the
The ORBS-NODE orchestrator runs this process in order to determine if your ORBS-VM instance is healthy.
A common method used by the Orbs Network's services, including ORBS-VMs, to determine a container's health, is to access its /op/orbs/status/status.json
(explained in detail ) and make sure it is not stale (i.e., that it hasn't been updated in recent few minutes).
HEALTHCHECK is mandatory for your docker container to run on the Orbs Guardian nodes. Do not skip the following instructions.
For example, let's write a simple check based on the existence of a status.json and its "uptime" field's recency.
Create healthechek.sh
(sibling to Dockerfile) shell file containing the following:
As long as the execution of this batch returns status code 0, the container is healthy.
2. create healthecheck.js
file with the following health implementations:
3. Install HEALTHCHECK In dockerfile
4. Build your docker file - now your VM is good to go on Orbs v3!
Please notice that the healthcheck in the example, relays on your VM to write a valid json file to ./status/status.json in the container/ read more about this
The legacy orbs-v2 service installation spec can be found