[ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
But ansible module is not working properly on remote nodes On Wednesday, December 24, 2014 12:34:08 AM UTC+5:30, Matt Hughes wrote: The volumes need to be where docker is running. So yes, host directory should be on the remote node running docker. On Monday, December 22, 2014 11:03:56 AM UTC-5, Lokesh Dokara wrote: Hi all, Docker volumes worked fine for me as long as I use ansible to run docker on local system, but not working fine when I try to use ansible to run docker on a remote node. My question is whether docker expects the host directory in volumes option to be on system running ansible or the remote node. I've got no results when I had host directory in remote node. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5e673187-b864-4c3f-8a00-1c68b3335d6e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
Do you have the required Python module installed on the remote node? I believe it is docker-py but check the docket module to be sure. On Dec 26, 2014, at 6:13 AM, Lokesh Dokara lokeshwithue...@gmail.com wrote: But ansible module is not working properly on remote nodes On Wednesday, December 24, 2014 12:34:08 AM UTC+5:30, Matt Hughes wrote: The volumes need to be where docker is running. So yes, host directory should be on the remote node running docker. On Monday, December 22, 2014 11:03:56 AM UTC-5, Lokesh Dokara wrote: Hi all, Docker volumes worked fine for me as long as I use ansible to run docker on local system, but not working fine when I try to use ansible to run docker on a remote node. My question is whether docker expects the host directory in volumes option to be on system running ansible or the remote node. I've got no results when I had host directory in remote node. -- You received this message because you are subscribed to a topic in the Google Groups Ansible Project group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/tjBFAN1Qc7w/unsubscribe. To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5e673187-b864-4c3f-8a00-1c68b3335d6e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/D9CEADE1-2BFD-42CC-B24A-946C927117EF%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
Yeah latest version (0.7.0) of docker-py is installed. Except volumes option all other docker options are working fine. On Fri, Dec 26, 2014 at 11:04 PM, Matt Hughes hughes.m...@gmail.com wrote: Do you have the required Python module installed on the remote node? I believe it is docker-py but check the docket module to be sure. On Dec 26, 2014, at 6:13 AM, Lokesh Dokara lokeshwithue...@gmail.com wrote: But ansible module is not working properly on remote nodes On Wednesday, December 24, 2014 12:34:08 AM UTC+5:30, Matt Hughes wrote: The volumes need to be where docker is running. So yes, host directory should be on the remote node running docker. On Monday, December 22, 2014 11:03:56 AM UTC-5, Lokesh Dokara wrote: Hi all, Docker volumes worked fine for me as long as I use ansible to run docker on local system, but not working fine when I try to use ansible to run docker on a remote node. My question is whether docker expects the host directory in volumes option to be on system running ansible or the remote node. I've got no results when I had host directory in remote node. -- You received this message because you are subscribed to a topic in the Google Groups Ansible Project group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/tjBFAN1Qc7w/unsubscribe. To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5e673187-b864-4c3f-8a00-1c68b3335d6e%40googlegroups.com https://groups.google.com/d/msgid/ansible-project/5e673187-b864-4c3f-8a00-1c68b3335d6e%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to a topic in the Google Groups Ansible Project group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/tjBFAN1Qc7w/unsubscribe. To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/D9CEADE1-2BFD-42CC-B24A-946C927117EF%40gmail.com https://groups.google.com/d/msgid/ansible-project/D9CEADE1-2BFD-42CC-B24A-946C927117EF%40gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Lokesh Dokara, Department of Computer Science and Engineering, I.I.T. Kharagpur -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAH%3DUQjvdvC-2053qjph3RmfxQhwM%3DbV3836ffN4OLJxLRDsdTA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
The volumes need to be where docker is running. So yes, host directory should be on the remote node running docker. On Monday, December 22, 2014 11:03:56 AM UTC-5, Lokesh Dokara wrote: Hi all, Docker volumes worked fine for me as long as I use ansible to run docker on local system, but not working fine when I try to use ansible to run docker on a remote node. My question is whether docker expects the host directory in volumes option to be on system running ansible or the remote node. I've got no results when I had host directory in remote node. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c7029ca8-5266-4e73-a994-f1b90a029eb2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
Hi all, Docker volumes worked fine for me as long as I use ansible to run docker on local system, but not working fine when I try to use ansible to run docker on a remote node. My question is whether docker expects the host directory in volumes option to be on system running ansible or the remote node. I've got no results when I had host directory in remote node. -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/936ee87f-289a-48f3-8a05-90805691ed0e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: Ansible's docker module volumes option is a mystery (to me)
Any final prognosis on this issue? Specfically, how should the volumes be specified. An example would be nice! I'm urgently waiting to use this feature. --BK On Tuesday, August 26, 2014 3:05:49 PM UTC-4, Steven Truong wrote: Hi all, I tried to use the volumes option and nothing seems to work for me. I want to mount 2 directories ~/dockerstorage/model and ~/repo/ops/ansible to the container and I used either of these commands and nothing worked. docker: image=registry.my.com:5000/steven/centos65_prod_ready:v1 docker_url=tcp://{{ ansible_default_ipv4.address }}: publish_all_ports=True state=running volumes=/home/kafka/models:{{ myhome.stdout }}/dockerstorage/models:rw,/usr/local/src/ansible:{{ myhome.stdout }}/repo/ops/ansible:ro docker: image=registry.my.com:5000/steven/centos65_prod_ready:v1 docker_url=tcp://{{ ansible_default_ipv4.address }}: publish_all_ports=True state=running volumes={{ myhome.stdout }}/dockerstorage/models:/home/kafka/models:rw,{{ myhome.stdout }}/repo/ops/ansible:/usr/local/src/ansible:ro I sshed into the containers and the mounted points in either case were all empty. I ran using docker directly and it worked for me: docker run -d -P -v /home/steven/dockerstorage/models:/home/kafka/models:rw -v /home/steven/repo/ops/ansible:/usr/local/src/ansible:ro registry.my.com:5000/steven/centos65_prod_ready:v1 Please let me know what is the right ways to use volumes for docker. From the comments in the docker module, it appears to me that the /mnt:/tmp is in reversed orders from those of the docker command line because of the case when we just want to create a volume such as /mnt and there is no equivalent mounted point from the host. I think that this is confusing and users have to read the codes to find out. Thanks, Steven. [root@sc2-dock1 cloud]# pwd /usr/local/ansible/library/cloud class DockerManager: counters = {'created':0, 'started':0, 'stopped':0, 'killed':0, 'removed':0, 'restarted':0, 'pull':0} def __init__(self, module): self.module = module self.binds = None self.volumes = None if self.module.params.get('volumes'): self.binds = {} self.volumes = {} vols = self.module.params.get('volumes') for vol in vols: parts = vol.split(:) # host mount (e.g. /mnt:/tmp, bind mounts host's /tmp to /mnt in the container) if len(parts) == 2: self.volumes[parts[1]] = {} self.binds[parts[0]] = parts[1] # docker mount (e.g. /www, mounts a docker volume /www on the container at the same location) else: self.volumes[parts[0]] = {} -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/19d5af4f-b740-4962-8066-8346f3105247%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.