How to test a machine that gets rebuilt as part of the test?

29 views
Skip to first unread message

Steve K

unread,
Jun 3, 2015, 10:25:10 AM6/3/15
to jenkins...@googlegroups.com
Hello,

In my case, the machines that are being tested are Windows. 
A rough skeleton of the test process is:
 *) Tell the slave machine that it is time to start the test.
 *) Tell the slave machine the location of the .ISO file(s) it will use to re-install its OS.
 *) Slave machine installs a brand new OS from the .ISO(s).
 *) By now, the slave has broken communication with the Jenkins master.
 *) Slave machine reboots as part of the OS rebuild.
 *) At this point, we want the master to be able to tell the slave what tests to run, but the slave knows nothing about Jenkins.

So, how do we get that slave to "talk" with the Jenkins master again?

Thanks in advance.

Steve K.

Eric Pyle

unread,
Jun 3, 2015, 11:01:10 AM6/3/15
to jenkins...@googlegroups.com
I assume that the new ISO image includes Jenkins slave installation, or can it be made to do so? If not, you would need to script the Jenkins master creating a new slave (presumably after deleting the old one). This is assuming a slave setup you can configure solely from the master, such as starting with an ssh command. You can queue up a job that does this once the "new" slave is defined, assigning it to run on the new slave, and it will wait there until the slave is connected and then run.

Eric
--
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/6861676a-142c-437b-ac48-0795d2793925%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve K

unread,
Jun 3, 2015, 11:42:15 AM6/3/15
to jenkins...@googlegroups.com

Thanks Eric. No, the ISO image would not include Jenkins slave installation.  Where could I look for pointers on scripting the removal/addition of a slave?

Eric Pyle

unread,
Jun 3, 2015, 11:59:58 AM6/3/15
to jenkins...@googlegroups.com
You can look at the Jenkins CLI - http://yourjenkins:port/cli. There are commands create-node and delete-node, as well as offline-node and online-node. It's possible you could reconnect to the re-created node without deleting and re-creating - I've never tried it. For an example of a script to create a new node, see https://gist.github.com/sergeyhush/4e892837cf5c31c3d242.

Also see https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

Regards,
Eric


On 6/3/2015 11:42 AM, Steve K wrote:

Thanks Eric. No, the ISO image would not include Jenkins slave installation.  Where could I look for pointers on scripting the removal/addition of a slave?
--
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.
Reply all
Reply to author
Forward
0 new messages