I have a cluster which is being used as a docker swarm - 1 manager, and 4 workers. The manager node is a pure manager node, set via
docker node update --availability drain <manager-id>
The manager has the /usr/lib/systemd/system/docker.service
set to start with
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 --containerd=/run/containerd/containerd.sock
Now I am trying to use this cluster/swarm as a Jenkins cloud provider, so that all jobs run in docker containers in this swarm. In Jenkins, under Configure Clouds
, I have create a cloud provider of type "docker", and provided the manager IP address as the docker host uri, eg. tcp://a.b.c.d:2375
. There is no error, but when I start a job, it creates a container on the manager itself.
How can I make it so that each container is deployed on a non-manager container?