I would like to setup the jenkins build farm in such a way that the fail over of all nodes are handled including the master. I am not able to find an answer for the question "what if master node goes down?".
I need a hot-hot setup where in if one node goes down the other should be able to pick up the queue and when both are up, they should process the jobs exclusively. Can we setup two nodes where each node is master and slave to each other? Does that create a serious conflict?
I am new to Jenkins distributed build setup and your help is much appreciated.
Thanks!
There is the CloudBees Jenkins Enterprise product http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/ha-sect-failover.html which is able to deal with a master failure. That is a commercial product but if High Availability is a requirement then it could be worth the price.
Related
What are the best practices for a jenkins installation like the one below?
I do have a quite small dedicated server with 16 gb of ram and 2tb of diskspace with enabled hardware virtualization, and one use of it would be to host my own projects (opensource), and there are applications set up such as git repository manager and stuff.
I would like to set up jenkins there for automatic building, but I want to make it secure.
This installation is small enough to require only a master node, but I am planning to disable building on master completely, and to run a virtual machine as an agent, for the reason that it would be isolated as much as possible on the same physical server, so that a job would be unable to destroy jenkins master data.
Should I go for master only anyway? or, if using a virtual machine agent, should I have only one executor there or multiple ones? I probably cannot isolate multiple parallel jobs running on one agent without using one agent per job, but maybe I am overthinking all this. Using one agent per job, at least in case of virtual machines, would exhaust server resources very quickly, or alternatively, money.
You can use Jenkins own database of users, which I have used in commercial settings and it has worked perfectly well. If you have Active Directory you can also integrate with this if you want to go to extra effort so people only have to remember one login.
Once users are logged in you should provide authorisation via the Role-Strategy plugin
trying to solve some problem with Mesos. I have three build servers for Jenkins. Jenkins schedules jobs on them through Mesos.
For now, Mesos loads one agent(slave) as hard as possible, but I want it to spread jobs across all agents..
As I see, it's better to run three jobs on three agents, than on one.
Is it possible to randomise job scheduling?
Or perhaps, I have such scenario. 2 large servers and one mini. I want to schedule Jobs on mini by default, and if it's not enough resources, then proceed to large servers. How can I achieve this goal? Is it possible to set priority for agents(slaves) to specify on which agent I want job to run at first?
The Mesos plugin for Jenkins attempts to build on the most recently built slave (see this method). This means that once it builds on that machine once, as long as that machine still has available spare resources - it'll schedule additional jobs on that machine until it is full. Right now it looks like that isn't optional (I have filed it as a feature request).
We use jenkins for automation for our test infrastructure. The requirement is to give users the ability to use a jenkins node for their private test or debug using private jenkins jobs and then put back in the pool of nodes marked with labels; so that other jobs that were marked to run on particular labels can be run without interference.
We can achieve this by letting users alter label, but that didnt workout as users (nearly 50) are making their own label names and it takes time for admin to reassign the nodes (even with process) and precious test time is getting affected.
we are looking for some solution such as ability to provide buttons like take this node offline (cant use this option since jenkins cannot see the node anymore and so users cannot run jenkins job on the node) but may be with the ability to run scripts.
I have done some research on this but have to compromise on some requirements, so i decided to seek help from the community... SUGGESTIONS?
Did you have a look to this question:
How to take Jenkins master node offline using CLI?
In the 1st question, there are some CLI to make a node offline.
Maybe you can create a dedicated job on the master with one parameter (the node name). This job will call the Jenkins CLI to stop your node.
When starting up Enterprise Neo4j in HA the 1st server is starting as the master.
I have a requirement where I want to control who the master is in the cluster, is that actually possible in Neo4j?
What would happen if I set all the slaves with 'ha.slave_coordinator_update_mode=none'. Will this permit me to have a single master, and if it goes down no other instance will become the master, and when that instance recovers will become the master again.
Or, if I didn't use that setting, the master goes down and a slave takes over, when the original master comes back up will it just act as a slave or will it become the master again?
Is there some configuration that will permit control of that, the documentation doesn't cover that very clearly.
Orlok,
You can use ha.slave_only to ensure an instance doesn't ever become master. See http://docs.neo4j.org/chunked/stable/ha-configuration.html
That effectively allows you to add as many read slaves as you wish, but beware that you lose high availability if you only have one instance that can become master. I.e. have a few instances master-ready, setup with ha.slave_only=false, as well as a bunch of read slaves.
Regards,
Lasse
Are there any standard algorithm to distribute the work among the slaves in the master/slave pattern? I have master which distributes job among the slaves via queue for now. But If I have to put job priority into the picture what kind of data structure/algorithm can be used?
Looking for some suggestion.
Thanks in advance,
Bibek Dawadi
You could use a Heap/Priority Queue.