RETIRED, The jenkins gearman plugin
Go to file
zaro 8ee129e6be make thread safe
This checkin attempts to make gearman plugin objects thread safe.

src/main/java/hudson/plugins/gearman/SaveableListenerImpl.java
   Decided that this was not needed.

src/main/java/hudson/plugins/gearman/GearmanPluginConfig.java
   Added method to allow other objects to access gearman server
   launchWorker, host, and port settings

src/main/java/hudson/plugins/gearman/GearmanPluginUtil.java
   Useful utilities for this plugin

src/main/java/hudson/plugins/gearman/AbstractWorkerThread.java
src/main/java/hudson/plugins/gearman/ComputerListenerImpl.java
src/main/java/hudson/plugins/gearman/ProjectListener.java
src/main/java/hudson/plugins/gearman/GearmanProxy.java
   Made object private and added syncronized setters and getters

Change-Id: I04ca6a275ba8184bd18cf8954d07b94d02b2a47d
2013-03-05 09:51:10 -08:00
.settings update eclipse setting 2013-01-29 12:05:01 -08:00
src/main make thread safe 2013-03-05 09:51:10 -08:00
.classpath fix plugin extension point, enhanced jelly script, added test connection button 2013-03-01 10:40:56 -08:00
.gitignore Fix to register all projects and register an additional gearman function for each project. 2013-02-22 10:29:00 -08:00
.gitreview Added .gitreview 2013-01-10 23:49:17 +00:00
.project abort running jenkins builds 2013-02-21 10:17:54 -08:00
.pydevproject abort running jenkins builds 2013-02-21 10:17:54 -08:00
LICENSE add pom.xml and gearman-plugin source file. 2013-01-29 10:09:47 -08:00
README.txt abort running jenkins builds 2013-02-21 10:17:54 -08:00
bsd.txt setup gearman workers 2013-02-06 10:21:20 -08:00
debug Gearman configuration UI is setup in the jenkins config page 2013-01-29 12:05:01 -08:00
install-fast setup skeleton GearmanPlugin. 2013-01-29 12:04:42 -08:00
pom.xml fix plugin extension point, enhanced jelly script, added test connection button 2013-03-01 10:40:56 -08:00
run-fast setup skeleton GearmanPlugin. 2013-01-29 12:04:42 -08:00

README.txt

---------------------------------------------------------------------
Copyright 2013 Hewlett-Packard Development Company, L.P.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
---------------------------------------------------------------------

Jenkins does not support multiple masters.  You can setup multiple Jenkins
masters but there is no coordination between them.

One problem with scheduling builds on Jenkins master (“MasterA”) server
is that MasterA only knows about its connected slaves.  If all slaves on
MasterA are busy then MasterA will just put the next scheduled build on
its queue.  Now MasterA needs to wait for an available slave to run
the build.  This will be very in-efficient if your builds take a long
time to run.  So..what if there is another Jenkins master (“MasterB”)
that has free slaves to service the next scheduled build? Your probably
saying “Then slaves on MasterB should run the build”.  However MasterB
will never service the builds on MasterA's queue.  The client that schedules
the builds must know about MasterB and then schedule builds on MasterB.
This is what we mean by lack of coordination between masters.
The gearman-plugin attempts to fill this gap.

This plugin integrates Gearman with Jenkins and will make it so that
any Jenkins slave on any Jenkins master can service a job in the queue.
It will essentially replace the Jenkins build queue with the Gearman
job queue.  The job should stay in the gearman queue until there is a
Jenkins node that can run that job.


This is the typical workflow:

1) On a 'Launch Workers', we spawn a Gearman worker for each Jenkins
executor.  We'll call these "executor worker threads".

Each executor worker thread is associated 1:1 with a Jenkins node (slave or master)

2) Now we register jobs for each Gearman executor depending on
projects and nodes. View the image to see the mapping.

3) On a 'Launch Workers', we spawn one more thread to be a Gearman
worker to handle job management for this Jenkins master.  We'll call
it the "management worker thread" and register the following function:

  stop:$hostname

4) Any Gearman client can connect to the Gearman server and send a
request to build a Jenkins project or cancel a project.  View the
examples to see how this can be done.

5) The Gearman workers will service any client request that come
through to start/cancel a Jenkins build.