Jenkins: How to run test on multiple hosts in parallel?

92 views
Skip to first unread message

Vijay Hiremath

unread,
Aug 3, 2018, 8:19:24 AM8/3/18
to Jenkins Users
Hi All,
How to run test on multiple hosts in parallel? Below is the requirement.
  1. I have a Jenkins job A.
  2. 5 hosts are connected to A.
  3. Test X need to be run on all 5 hosts. Also need to see the status of test on an independent console.
  4. Result form the hosts need to be independently published
  5. Currently test X is run on only one host and rest 4 hosts tests are in Queue.
I used "Execute concurrent builds if necessary" but, it just divides same test on 5 hosts so it does not do what I intended. What is the workaround here?
Regards
Vijay

suja...@gmail.com

unread,
Aug 7, 2018, 1:25:53 AM8/7/18
to Jenkins Users
If your nodes are on linux, try installing pssh on the server

1. Install pssh
 yum install python-pip
 pip install pssh

2. create a host file 'pssh-host' with the number of hosts along with IP address and port number
     that you need to connect to remote systems using pssh.

3. Execute command using pssh from Jenkins Build > Execute shell:
    e.g pssh -h pssh-hosts -l root -A echo "Test"

Vijay Hiremath

unread,
Aug 7, 2018, 3:03:13 AM8/7/18
to jenkins...@googlegroups.com
Thank you for the response.

Unfortunately build is parameterized and each slave connected to Jenkins host have different parameters.
Hence, cannot use pssh

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d82a438f-68d4-4f8e-a30c-baf6cd103673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Spriggs, Jim

unread,
Aug 10, 2018, 8:39:12 AM8/10/18
to jenkins...@googlegroups.com

Hi,

 

Are your test hosts actual Slave Nodes in the Jenkins sense?

If they are, you might want to consider using a Multi-Configuration (“Matrix”) Job.

Then you could use the Node Names/Labels of your 5 hosts as an axis in the Configuration Matrix.

The configurations will be run in parallel by default, and the status consoles and results will all be independently available.

 

Works for me.

 

Good Luck!

--

jim

 

 

Von: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] Im Auftrag von Vijay Hiremath
Gesendet: Dienstag, 7. August 2018 08:43
An: jenkins...@googlegroups.com
Betreff: Re: Jenkins: How to run test on multiple hosts in parallel?

 

Thank you for the response.

 

Unfortunately build is parameterized and each slave connected to Jenkins host have different parameters.

Hence, cannot use pssh

On Mon, Aug 6, 2018 at 10:20 PM, <suja...@gmail.com> wrote:

If your nodes are on linux, try installing pssh on the server

 

1. Install pssh
 yum install python-pip
 pip install pssh

2. create a host file 'pssh-host' with the number of hosts along with IP address and port number
     that you need to connect to remote systems using pssh.

3. Execute command using pssh from Jenkins Build > Execute shell:
    e.g pssh -h pssh-hosts -l root -A echo "Test"

 

On Friday, August 3, 2018 at 5:49:24 PM UTC+5:30, Vijay Hiremath wrote:

Hi All,

How to run test on multiple hosts in parallel? Below is the requirement.

1.      I have a Jenkins job A.

2.      5 hosts are connected to A.

3.      Test X need to be run on all 5 hosts. Also need to see the status of test on an independent console.

4.      Result form the hosts need to be independently published

5.      Currently test X is run on only one host and rest 4 hosts tests are in Queue.

I used "Execute concurrent builds if necessary" but, it just divides same test on 5 hosts so it does not do what I intended. What is the workaround here?

Regards

Vijay

--

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAL6S71G1kDF4YYCFz9LRndL1VfCr%2BJtYRZtg-j%3DS%3D%3D0s0NoxRA%40mail.gmail.com.


For more options, visit https://groups.google.com/d/optout.




RAYLASE GmbH
Argelsrieder Feld 2+4
82234 Wessling
Germany
Tel.: +49-(0)8153/88 98-0
Fax: +49-(0)8153/88 98-10
http://www.raylase.de

District Court Munich, HRB 234738

Management: Dr. Philipp Schön (CEO), Berthold Dambacher (CTO)


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

amir....@verizon.com

unread,
Aug 10, 2018, 12:30:50 PM8/10/18
to Jenkins Users
Are you using ad-hoc or script?

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

Vijay Hiremath

unread,
Aug 14, 2018, 10:31:57 AM8/14/18
to jenkins...@googlegroups.com
Hi Jim,

Test hosts are not slave nodes, they are dummy Linux machines.

Regards
Vijay

--

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.




RAYLASE GmbH
Argelsrieder Feld 2+4
82234 Wessling
Germany
Tel.: +49-(0)8153/88 98-0
Fax: +49-(0)8153/88 98-10
http://www.raylase.de

District Court Munich, HRB 234738

Management: Dr. Philipp Schön (CEO), Berthold Dambacher (CTO)


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/25599d86938447c7b0117fbabc212fb2%40raylase.de.
Reply all
Reply to author
Forward
0 new messages