title: Docker swarm: How to manually set node names?
body: <p><strong>For some background on my environment:</strong></p>
  
  <p>I have docker swarm running on 3 ubuntu 14.04 vagrant boxes.  The swarm master is running on 1 machine (with consul) and the other 2 machines are running swarm workers that are joined to the master. I set up the environment following the documentation page <a href="https://docs.docker.com/swarm/install-manual/" rel="noreferrer">https://docs.docker.com/swarm/install-manual/</a>.  It is working correctly so that any <code>docker -H :4000 &lt;some_docker_command&gt;</code> run from my master machine works fine. Service discovery is active as I am running the <strong>gliderlabs/registrator</strong> container on both of my workers. Any changes to my cluster, such as a node or container failure, are shown by swarm within about 30 seconds (which is a bit slow in my opinion, but at least its working).</p>
  
  <p><strong>The issue:</strong></p>
  
  <p>Swarm recognizes both of my nodes as "ubuntu-14" </p>
  
  <pre><code>vagrant@ubuntu-14:~$ docker -H :4000 ps
  CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS                        NAMES
  a6972155d243        cohenaj194/apache-simple   "/usr/sbin/apache2ctl"   About an hour ago   Up 13 seconds       172.28.128.6:32770-&gt;80/tcp   ubuntu-14/test2
  af78a8c788ed        gliderlabs/registrator     "/bin/registrator con"   2 hours ago         Up About an hour                                 ubuntu-14/registrator2
  8e39416a785a        gliderlabs/registrator     "/bin/registrator con"   2 hours ago         Up 2 hours                                       ubuntu-14/registrator1
  27c2225b32fb        cohenaj194/apache-simple   "/usr/sbin/apache2ctl"   2 hours ago         Up 2 hours          172.28.128.4:32770-&gt;80/tcp   ubuntu-14/test1
  vagrant@ubuntu-14:~$ docker -H :4000 network ls
  NETWORK ID          NAME                DRIVER
  38b24dc5615b        ubuntu-14/bridge    bridge              
  c4e1ffae2fa7        ubuntu-14/bridge    bridge              
  29cf499e57ab        ubuntu-14/host      host                
  7b4a4a153ada        ubuntu-14/host      host                
  723b6bc6f23c        ubuntu-14/none      null                
  01f3647d62cd        ubuntu-14/none      null   
  </code></pre>
  
  <p>I would like to know how to manually change the name of my nodes from "ubuntu-14" to something else.  I would prefer to be able to set the tags by adding a line to the <code>/etc/default/docker</code> file, as the private cloud I will eventually be running my cluster within does not have a way to set instance tags similar to other cloud providers such as AWS.</p>
  
  <p><strong>tldr:</strong> I have 3 vagrant ubuntu boxes running swarm (1 master + 2 workers).  The workers by default have the tag name "ubuntu-14" and I want to manually change that by adding something to the <code>/etc/default/docker</code> file on each worker.  What do I add?</p>