Hi all,
I have been trying to run powerstrip with a swarm setup. I have one master and one node only. What I want to achieve is:
docker client
|
powerstrip
|
swarm deamon
/ \
node1 node2
| |
docker docker
Though I just have the node 1. So, I created the cluster and then ran
$ sudo docker run -d --name powerstrip-slowreq \
--expose 80 \
clusterhq/powerstrip-slowreq:v0.0.1
$ sudo docker run -d --name powerstrip \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/powerstrip-demo/adapters.yml:/etc/powerstrip/adapters.yml \
--link powerstrip-slowreq:slowreq \
-p 2375:2375 \
clusterhq/powerstrip:v0.0.1
on swarm manager only. I am running the same powerstrip-slowreq examplt given in the docs. Here are my containers:
vagrant@vagrant-ubuntu-vivid-64:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f1a74df8f0da clusterhq/powerstrip:v0.0.1 "twistd -noy powerst 43 minutes ago Up 43 minutes 0.0.0.0:2375->2375/tcp powerstrip
01493e977cb1 clusterhq/powerstrip-slowreq:v0.0.1 "python slowreq.py" About an hour ago Up About an hour 80/tcp powerstrip-slowreq
a09109652193 swarm "/swarm manage token About an hour ago Up About an hour 0.0.0.0:9000->2375/tcp desperate_rosalind
It works fine if I am running the docker that is on swarm master node i.e. not the cluster one. In that case I can see the delay of a minute. My question is how do I propagate that to the cluster? According to the example in the docs, I am supposed to use this:
$ time DOCKER_HOST=localhost:2375 docker -H tcp://0.0.0.0:9000 run ubuntu echo hello
But this is not working for obvious reasons as there are two Docker host addresses. Is there any other way to approach this problem? TIA
Hi all,
I have been trying to run powerstrip with a swarm setup. I have one master and one node only. What I want to achieve is:
Though I just have the node 1. So, I created the cluster and then ran
on swarm manager only. I am running the same powerstrip-slowreq examplt given in the docs. Here are my containers:
It works fine if I am running the docker that is on swarm master node i.e. not the cluster one. In that case I can see the delay of a minute. My question is how do I propagate that to the cluster? According to the example in the docs, I am supposed to use this:
But this is not working for obvious reasons as there are two Docker host addresses. Is there any other way to approach this problem? TIA