Docker Community Forums

Share and learn in the Docker community.

Docker swarm tutorial Step 4 Makes no sense


(Mike Graf) #1

So I’m following along in this tutorial: https://docs.docker.com/swarm/install-manual/

And I get to step 4 and it makes no sense:

  1. It says to copy a command into a file, but then never references the file
  2. Tells you to connect to manager0 and consul0 w/ ifconfig as the command
  3. // ok no brainer
  4. References “etc0” instance which is never mentioned elsewhere in the article
  5. says to paste the same command as 1.

Any one understand wth they’re trying to convey?


(Jeff Anderson) #2

This is definitely worded a bit awkwardly. Let me take a stab at some corrections:

  1. Use SSH to connect to the manager0 and consul0 instance, and run the following on each:

    $ ifconfig

  2. From the output, copy the eth0 IP address from inet addr. These will be used in Step 5.

  3. On the consul0 instance, run the following command to bring up a consul service:

    $ docker run -d -p 8500:8500 --name=consul progrium/consul -serv


If this makes more sense, I can do a PR to help clean up this tutorial. It looks like it could use another pass or two as well to iron it out a bit more.

Here is where the source of that tutorial lives: https://github.com/docker/swarm/blob/master/docs/install-manual.md

I think the etc0 might be a reference left over from when the guide may have been using etcd as a backend instead of consul. The instruction to copy that command out to a file does seem like unnecessary extra work.

Cheers!

/Jeff


(Jamshid) #3

Ha the forum’s search feature automatically found this thread as I started a post about being totally confused by the Swarm install guide.

Yes please, make those corrections. And maybe all the commands should use --restart always.
Step 5 item 1 example is missing “:8500” at the end.
Step 6 says SSL is being used, but I don’t think that’s true, port “:4000” is plain http and certs haven’t been configured. Maybe docker-machine can do that?
These docs refer to port 2375 which is not SSL or even active in recent docker. I guess for the instructions to work you have to run this on each node.
docker run -d --restart always -p 2375:2375 --volume=/var/run/docker.sock:/var/run/docker.sock --name=docker-http sequenceiq/socat