Keeping two jenkins servers synchronized

I have

  • regular jenkins master jettysburg: 8888 / jenkins,
  • and jenkins master drive for overload: 8888 / jenkins.

I plan to use mercurial to synchronize the jobs directory of the two wizards.

Usually most of the time, new tasks and assemblies are defined and executed in jettysburg: 8888. Then I would need to synchronize the inkjet work: 8888 with what happened in jettysburg: 8888, and I plan to press once a day.

This means that after refusing from blasting: 8888 presses will be performed in the opposite direction.

I use mercurial for my files without programming / coding (for example, words, excel and text files) for this purpose as a means to perform an incremental and redundant backup of my "critical" files, as well as to version control them.

I also hope that it will depend on a mercurial departure from the changes made to jenkins work orders.

Uses mercury to sync two Jenkins masters? Is there a better way to keep two Jenkins servers in sync? In this case, I only synchronize the task tree.

+5
source share
2 answers

Until you need the joint state of the job between the servers (they run in their own small universes), and you keep the same modules and module libraries on both Jenkins servers, using some form version control to keep the actual definition work fine.

My office does this with git. We have a development and production set of jenkins servers. We support a basic Linux image with jenkins installed with all the necessary modules and install libraries locally (e.g. nodejs, etc.). Then we expand the copy of the image and shoot the tasks.

The only thing that could be the problem is to synchronize things like credentials and Jenkins configuration settings - you may need to save them as part of the base image.

If you need job queues for saving and sharing (for example, setting up a master master), you can see this plugin that allows several jenkins wizards to share the same job queue: https://wiki.jenkins-ci.org/ display / JENKINS / Gearman + Plugin

+4
source

There are two approaches to this:

  • Instead of getting closer to a hot backup solution, why not consider a cluster wizard so you get an active, active solution. You can look at https://wiki.jenkins-ci.org/display/JENKINS/Gearman+Plugin . This will help you group a bunch of masters, so one of them should not be a problem.

  • Consider running Jenkins on containers and supersede the jenkins project directory as external volumes in NFS so you can pick up another container when it goes down - saving both running containers will be a problem when writing at the same time (if any).

Hope this helps.

0
source

All Articles