How to determine when a Stack Script is finished when using linode-cli?
If I create a linode with linode-cli and use the stack script option, is there any way I can determine when the stack script is finished doing its thing? In my case I am using the standard Docker stack script, and I don't want my script to start issuing docker commands until installation is complete.
Thanks!
2 Replies
There currently isn't any way to do this. You could customize the Docker stackscript to poke something (hit an API, ssh into a box) when it's done all the important things, or you could have the stackscript itself do the remaining setup you need.
Thanks!
What I ended up doing is just putting in a 5 minute wait loop after the linode-cli
has reported the linode as running. This is a more than sufficient amount of time for the node to finish booting and execute the Docker install stack script. I hate the non-determinism of it, but for my purposes it works.