views:

28

answers:

2

I want to have a Hudson setup that has two cluster nodes with JBoss. There is already a test machine with Hudson and it is running the nightly build and tests. At the moment the application is deployed on the Hudson box.

There are couple options in my mind. One could be to use SCPplugin for Hudson to copy the ear file over from master to the cluster nodes. The other option could be to setup Hudson slaves on cluster nodes.

Any opinions, experiences or other approaches?

edit: I set up a slave but it seems that I can't make a job to take place on more than one slave without copying the job. Am I missing something?

+1  A: 

If you want load balancing and central administration from Hudson (i.e. configuring projects, seeing what builds run ATM, etc.), you must run slaves.

Aaron Digulla
+1  A: 

You are right. You can't run different build steps of one job on different nodes. However, a job can be configured to run on different slaves, Hudson than determines at execution time what node that job will run on.

You need to configure labels for you nodes. A node can have more than one label. Every job can also require more than one label.

Example:

Node 1 has label maven and db2
Node 2 has label maven and ant

Job 1 requires label maven
   can run on Node 1 and Node 2
Job 2 requires label ant
   can run on Node 2
Job 2 requires label maven and db2 
   can run on Node 1

If you need different build steps of one job to run on different nodes you have to create more than one job and chain them. You only trigger the first job who triggers the subsequent jobs. One of the following jobs can access the artifacts of the previous job. You can even run two jobs in parallel and when both are done automatically trigger the next job. You will need the Join Plugin for the parallel jobs.

Peter Schuetze