Jenkins - Resource Pool Management

I am trying to set up a Jenkins system where a certain program needs to be run on a board on a network accessed via telnet. We are talking about hundreds of such works here, so we will create several boards. Therefore, each board should be assigned a board, but the catch is that only one task can have a certain board at a time, otherwise the program fails.

The solution that I have right now is to use the master-slave setting, where I connect to the same machine using SSH (so that the master and several slaves on the same computer). Then, each of the subordinate nodes has a label for the IP address to which the program should connect to telnet. This works, planning is reasonable, but it can cause problems, as all nodes connect to SSH on the same computer. Connecting to the board using SSH is not an option.

Is there a way to get the same features as above, but then without using SSH to connect to the same machine? So basically I want to say: we have n machines available when the task arrives to give him one of these machines and give her a label belonging to that machine (her IP address in this case); now there are n-1 cars left. Mutual exception is approaching, but does not allow the use of the above functions, and tasks waiting for the resource occupy one of the node executors.

Thanks a lot!

+6
source share
2 answers

I understand that your problem has probably been solved a few years ago, but in case someone is looking for an answer and is faced with this.

You can use the "Blocked Resources" plugin and set the IP address as the name of the resource and use this label test -board-ip.It is simple and convenient to use.

Another option is to use the "External Resource Manager" plugin. This gives a little more options, but it has a bug that causes it to hang sometimes. And it looks like there is no more maintenance (recent updates since 2013).

+4
source

Maybe you should take a look at the Lock and Latches plugin. You can block a resource using this plugin, only requiring a task to block the board you want.

https://wiki.jenkins-ci.org/display/JENKINS/Locks+and+Latches+plugin

0
source

Source: https://habr.com/ru/post/920903/


All Articles