Create multiple docker slaves on one server

37 views
Skip to first unread message

Piotr Boniek

unread,
May 28, 2015, 6:13:28 AM5/28/15
to jenkin...@googlegroups.com
Hi,

I am trying to utilize our new server HP G9. There are many cores, disks spaces .... So far we had one master jenkins server and 15 workers on different servers.
It is working fine. Now we want to use one server G9 as multiple worker in other words we want to setup 20 or more workers on one physical server.
To make it more flexible we wanted to use docker to have possibilities to setup different workers type eg one on Ubuntu another on RHEL6 or RHEL7...

I've created different users (jenkins, jenkisn1....) separate directories etc ... and many many things.

I've tried to accomplished it with Docker Jenkins Plugin or just by running 'docker run .... ' from Execute Shell command. I faced so many issues that describing
them maybe is too much for now but maybe later I can post them if needed.

What I want to know is if my idea is workable/
feasible?

Regards
Piotr

Richard Bywater

unread,
May 28, 2015, 6:17:29 AM5/28/15
to jenkin...@googlegroups.com
Yes it is workable/feasible as I've just finished setting up a few docker containers to run as Jenkins slaves.

In the end I couldn't use the Docker Jenkins plugin as there's an issue with it not creating a new instance of a container if there is already a job running with the same label (which kind of defeats the point of using the Docker plugin IMHO)

So I created the Docker containers (based off of what has been done with https://registry.hub.docker.com/u/evarga/jenkins-slave/ ) and then started them and created nodes on Jenkins to point at them using the various SSH ports created as part of starting the Docker container.

Hope that helps you understand that its possible.

Richard.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/312c7f68-e97d-41a2-bbeb-cd36a7139cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Nord

unread,
May 28, 2015, 7:54:35 AM5/28/15
to jenkin...@googlegroups.com
In the end I couldn't use the Docker Jenkins plugin as there's an issue with it not creating a new instance of a container if there is already a job running with the same label (which kind of defeats the point of using the Docker plugin IMHO)

So that was certainly something I tested mid to back end of last year when I POCed using docker for slaves, and it worked ok (although there was a small delay before the new slave).  If thats the case maybe try rolling back the version - as it is by far the easiest way to go and you don't have to have the containers idling which makes load balancing much easier.

Kanstantsin Shautsou

unread,
May 28, 2015, 8:04:11 AM5/28/15
to jenkin...@googlegroups.com
If it about docker-plugin, then please upgrade to 0.9.0, restart jenkins. Then check logs and report issue https://github.com/jenkinsci/docker-plugin/issues here (but please read firstly https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue#Howtoreportanissue-WhatinformationtoprovideforEnvironmentandDescription )
0.9.0 very different from 0.8.0 and there are some known problems because of bad cloud/provisioning API in jenkins that we are trying bypass.

Also this maillist not about bug reporting.

Richard Bywater

unread,
May 28, 2015, 4:49:58 PM5/28/15
to jenkin...@googlegroups.com
Hmm ok thanks for the info. I had gone from a slightly older version (or something like that) to the latest version but maybe I need to try a version somewhere in between :)

Definitely agreed its the easiest way to go.

Richard.

Richard Bywater

unread,
May 28, 2015, 4:55:31 PM5/28/15
to jenkin...@googlegroups.com
I tried updating the version to the latest RC version a short while back as I had hoped it would "just work" but unfortunately it didn't appear to. Will retry with latest and greatest and see how I get on.

BTW I wasn't trying to report a bug on the mail list - was just providing my observation :)  (I had tried to find out if it supposed to be working in another thread https://groups.google.com/d/msg/jenkinsci-users/ZNUNG1asrLA/lLXNSTRkgr8J before I exerted too much effort in trying to provide reports but that thread must have been missed by people in the know :) )

Richard.

Reply all
Reply to author
Forward
0 new messages