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.

  • 1
    Do you use Hudson/Jenkins? Surely it has a way to do this. – user246 May 20 '11 at 2:05
  • Btwn does anyone use any python or batch script to do this. – Rakesh Prabhakaran May 20 '11 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"? – TristaanOgre May 20 '11 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. – Rakesh Prabhakaran May 22 '11 at 3:11
  • user246 can u please explain me how you do with Hudson – Rakesh Prabhakaran May 22 '11 at 3:12
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, privacy policy and cookie policy

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