HI Michael, 

I haven't actually tried putting it to production in any capacity. I think 
we have HA redis that I can use if this turns out to be a viable option. 

Its impossible to do anything 'production grade' with current Jenkins model 
of single point of failure.  This I think is the biggest downfall of 
Jenkins that's stopping it from turning into a serious CD tool.  


--Surya 


On Monday, October 31, 2016 at 12:49:55 PM UTC-5, Surya Gaddipati wrote:
>
> You need the following ingredients 
>
>  1. DbBacked builds ( https://github.com/groupon/DotCi ) , i.e no in 
> memory build data.  
>  2. NFS mount for 'jobs' folder to share console output, artifacts ect. 
>  3. Message Passing between various masters ( eg: build queuing, build 
> abort, queue abort ect ) . https://github.com/suryagaddipati/HaJenkins
>  4. No shared agents. You could use any cloud plugin , although I like 
> instant provisioning ones eg: 
> https://github.com/suryagaddipati/jenkins-docker-swarm-plugin
>
>
> Setup: 
>
>  1. Install and configure plugins mentioned above
>  2. Start multiple Jenkins instances with share mounted/symlinked  'jobs' 
> folder . 
>  3. Done. 
>
>
> Method: 
>
>  Build Create: When a build comes into the queue, it gets saved into 
> redis queue 
> <https://github.com/suryagaddipati/HaJenkins/blob/master/src/main/java/jenkins/ha/RedisQueue.java#L32-L35>
>  ( 
> I had to hack override Queue Implementation 
> <https://github.com/suryagaddipati/HaJenkins/blob/master/src/main/java/jenkins/ha/PluginImpl.java#L17-L21>
>  
> to achieve this).  Build gets picked up any of the masters that are 
> watching the queue. 
>  Build Abort:  Aborting a 'ha build' puts a message into redis queue , 
> which gets processed by all masters 
> <https://github.com/suryagaddipati/HaJenkins/blob/master/src/main/java/jenkins/ha/PluginImpl.java#L40-L43>and
>  
> the master running the actual build aborts it. 
>  Queued item Abort: Same mechanism as above ^. 
>  Build Execution: Build execution happens in a dynamically created agent. 
>  Build info is written to db via DotCi, and build logs are synced to all 
> masters via NFS. 
>  Build Delete: Build gets deleted in DotCi database. 
>
>
>
>
> I've done some testing and this setup seems to work fine and is totally 
> transparent to end user.  But I haven't done any extensive testing for edge 
> cases.
>
> I am curious to know what experts here think about this. What are the 
> things that could go wrong with a setup like this? 
>
>
> Surya
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/8b156eb6-f577-44f8-9348-0135a67f6b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to