Jenkins High Availability Program Summary

Preface
availability now a lot of companies are doing at the time with Jenkins continuous integration, the end of each business relies on Jenkins, Jenkins deploy service how security services become particularly important. Here are some of the recent scheme collected.
Gearman + Jenkins
This is openstack scheme used by the team, Jenkins is the monomer itself, that is only one Jenkins Master. Although you can deploy multiple Jenkins Master on multiple machines, but there is no contact between the Master, they are each turned over to slaver men to perform, there is no intersection. Perhaps slaver under a master busy, and slaver under another master is very busy, resources are not fully utilized. The program uses gearman, gearman is a task distribution frame.
You need to be installed on each Master gearman good plug-ins, and configured to be connected to gearman server, and must create the same job in each Master. After running the task flow is as follows:
. 1, gearman worker waits gearman server distribution task running in the respective Jenkins Master;
2, Gearman Client request to run the job gearman server;
. 3, gearman server notifies each gearman worker has the task of pulling, the first an idle worker will accept the task, if all the worker are busy gearman into the task queue, when the redistribution worker was idle;
4, after the retired and sit gearman worker will take the job from the task queue to execute, execute complete Thereafter, the results back to Server Gearman;
. 5, Gearman Server returns the result to gearman client.
In this way each salver resources can be fully utilized, a master hang another master can continue to serve.
For more information refer to the plug-gearman explained
Jenkins + + the Apache Mesos Marathon
the Apache Mesos is an open source resource management and scheduling platform. The architecture is probably a more Mesos Master hung below mesos slaver resources. Marathon is a mesos framework.
Marathon will be deployed in mesos Jenkins master resource pool. Jenkins will be registered as mesos the framework, at the time of jenkins building, will apply to the mesos resources, resource application is successful, then execute the build, the end of the mission will release resources.
If Marathon monitoring application to Jenkins hung up, you will immediately use Mesos resources restart Jenkins. So Jenkins may be deployed in various slaver machine mesos resources.
How to ensure that it is consistent data? Jenkins can use this plug-SCM Sync configuration plugin. After installing this plug-in, Jenkins is configured with a variety of changes, modifications will be submitted to the appropriate Git repository. Ensure that all configuration information is not lost when Jenkins restarted on another machine, configure download it from the git, thus ensuring consistent data.
Details can be found on how to build a continuous integration environment resilient high availability of
the transformation of file storage Jenkins
Jenkins current configuration files are stored directly on the hard disk as a file, you can see all kinds of JENKINS_HOME .xml file in a folder. Some companies on the secondary development Jenkins, Jenkins will change the way data is stored database storage, so you can play multiple Jenkins front-end services, back-end database can be the same even. There are also more mature database high availability solution.
The simplest mode of a main one Jenkins
usually let Jenkins A service machine, and using the SCM Sync configuration plugin to save the data, JenkinsA machine configuration and modified configuration update trigger Jenins B, once the problems A hang Jenkins, switch to the standby machine Jenkins on B.

Author: Hagi Chai
link: https://www.jianshu.com/p/223bedd1097d
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.

Guess you like

Origin blog.csdn.net/jsd2honey/article/details/93843335