Skytap Announces Continuous Integration Plugin for Jenkins
Skytap is pleased to announce availability of the Skytap Cloud CI Plugin for Jenkins. This plugin adds functionality into the Jenkins web UI to create and manipulate templates and configurations in Skytap Cloud. While the plugin's functionality is primarily geared toward enabling Continuous Integration (CI) activities, it can be leveraged for other use cases as well.
The Skytap Cloud CI Plugin for Jenkins adds the following Skytap actions to Jenkins for use in Jenkins project build steps:
- Add Configuration to Project
- Change Configuration State
- Connect to Network in another Configuration (ICNR)
- Connect to VPN Tunnel
- Create Configuration from Template
- Create Publish URL
- Create Template from Configuration
- Delete Configuration
In this post I will discuss some of these Skytap Actions in detail. Full documentation can be found on the Jenkins-CI website:
The Skytap Cloud Plugin configuration panel can be found by navigating to: "Manage Jenkins->Configure System." This page controls logging of Skytap Actions.
If the checkbox is checked, verbose output on the operation of Skytap Actions will be sent to the Jenkins Project build console.
Accessing the Skytap Actions for Jenkins
The Skytap Cloud actions available for use in Jenkins project builds are exposed in the Jenkins Project Configuration screen in the "Add Build Step" dropdown menu as an "Execute Skytap Action" menu pick:
Once you select "Execute Skytap Action" you will be presented with a "Skytap Action" dropdown menu listing the available actions:
Depending on which action you select, you will be presented with a set of input and output parameters to specify in order to enable execution of the Skytap Action. The specific input and output parameters that are required differ depending on which Skytap Action you select.
Let's examine a flow where we do the following:
- Create two Skytap configurations from pre-configured Skytap templates
- Run the Configurations
- Connect the Configurations using the Internal Network Configuration Routing (ICNR) protocol
- Verify the network connection between the configurations
In practice, you could deploy the applications that have been built by your Jenkins project to test machine by using secure protocols such as ssh or scp over the ICNR connection.
Constructing the Jenkins Project
Authentication with Skytap Cloud
To use the Skytap Plugin for Jenkins, you must first be able to authenticate with Skytap Cloud. This authentication requires a Skytap Cloud user ID and an API Security Token. Assuming you already have a Skytap Cloud User ID, you can retrieve your API Security Token in your Skytap Account Settings:
Once you have your security token, you will need to enter it along with your Skytap User ID in the Skytap Cloud Plugin configuration panel for your Jenkins build project.
Creating the Build Steps
We've created a Jenkins project titled "Skytap-Jenkins-Plugin-Test" for the purposes of this discussion. After we navigate into this project, we can select "Configure" from the Jenkins UI:
Scroll down to the "Build" section of the project and click on the "Add build step" button and select "Execute Skytap Action":
Next click on the "Skytap Action" button to get the list of Skytap actions (note that it already has a default value of "Add Configuration to Project"):
Create the Skytap Configurations
Since we first want to create a Skytap configuration from a template, select "Create Configuration from Template":
After selecting "Create Configuration from Template" we can fill out the specific parameters required for this Skytap action:
In this case, we are specifying a Template ID that corresponds to a CentOS 6.4 VM in the Skytap Public Template Library. We are also specifying an output file that will contain the metadata associated with the configuration that gets created. This metadata file will be used as an input parameter in later Skytap actions.
We will go through this same process to construct a second build step to create a second Skytap configuration, this time from a Linux Tomcat App Server template I've preconfigured to allow an ICNR connection:
Connect the Configuration Networks
Now that the configurations have been created, we can connect their networks together using the ICNR protocol. Select the Skytap action "Connect to Network in another Configuration (ICNR)" as the next build step:
The parameters associated with this step require us to specify a source configuration and a source network within that configuration as well as a target configuration and a target network within that configuration. Because the configurations were just created as part of this Jenkins build, we don't know the configuration IDs, but we can use the configuration meta-data files that were created alongside the configurations to specify which configurations to use. We will use the first configuration we created as the source configuration and the second configuration we created as the target configuration. Each of these configurations has only one network defined, and in each case it is named "Default Network":
Run the Skytap Configurations
Now that the networks are connected, we can run the Skytap Configurations. To do this, select "Change Configuration State" as the Skytap Action and "Run Configuration" as the Action:
Specify the configuration meta-data file to identify which configuration to run. Do this for each of the two configurations:
Save and Run the Jenkins Project
We've now created all the build steps required in our Jenkins Project, so we will click the "Save" button to save it:
And run the project by clicking "Build Now"
When the build is completed, we can review the verbose console logging output that we requested by checking the "Enable Logging of Skytap Actions" checkbox to review the details of the build actions:
Verify the Network Connection Between the Configurations
Now we can use the Skytap Cloud Web GUI to connect to the configurations and verify that they are indeed running and that their networks are connected.
Here we can see that both configurations are running:
Opening a SmartClient desktop on the CentOS VM, we see that we're able to ping the Tomcat Server:
And vice-versa, the Tomcat Server can ping our CentOS VM:
We've seen that you can now use the Skytap Cloud CI Plugin for Jenkins to create simple Jenkins projects to create, connect and run Skytap configurations. The principles demonstrated in this simple project and the additional Skytap actions provided by the Skytap Cloud CI Plugin for Jenkins can easily be expanded further into more complex build and test scenarios based on your testing and CI requirements.
Please contact Skytap ( 1-888-759-8278 or http://www.skytap.com )if you want more information about Skytap or the Skytap CI Plugin for Jenkins.