6

I am working in a test environment where we need more than 10 machines, including VMs. The AUT is a Distributed Network type and uses Cassandra nosql DB. We are required to restart each of the Cassandra DBs running on each machine multiple times everyday. We are using Hudson for our build processing.

How would I create a python or batch script that can be used within Hudson to automatically perform these tasks?

Note: we have both Windows and Debian machines in network, so have to do both ssh and rdesktop.

5
  • 1
    Do you use Hudson/Jenkins? Surely it has a way to do this.
    – user246
    Commented May 20, 2011 at 2:05
  • Btwn does anyone use any python or batch script to do this. Commented May 20, 2011 at 2:50
  • 2
    I wonder if this question should be reworded. First of all, the very question in the body asks for the opinion and best method to access the machines. That's subjective content. Secondly, it seems that Rakesh is not looking for "best" but for a specific python or batch script. The question might do best reworded as "How can I write a python or batch script to automatically reboot testing machines through Hudson"? Commented May 20, 2011 at 17:16
  • Tristaan I am interested in the best practice to do this, I would like to know all possibilities so that I can go forward with what is apt for my environment. Commented May 22, 2011 at 3:11
  • user246 can u please explain me how you do with Hudson Commented May 22, 2011 at 3:12

1 Answer 1

4

I think what you are looking for is the SSH plugin for Hudson:

http://wiki.hudson-ci.org/display/HUDSON/SSH+plugin

It let you run a shellscript before and/or after your build.

That's the best fit, in my opinion. But you can execute a shellscript on the Hudson server using the Post Build task plugin:

http://wiki.hudson-ci.org/display/HUDSON/Post+build+task

which could do the job if you need more conditions, but will probably be more complicated to get up and running: you will have to write a script able to restart another server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.