docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

Proposal: share flags between drivers #489

Open sthulb opened 9 years ago

sthulb commented 9 years ago

We should think about sharing flags between drivers. There are prime candidates, things like disk size, ram and such could be shared easily and it would have the bonus of cleaning up the help for the create command.

Each driver would drop the prefix for the shared flags, but still register them as usual, the flag_sort could dedupe them.

nathanleclaire commented 9 years ago

+1

Let's share these where possible and have a common interface.

I'd like to see --n-instances as a shared flag, for instance. Each provider will have to implement this differently (e.g. AWS will accept a parameter to RunInstances, but VM creation with VirtualBox should probably happen one at a time in serial) but the general interface (in the CLI) should be the same from driver to driver.

sthulb commented 9 years ago

We probably don't have to do it in serial. But for the n-instances flag, we have to worry more about failure States.

ehazlett commented 9 years ago

We should make this part of the refactor in #553. Referencing there and closing this one. Thanks!

nathanleclaire commented 9 years ago

On that note, @sthulb if you are interested please feel free to put together a list of flags that should be shared on that issue (don't worry about n-instances- I think that's a separate discussion entirely). Some common ones that I am seeing are disk space, machine image, and memory, for instance.

sthulb commented 9 years ago

@nathanleclaire Something like this?

Flag Description
--image-url Replaces --*-boot2docker-url
--memory-size Replaces --*-memory-size
--disk-size Replaces --*-disk-size
--docker-port Replaces --*-docker-port
--ssh-port Replaces --*-ssh-port
--ssh-user Replaces --*-username
--cpu-cores Replaces --*-cpu*
ehazlett commented 9 years ago

I hope I didn't offend anyone. I'm just trying to get these issues centralized and organized. Sorry if I did.

nathanleclaire commented 9 years ago

@ehazlett No worries - cleaning up / closing / consolidating the issues is the way to go. @sthulb Yep, exactly - preferably with the specific flags where those are duplicated right now. Cheers!

jeanlaurent commented 8 years ago

One year later, changing the flags for the drivers with all the adoption that docker-machine has, will probably annoy a lot of users.

@nathanleclaire Should we close this, or do you want to push this forward ?

nathanleclaire commented 8 years ago

Generally I think it's probably worth keeping open as an existing "issue" to track, and something to make sure to keep into consideration for the next generation of Machine.