Docker host and Jenkins on separate machines...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Docker host and Jenkins on separate machines...

Kirill Peskov
Hi All,

I'm googling already about an hour if not longer, but I really cannot
find an answer to quite simple question: "How to setup Jenkins to
connect to a Docker host (or multiple Docker hosts later on) running on
a separate machine(s)? Docs on the jenkins.io site seem to be not really
verbose about such a setup... By default Jenkins supposes to be able to
start docker containers on the same host as itself, but that's not my case.

Cheers,
Kirill

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3b9eca65-cd85-b3c9-7fdf-e53e388f4604%40paranoid.email.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker host and Jenkins on separate machines...

Matt Stave
Did you try in "configure system" after installing the Docker plugin setting the Docker URL to something like tcp://172.16.42.43:4243

On Friday, May 19, 2017 at 2:20:52 AM UTC-5, Kirill Peskov wrote:
Hi All,

I'm googling already about an hour if not longer, but I really cannot
find an answer to quite simple question: "How to setup Jenkins to
connect to a Docker host (or multiple Docker hosts later on) running on
a separate machine(s)? Docs on the <a href="http://jenkins.io" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins.io\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxN3TNcVz4ABxnDGK3ixwttT1E1A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins.io\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxN3TNcVz4ABxnDGK3ixwttT1E1A&#39;;return true;">jenkins.io site seem to be not really
verbose about such a setup... By default Jenkins supposes to be able to
start docker containers on the same host as itself, but that's not my case.

Cheers,
Kirill

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5b1dfec8-5356-4592-b3b0-595f04e1f34f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker host and Jenkins on separate machines...

Alex Domoradov
In reply to this post by Kirill Peskov
Not sure what do you mean by "By default Jenkins supposes to be able to  start docker containers on the same host as itself,".
Because we are using Jenkins with AWS ECS cluster without any problems. And our slave nodes are different EC2 instances from master node.

On Friday, May 19, 2017 at 10:20:52 AM UTC+3, Kirill Peskov wrote:
Hi All,

I'm googling already about an hour if not longer, but I really cannot
find an answer to quite simple question: "How to setup Jenkins to
connect to a Docker host (or multiple Docker hosts later on) running on
a separate machine(s)? Docs on the <a href="http://jenkins.io" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins.io\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxN3TNcVz4ABxnDGK3ixwttT1E1A&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjenkins.io\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxN3TNcVz4ABxnDGK3ixwttT1E1A&#39;;return true;">jenkins.io site seem to be not really
verbose about such a setup... By default Jenkins supposes to be able to
start docker containers on the same host as itself, but that's not my case.

Cheers,
Kirill

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/53cd4406-dbaf-48df-80c4-2da6727901eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docker host and Jenkins on separate machines...

Kirill Peskov
On 19/05/17 17:52, Alex Domoradov wrote:
> Not sure what do you mean by "By default Jenkins supposes to be able
> to  start docker containers on the same host as itself,".
> Because we are using Jenkins with AWS ECS cluster without any
> problems. And our slave nodes are different EC2 instances from master
> node.
I found the solution ;) To receive smart answers one need to ask smart
questions... My approach was not correct so I asked wrong question. I
actually meant docker setup for Pipelines... To prevent any job running
on the master itself, one need to put 0 to the filed 'Number of
executors' in the master node config. And, if the Docker Pipeline plugin
is installed, the agent on the node simply calls local docker and does
not need any additional configuration but to put jenkins user into the
docker group and correct permission to allow jenkins access to docker's
socket.

Thanks anyway!
Cheers,
Kirill

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/52d1fc94-2013-e748-249a-2039a52738f0%40paranoid.email.
For more options, visit https://groups.google.com/d/optout.
Loading...