title: Creating a docker swarm cluster in Vagrant
body: <p>I'm trying to create a swarm cluster of diffferent ubuntu VMs running in Vagrant.
  These have docker enabled via the vagrant file that boots them. Of the three VM's I started the swarm cluster on one machine in the following way </p>
  
  <pre><code>docker pull swarm
  docker run --rm swarm create
  </code></pre>
  
  <p>This returned a unique cluster_id. ON another docker enabled vm, I performed the following steps</p>
  
  <ol>
  <li><p>Stop the docker daemon</p>
  
  <p><code>sudo service docker stop</code></p></li>
  <li><p>Start the daemon with -H flag</p>
  
  <p><code>sudo  docker -H tcp://0.0.0.0:2375 -d</code></p></li>
  </ol>
  
  <p>This gives the following </p>
  
  <pre><code>    INFO[0000] +job init_networkdriver()
      INFO[0000] +job serveapi(tcp://0.0.0.0:2375)
      INFO[0000] Listening for HTTP on tcp (0.0.0.0:2375)
      INFO[0000] /!\ DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF        YOU DON'T KNOW WHAT YOU'RE DOING /!\
      INFO[0000] -job init_networkdriver() = OK (0)
      INFO[0000] Loading containers: start.
  
      INFO[0000] Loading containers: done.
      INFO[0000] docker daemon: 1.6.2 7c8fca2; execdriver: native-graphdriver:aufs
      INFO[0000] +job acceptconnections()
      INFO[0000] -job acceptconnections() = OK (0)
      INFO[0000] Daemon has completed initialization
  </code></pre>
  
  <p>After this I start another session with this node and want to run  run the following command:</p>
  
  <pre><code>sudo docker run -d swarm join --addr=&lt;node_ip:2375&gt; token://&lt;cluster_id&gt;
  </code></pre>
  
  <p>What is the node ip in this case? Using arp -an on this VM gives me three IP's which one is the one that is accessible</p>