Introduce start_miner|config|packet_forwarder
keys to control start order
#208
Labels
start_miner|config|packet_forwarder
keys to control start order
#208
With the new rewrite where we fully decommissioned the
hm-gwmfr
, the fist service that we need to start up is the diagnostics tool. Moreover, it is somewhat challenging to control the startup order of the other services, as there is a lot of inter-dependency between these services.As the
/json
end-point is now becoming more stable, we should be able to use this as a control mechanism for the startup order.This could look something like this:
We can then have a simple check in the startup script for each container that would look something like this:
In short, we evaluate the
start_config
key from the payload. If this returns false,jq
will exit with exit code 1, and thus the loop will not evaluate true.Later on, we can make this more elegant and move the logic straight into the Dockerfile using the HEALTHCHECK option and then move this check to
docker-compose.yml
using the following stanza:This is unfortunately still not supported in Balena, so we need to stick with the above startup script logic for now.
(NebraLtd/helium-miner-software#177 also touches on this logic)
Checklist
The text was updated successfully, but these errors were encountered: