Docker Swarm Elastic Agents setup

17 views
Skip to first unread message

Yuri Lukyanov

unread,
Mar 4, 2020, 1:02:22 PM3/4/20
to go-cd
Hello,

I'm kind of new to Docker, but not new to GoCD. I'm trying to setup elastic agents with docker-swarm-elastic-agent-plugin.

I want two nodes. One is for gocd server, one (or actually more) with docker swarm installed.

When setting up a cluster profile, there is a field called "Docker URI". The documentation says the following:

```
Docker swarm cluster uri.
If your Go Server is running on local machine then use(for mac and linux) — unix:///var/run/docker.sock
```

What exactly is the "Docker swarm cluster uri"?

When I initialize swarm, it says something like:
```
To add a worker to this swarm, run the following command:

    docker swarm join \
    --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx \
    172.17.0.2:2377
```

Should I use tcp://172.17.0.2:2377 as the Docker URI? I tried. The server logs say "tcp protocol is not supported".

Maybe I'm completely missing the point though. I couldn't find any related information.

Could you help?

Aravind SV

unread,
Mar 9, 2020, 4:04:04 AM3/9/20
to go...@googlegroups.com
Hello Yuri,

Can you see whether http://172.17.0.2:2377 or https://172.17.0.2:2377 works? This message seems to be coming from somewhere within the library used to talk to docker and not from the plugin. Maybe here:

https://github.com/spotify/docker-client/blob/14c955c0524233639fe76a35edda3d620037a525/src/main/java/com/spotify/docker/client/DockerHost.java#L83

If that doesn't work, you will probably need to debug into the plugin.

Cheers,
Aravind
Reply all
Reply to author
Forward
0 new messages