Open arun-gupta opened 9 years ago
You can set the name of the cluster by changing the machine name. Since this data lives only in Machine and only shown here, I don't think there would be much benefit from having a separate option.
So the machine name and cluster name are currently the same? And will continue to be so?
As for now unless there is a compelling reason to change (I'm open for discussion :) ) Since this only lives in Machine and only shown on the ls
I'm not sure what would be the use. We could add the ability to do operations on a named cluster but that seems a bit confusing.
The trouble with the cluster name being derived from the master's name is that there seem to be plans for some sort of redundancy with master elections in swarm
. If the master changes, it'd be useful for machine
to be able to handle that, and it would be super-confusing if the master of the cluster named swarm-master-1
was actually swarm-master-2
:)
As well, I can think of cases where performing an operation on an entire cluster would be very useful (especially after seeing #1053 a few minutes ago), like removing, stopping, starting, or upgrading the whole cluster.
A couple user experience options could be:
$ docker-machine upgrade @myCluster
# or...
$ docker-machine upgrade --swarm-name myCluster
@hairyhenderson ok this sounds good. yeah when leader election comes we will definitely want to be able to detect and update the machine list. makes sense.
Created a Swarm cluster as:
Created a Swarm master as:
Listing the machines is shown as:
Added another node and the machine listing is shown as:
Seems like the cluster name is
swarm-master
is picked up from the master's machine name. There should be an option to specify the cluster name when creating the cluster.