Was able to get this working. Mounted the docker socket using the mount 
point configs in the jenkins plugin. However, I was getting a permission 
denied when trying to nc or curl the socket for info. I had to run the 
slaves as user root rather than user jenkins. Has either of you come across 
this issue? 

On Monday, February 1, 2016 at 10:48:15 AM UTC-8, Mulloy Morrow wrote:
>
>
> Has anyone successfully been able to mount the Docker UNIX socket on the 
> slave containers? I've attempted to mount this socket using the Jenkins ECS 
> plugin (v1.2) by configuring "container mount points".  (see jenkins config 
> screenshot below)
>
>
> <https://lh3.googleusercontent.com/-OMv5j1De_So/Vq-oNwqovqI/AAAAAAACzGo/hppFEgNB3bs/s1600/Screen%2BShot%2B2016-02-01%2Bat%2B10.42.52%2BAM.png>
>
> On Monday, January 25, 2016 at 7:52:30 AM UTC-8, nicolas de loof wrote:
>>
>> Latest development build for ECS plugin do let you define bind mounts, 
>> see https://jenkins.ci.cloudbees.com/job/plugins/job/amazon-ecs-plugin/
>>
>> 2016-01-25 16:33 GMT+01:00 Brandon Wagner <bmwag...@gmail.com>:
>>
>>> If I'm understanding correctly, I would mount the docker.sock to the 
>>> slave container? I created an image extended from the jenkinsci/jnlp-slave 
>>> that does a wget for the docker CLI. 
>>>
>>> However, I don't see a place to mount the docker.sock through the ECS 
>>> configuration options. 
>>>
>>>
>>> -Brandon Wagner
>>>
>>> On Sat, Jan 23, 2016 at 1:08 PM, nicolas de loof <nicolas...@gmail.com> 
>>> wrote:
>>>
>>>> You could use docker-custom-build-environment-plugin for this exact 
>>>> scenario, with bind mounted /var/run/docker.sock so you can run containers 
>>>> side by side (vs "in-docker"). Would need some tests on my side to ensure 
>>>> this scenario is supported, I have this on my TOD for a while but never 
>>>> took time to setup a test environment for it...
>>>>
>>>> 2016-01-22 21:01 GMT+01:00 Brandon Wagner <bmwag...@gmail.com>:
>>>>
>>>>> I would like to run Docker containers for all of my software projects 
>>>>> and dynamically allocate build slaves via ECS (so that I can have a core 
>>>>> cluster that can do builds quickly; in contrast to spinning up an EC2 
>>>>> instance).
>>>>>
>>>>>  For example, I have a Java application which is completely contained 
>>>>> in a Docker container (I can build it, run tests, and run the actual 
>>>>> application with Tomcat all within the container). I want to use this for 
>>>>> a 
>>>>> variety of different purposes (dev, testing, qa, and production). In 
>>>>> order 
>>>>> to make it reusable like that, I don't want to include Jenkins Slave 
>>>>> packages and expose ports. I'd rather deploy out a Jenkins-Slave 
>>>>> container 
>>>>> to my ECS cluster, and then have that slave handle running my 
>>>>> application's 
>>>>> docker container which also performs tests. 
>>>>>
>>>>> I also support other team applications which are already running 
>>>>> docker container builds in Jenkins (locally on the Jenkins Master). I 
>>>>> want 
>>>>> it to be transparent to them that I'm "outsourcing" build slaves to ECS. 
>>>>> It 
>>>>> shouldn't matter to them that I'm changing the way Jenkins is performing 
>>>>> builds.
>>>>>
>>>>> Let me know if you (or anyone else) have suggestions based on my goals.
>>>>>
>>>>> -Brandon Wagner
>>>>>
>>>>>
>>>>> On Fri, Jan 22, 2016 at 2:48 PM, nicolas de loof <nicolas...@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> privileged flag has been added to development build (
>>>>>> https://jenkins.ci.cloudbees.com/job/plugins/job/amazon-ecs-plugin/)
>>>>>> anyway, DinD is probably not a good idea (there's really few docker 
>>>>>> usages to actually require it). What's your actual need ?
>>>>>>
>>>>>> 2016-01-22 20:46 GMT+01:00 Brandon Wagner <bmwag...@gmail.com>:
>>>>>>
>>>>>>> So I ended up figuring my issue out. I think there were a couple of 
>>>>>>> issues. My JNLP port was set to 50,000 instead of 5,000 which the 
>>>>>>> Jenkins 
>>>>>>> Docker Container I was using was mapping to the host port 5000. And my 
>>>>>>> Load 
>>>>>>> Balancer in front of Jenkins was not forwarding port 5000 to the host 
>>>>>>> (only 
>>>>>>> 443). Anyways, all of that is fixed and I can now run builds on slaves 
>>>>>>> in 
>>>>>>> ECS.
>>>>>>>
>>>>>>> My next problem: I want to use docker-in-docker to run docker builds 
>>>>>>> on my docker jenkins slaves. I'm trying to use 
>>>>>>> https://github.com/tehranian/dind-jenkins-slave which looks good, 
>>>>>>> but I don't see an option on the Jenkins ECS plugin to run the slave as 
>>>>>>> privileged which is necessary for docker-in-docker.
>>>>>>>
>>>>>>>
>>>>>>> -Brandon Wagner
>>>>>>>
>>>>>>> On Fri, Jan 22, 2016 at 7:11 AM, nicolas de loof <
>>>>>>> nicolas...@gmail.com> wrote:
>>>>>>>
>>>>>>>> First look into jenkins logs.
>>>>>>>> Also check on ECS a task definition has been created for 
>>>>>>>> jenkins-slaves. 
>>>>>>>> Also double check ECS nodes can ping your jenkins master URL.
>>>>>>>>
>>>>>>>> 2016-01-21 22:13 GMT+01:00 Brandon Wagner <bmwag...@gmail.com>:
>>>>>>>>
>>>>>>>>> I'm trying to use the Jenkins AWS EC2 Container Service (ECS) 
>>>>>>>>> plugin to deploy Jenkins Slave Containers for builds. I have an ECS 
>>>>>>>>> cluster 
>>>>>>>>> setup, and I have it configured in my Jenkins Configuration. 
>>>>>>>>> Everything 
>>>>>>>>> appears to be good until I try to build a job, restricting to the ecs 
>>>>>>>>> cloud 
>>>>>>>>> label I setup, and it just comes back with "(pending—
>>>>>>>>> Jenkins-Container-Cloud-456...164 
>>>>>>>>> <https://jenkins.itsec.aolcloud.net/computer/Jenkins-Container-Cloud-456b6d1601164>is
>>>>>>>>>  
>>>>>>>>> offline)" .  
>>>>>>>>>
>>>>>>>>> Does anyone know how to fix this, or have suggestions on debugging 
>>>>>>>>> steps? 
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>>> Groups "Jenkins Users" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>> send an email to jenkinsci-use...@googlegroups.com.
>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/f9bf24d9-a9e3-46f6-8fba-041b3344bdc7%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/f9bf24d9-a9e3-46f6-8fba-041b3344bdc7%40googlegroups.com?utm_medium=email&utm_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 "Jenkins Users" group.
>>>>>>>> To unsubscribe from this topic, visit 
>>>>>>>> https://groups.google.com/d/topic/jenkinsci-users/kSBWy3gBQbg/unsubscribe
>>>>>>>> .
>>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>>> jenkinsci-use...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzks3yceTvUxrFd5cGo8tYwSFh%3D00V%3DzL%2BxJVB2kCmi%3DhQ%40mail.gmail.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzks3yceTvUxrFd5cGo8tYwSFh%3D00V%3DzL%2BxJVB2kCmi%3DhQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Jenkins Users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to jenkinsci-use...@googlegroups.com.
>>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg-%2Bs99MCNpwJz99QBs0NTke7EV2Tt%3DWPEj5NZBzjkJaHg%40mail.gmail.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg-%2Bs99MCNpwJz99QBs0NTke7EV2Tt%3DWPEj5NZBzjkJaHg%40mail.gmail.com?utm_medium=email&utm_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 "Jenkins Users" group.
>>>>>> To unsubscribe from this topic, visit 
>>>>>> https://groups.google.com/d/topic/jenkinsci-users/kSBWy3gBQbg/unsubscribe
>>>>>> .
>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>> jenkinsci-use...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmdKoB9PZfYNcA6tGMyC2pT5Mg13LP9UMMW%2Bt3FAC1qTA%40mail.gmail.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmdKoB9PZfYNcA6tGMyC2pT5Mg13LP9UMMW%2Bt3FAC1qTA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to jenkinsci-use...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg_jXunkKPoQHertFKDtu9Sikmm4X8vLvD2oOAm2n-OF7A%40mail.gmail.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg_jXunkKPoQHertFKDtu9Sikmm4X8vLvD2oOAm2n-OF7A%40mail.gmail.com?utm_medium=email&utm_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 "Jenkins Users" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/jenkinsci-users/kSBWy3gBQbg/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJz%3DQhj1%2Bs2bKikkhbrn-8ws6ducuRr4c2o80i3X8XA_neQ%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CANMVJz%3DQhj1%2Bs2bKikkhbrn-8ws6ducuRr4c2o80i3X8XA_neQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg9RGOr3yEuAN8CutBT9x3RcAGUya4fomKhE%2BsyHK77_cg%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAKgdMg9RGOr3yEuAN8CutBT9x3RcAGUya4fomKhE%2BsyHK77_cg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b99c9efe-c1a8-49fb-a60f-029b551f0051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to