How to run same container on all Docker Swarm nodes -
i'm getting feet wet docker swarm because we're looking @ ways configure our compute cluster make more containerized. have small farm of 16 computers , i'd able have each node pull down same image, run same container, , accept jobs openmpi program running on master node.
nothing openmpi specific this, containers have able open ssh ports , master must able log them. i've got working single docker container , works.
now i'm learning docker machine , docker swarm way manage 16 nodes. can tell, once set swarm, can set docker_host (or use -h) send "docker run", , swarm manager decide node runs requested container. got working using simple node list instead of messing discovery services, , far good.
but want run same container on nodes in 1 command. possible?
docker 1.12 introduced global services , passing --mode global
run command docker schedule service nodes.
using docker swarm can use labels , negative affinity filters gain same result:
openmpi: environment: - "affinity:container!=*openmpi*" labels: - "com.myself.name=openmpi"
Comments
Post a Comment