Add a docker-machine reinstall…#3898
Add a docker-machine reinstall…#3898ayufan wants to merge 1 commit intodocker-archive-public:masterfrom ayufan:add-reinstall-command
docker-machine reinstall…#3898Conversation
|
Please sign your commits following these rules: $ git clone -b "add-reinstall-command" git@github.com:ayufan/docker-machine.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
|
Hmm... I dunno, I would think something like |
|
Agreed,
In this case, does DigitalOcean actually wipe all the data in the machines (including docker certs) and burn the clean base OS image to the droplet's disk? If so, I would suggest calling the |
|
To be clear, |
|
nathanleclaire: because of cost, if you destroy machine and re-create it often you are hit by full billing cycle. Yes I saw that this is only supported by Digital Ocean. Probably it doesn't make sense to introduce a feature just for one provider. |
|
What's the motivation for wanting to wipe the machine's state? i.e., why is not |
|
nathanleclaire: we (at GitLab) use docker-machine to provision nodes on-demand for running CI jobs, since these nodes do run docker containers in privileged mode we have to wipe them before running another untrusted job |
|
Hm, yeah, I wonder if it might be a slightly better fit to run a little container which makes the DigitalOcean API call to wipe the machine on its own. |
This commands allows to use a cloud instance API to schedule reinstall of machine, by completely wipping its content and then re-provisioning.
This PR is created as proof-of-concept supports only
DigitalOceanreinstall API, but quite easily any other API can be supported.This is the output of command execution on existing machine:
This feature is needed by GitLab Runner docker-machine based auto-scaling to make it possible to re-use existing machines.
What do you think of this? Is this something worth and mergeable (if improved)?