How to configure Jenkins for distributed load usin

2019-08-10 11:22发布

问题:

I use Jmeter to generate a huge load to my web-server. Some slave machines are acted as Jmeter-server, another one - as Jmeter master that coordinates the load and collects statistics from slaves. Now I'm trying to integrate this system to CI (Jenkins). That's how I do it now. I have two separate Jenkins jobs: one of them prepares all slaves by running jmeter-server, another one runs Jmeter-master itself. All is fine with 2nd part: I successfully generate traffic and collect statistics. The issue is with 1st job. I have a huge set of slaves that can be rebooted anytime. So, I can't run the job that initiates jmeter-server once and forget about it. I need to run this job every time before Jmeter-master. But in this case on some machines (that were not rebooted) I have multiple copies of java processes (jmeter-server copies). So, I'm looking for a mechanism to start jmeter-server on slave nodes in a proper way. Any ideas appreciated. Thank you in advance!

回答1:

Read this:

  • https://dzone.com/articles/distributed-performance

It combines:

  • JMeter

  • Maven Lazery JMeter plugin

  • Jenkins

All you have to do for jmeter-slaves is to start them from Jenkins using jmeter-server.sh , you might want to tweak port if you have 2 slaves on same host.

Then from controller you will reference those host machines (in this casse default port is used):

remote_hosts=test-server-1.nerdability.com,test-server-2.nerdability.com,test-server-3.nerdability.com