Setting the Status Goal of a Container
For this example, we are going to try to add a nginx container to an existing Pantavisor-enabled device claimed from my Pantacor Hub account:
First step will be to clone our device as usual, in this case, a Raspberry Pi 4
board with the Pantavisor 019 image installed:
pvr clone https://pvr.pantahub.com/anibal/home_rpi64_latest
cd home_rpi64_latest
To add the container with a READY status goal, we cat explicitly set it in the pvr app add
command:
pvr app add --from nginx --status-goal READY webserver
pvr add .
pvr commit
pvr post -m "add new webserver container with READY status goal"
Let us think what we have done for a bit. We have posted a new revision with an nginx container from Docker Hub. Where the developers of this container considerate enough to send a READY signal to Pantavisor? Probably not. That is why we are going to get an ERROR with this update:
As Pantavisor is expecting a READY status goal from the container, the new revision will fail after a configurable timeout. Now, we are going to try to install another container. This time, a Container Ready Demo one that we are sure will send the READY signal:
rm -r webserver
pvr app add --from registry.gitlab.com/pantacor/pv-platforms/container-ready-demo:arm64v8-main --status-goal READY container-ready-demo
pvr add .
pvr commit
pvr post -m "add new container-ready-demo container with READY status goal"
This works! But how does the container send the READY signal to Pantavisor?