feat: add destroy#394
Conversation
|
fixes: #369 |
|
Do we want to move this to a deployment plan thing? Or just call stop.Service which also has nice output. A deployment plan seems also a bit overkill as the plan is 'remove all containers' |
|
I'm a bit confused about what you want to actually achieve with the For destructive operations we don't seem to have a consistent prompt. But I don't think we need anything fancy, just list the resources that will be removed like |
s/stops/remove Thanks for the feedback, I'll move towards that. |
fb7662d to
9165f14
Compare
This adds destroy (aliases: down, undeploy) which calls out to client.RemoveService to remove services from the cluster. It is the opposite of "deploy" (which now has the alias "up") This was mostly cut&paste of existing functionality. Cancelling the operation: ``` % ~miekg/uncloud/cmd/uncloud/uc destroy NAME MODE REPLICAS unkey global 3 Proceed with destroy? [y/N] n Destroy cancelled. No changes were made. ``` Giving a service: ``` ~miekg/uncloud/cmd/uncloud/uc destroy ds Error: select services: no such service: ds ``` Destroying takes place: ``` ``` NAME MODE REPLICAS unkey global 3 Proceed with destroy? [y/N] y [+] Destroy service unkey 3/3 ✔ Container unkey/cafab403586d on machine-11zv Removed 3.9s ✔ Container unkey/f0773dc8c97d on machine-z00h Removed 4.6s ✔ Container unkey/b1b428fabcd8 on machine-36i2 Removed 4.1s ``` Signed-off-by: Miek Gieben <miek@miek.nl>
9165f14 to
8b172e4
Compare
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
feat: add destroy
This adds destroy (aliases: down, undeploy) which calls out to client.RemoveService to remove services from the cluster. It is the opposite of "deploy" (which now has the alias "up")
This was mostly cut&paste of existing functionality.
Cancelling the operation:
Giving a service:
Destroying takes place:
Signed-off-by: Miek Gieben miek@miek.nl