标签:ror run machines 并且 node driver nec adapter hyperv
First, quickly create a virtual switch for your virtual machines (VMs) to share, so they will be able to connect to each other.
Now, create a couple of VMs using our node management tool,?docker-machine: docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1 docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm2 |
?
|
?
docker-machine env myvm1 | Invoke-Expression 运行这个命令后,后面所有的命令就是针对myvm1的了。 如果不想再针对myvm1, 就可以执行docker-machine env –u | Invoke-Expression,或者直接切换到其他虚机也可以。 |
?
docker swarm init --advertise-addr <myvm1 ip> |
?
docker swarm join-token worker 执行完以后会得到一个命令,拷贝下来后面用,命令的格式为: docker swarm join \ --token <token> \ <myvm1 ip>:<port> |
注:如果需要将myvm2加成manager, 就执行docker swarm join-token manager.
?
docker-machine env myvm2 | Invoke-Expression |
?
运行步骤5中拷贝的命令。 |
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS brtu9urxwfd5j0zrmkubhpkbd myvm2 Ready Active rihwohkh3ph38fhillhhb84sk * myvm1 Ready Active Leader |
?
标签:ror run machines 并且 node driver nec adapter hyperv
原文地址:http://www.cnblogs.com/time-is-life/p/7728416.html