-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swarm mode service #1
Comments
Good catch. The exact command is : $sudo docker stack deploy -c docker-compose.yml myjmeter This is for Swarm Mode cluster. Refer to my blog which clearly explains that : http://collabnix.com/archives/2708 I will go ahead and update the Readme. |
I have updated the README.md. |
Nice, Then what I miss is, how do you get with docker ps the container id? I though it was not possible to do a docker exec in Swarm mode I understand this is the feature that we will need moby/moby#27552 |
The command 'docker ps' shows only the containers running on the local
machine.
You need to run 'docker service ps' to get the containers for specific
service and to know the node it is running on.
…On 06-May-2017 12:16 PM, "guillemsola" ***@***.***> wrote:
Nice,
Then what I miss is, how do you get with docker ps the container id? I
though it was not possible to do a docker exec in Swarm mode
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATIiNg3QHT5MhOT6_vxu6VkgCemUoBgks5r3BdOgaJpZM4NSjAT>
.
|
BTW..I assume you know how stack deploy works under Swarm Mode which is
different from how Docker Compose works for a single server.
If you are planning to use Swarm exec,
https://github.com/mavenugo/swarm-exec interest you.
…On 06-May-2017 1:56 PM, "Ajeet S Raina" ***@***.***> wrote:
The command 'docker ps' shows only the containers running on the local
machine.
You need to run 'docker service ps' to get the containers for specific
service and to know the node it is running on.
On 06-May-2017 12:16 PM, "guillemsola" ***@***.***> wrote:
> Nice,
>
> Then what I miss is, how do you get with docker ps the container id? I
> though it was not possible to do a docker exec in Swarm mode
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AATIiNg3QHT5MhOT6_vxu6VkgCemUoBgks5r3BdOgaJpZM4NSjAT>
> .
>
|
I was trying to use a Swarm service cluster from an azure template to perform a jmeter test with many clients. Your github project gives very good insights but I was struggling to connect with the master jmeter via docker exec as this is not possible with Swarm mode. I will try with the project you have referenced. As I still confuse a bit between classic swarm and swarm mode this is what I'm using
While docker ps shows nothing running on this
Thanks |
You have 3 master and 3 worker node. Now when you create service, you ensure that you scale them to more number of replicas or mark it mode=global so that you can access it on any one of the node. Under your case, you have more nodes but less replicas. |
I see your point! I created a swarm cluster too big for my needs 😸 So I put the master to be present on every node with Is this because the entrypoint for the master container is empty and it just exits?
|
Replicas: 3 just indicates that 3 copies of the task to be created. It
doesn't ensure that all the nodes need to have the container running.
Try scaling up the replicas using :
$docker service scale <servicename >=20
And see if it distributed across the cluster.
If you want all the node to have at least 1 copy of the container, then
you need to pass mode: global instead of replicas: 3 under
docker-compose.yml
…On 08-May-2017 9:29 PM, "guillemsola" ***@***.***> wrote:
I see your point!
I created a swarm cluster too big for my needs 😸
So I put the master to be present on every node with replicats: 3 And I
saw that it gets replicated. Also noticed that the desired state is Running
but the current is Pending. And maybe that is why there is no master
container available for exec.
Is this because the entrypoint for the master container is empty and it
just exits?
***@***.***:~/jmeter-docker/apache-jmeter-master$ docker service ps alataque
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
g07emfynhgve alataque_slave.fyv3wz1g785skf9anl59trg5t ajeetraina/apache-jmeter-server:latest swarmm-agentpublic-31109991000002 Running Running 8 minutes ago
kij7svbwidei alataque_slave.uz8c0c4zj7e4hxlw16d2u7qdp ajeetraina/apache-jmeter-server:latest swarmm-agentpublic-31109991000003 Running Running 8 minutes ago
4x4jk7npby3i alataque_slave.qms6uf6ut9g2frk414y1jiqv6 ajeetraina/apache-jmeter-server:latest swarmm-agentpublic-31109991000004 Running Running 8 minutes ago
rnaqlxbatvuo alataque_master.1 ajeetraina/apache-jmeter-master:latest Running Pending 8 minutes ago
d3hqyu1j52an alataque_master.2 ajeetraina/apache-jmeter-master:latest Running Pending 8 minutes ago
m7omr9j7xh2z alataque_master.3 ajeetraina/apache-jmeter-master:latest Running Pending 8 minutes ago
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATIiFKbVs5Gk-Rtuh2PgEsea7_amvkcks5r3zvQgaJpZM4NSjAT>
.
|
Still struggling with this 🤒 I have left a single swarm master for simplicity This way the master for sure keeps in the same machine I am. I boot up the compose but the master is in 0/1 which I understand means that has been created and finished
My guess is that the entrypoint for the master Dockerfile is empty so that the container starts and simply closes. This way it is not possible to do an I have tried to create the master with the jmeter parameters to that it starts to perform the test on start but I cannot find the slave IP's with
as suggested as docker ps -a -q returns nothing Maybe it is possible to refer the containers using the internal docker DNS system? thanks! |
I'm trying with this to found slave IP and pass it in the master image so that it has some entrypoint
Still not working but it sound like a plan to me 😃 What do you think? |
Awesome template!
Is it possible to make this running as a docker Swarm service? If I launch the compose as service I cannot do the docker exec as services seems to run in a different way.
It would be awesome to have this covered in the repo
The text was updated successfully, but these errors were encountered: