Undeploy/kill action
jstenhouse opened this issue · 4 comments
It would be great if centurion supported an undeploy
or stop
/remove
action. Specifically for when you need to retire an app/container or relocate it to a new host. And it could take an optional --host
or --hosts
option to filter which host you are targeting.
One use-case would be I might deploy a POC app to one shared docker host to test things out in a staging environment, but not want it to be long-lived. You'd have to run the docker stop / remove commands on the host instead of using centurion to remove / retire it.
You should be able to do deploy:stop
as your action. It won't delete the image, but it should stop it. The HOSTFILTER
equivalent is something that I don't have a quick answer for.
Yea deploy:remove
would be a nice task to add IMO. And undeploy
could be a deploy:stop
followed by a deploy:remove
. If I get some free time I'll try and take a stab at it.
👍
There is deploy:cleanup
which does this. Currently you'd need two invocations, one to deploy:stop
and one to deploy:cleanup
. Two options I can think of are:
- Allow more than one task on the CLI
- Write a wrapper that does this behavior explicitly