Jenkins - CI with Virtual Machines
Asked Answered
M

1

6

At the moment, I have my framework code written in Java/Maven and I want to run this code using Selenium grid and Jenkins. I've configured Jenkins to pull the latest code from the SVN and have setup Jenkins to act as the hub.

What I'm wondering is how do I get Jenkins to manage the virtual machines? For instance, how do I get Jenkins to start up a virtual machine with Windows 7 or 10, with whatever browser I need to test on, and how do I get the virtual Machine to declare itself as a node?

Do I configure the virtual machines/nodes manually and just leave them active or is there a way I can automate this process with Jenkins?

Maupassant answered 2/11, 2016 at 14:12 Comment(0)
B
4

Jenkins has a number of virtual machine plugins, but they tend to align with each different virtual machine technology (or API). For example here's the OpenStack VM plugin.

Each of these plugins differ slightly in their capabilities and configurations, but they mostly all provide similar features. They should be able to spin up a VM before a Job, and spin it down afterwards.

I recommend you scan the Jenkins Plugins page to find the plugin that will work with whatever Virtual Machine technology you are using (or planning on using).

Note that Jenkins manages some aspects of the build (Java libraries, etc) but there's a lot of overlap in the management space (Maven, Jenkins, etc). Some people use a dedicated management tool to manage the VM configurations (like SaltStack, Puppet, or Chef). If this is what you grow into, keep in mind you'll have to include in your workflow for the Job a check to see if the management tool reports the VM is up-to-date, as odds are it will be down most of the time (and thus not updated).

Biotite answered 2/11, 2016 at 14:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.