JClouds Plugin

Skip to end of metadata
Go to start of metadata

This plugin uses JClouds to provide slave launching on most of the currently usable Cloud infrastructures.

Plugin Information

Plugin ID jclouds-jenkins Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
2.8 (archives)
Jun 03, 2014
Source Code
Issue Tracking
Pull Requests
Open Issues
Pull Requests
Monty Taylor (id: sdirector)
Adrian Cole (id: jclouds)
Vijay Kiran (id: vijaykiran)
Andrew Bayer (id: abayer)
Marat Mavlyutov (id: mavlyutov)
Usage Installations 2014-Nov 346
2014-Dec 347
2015-Jan 374
2015-Feb 391
2015-Mar 409
2015-Apr 393
2015-May 397
2015-Jun 435
2015-Jul 450
2015-Aug 420
2015-Sep 430
2015-Oct 458

JClouds Jenkins plugin provides option to launch jenkins slaves on any Cloud provider supported by JClouds (http://jclouds.apache.org/reference/providers/#compute-apis), or on a cloud provider implementing one of the APIs JClouds supports.

Adding a new Cloud Provider

  • Goto Jenkins Configuration page by clicking on Manage menu or browsing to the URL http://localhost:8080/configure
  • Scroll down to Cloud Section
  • Click on the `Add a new cloud` pop-up menu button which should have an option - `Cloud (JClouds)`
  • Click on `Cloud (JClouds)`
  • Fill in the configuration options
    • Profile : the name of the profile e.g, aws-slave-profile
    • Provider Name: type first two characters and you'll get an auto-completed provider name (e.g. aws-ec2 or hpcloud-compute)
    • End Point URL: if your provider API needs an endpoint configuration, add it here, otherwise leave it empty.
    • Max Number of Instances: The maximum number of instances to run from this cloud at one time.
    • Retention Time: How long, in minutes, to wait for a slave to remain idle before disconnecting and terminating it. Defaults to 30.
    • Identity : your accessId (in case of openstack-nova, the accessId is in form tenantName:userName)
    • Credential: your secret key (in case of hp-cloud, the Credential is you website login password)
    • RSA Private Key/Public Key: If you have a keypair, then just copy paste the public and private key parts, otherwise click on `Generate Key Pair` button.
    • Click on `Test Connection` to validate the cloud settings.
  • Add Cloud Instance Template by clicking on the Add button
  • Fill in configuration options:
    • Name : the name of the instance template e.g. aws-jenkins-slave
    • Number of Executors: How many executors each slave created from this template should have.
    • Description: notes/comments for your reference.
    • Image ID: Use one of the following options:
      • Image ID to use for this slave template, such as EC2 AMIs. Note that EC2 AMIs must include the region as well, e.g., us-east-1/ami-00000.
      • OSFamily: Specify the OSFamily - leave empty for default for a cloud provider
      • OS Version : Specify the OSVersion - leave empty for default for a cloud provider
    • Hardware ID: Use one of the following options:
      • Hardware ID on provider for this slave template, such as t1.micro on AWS EC2.
      • RAM : in MB
      • No. of Cores: number of virtual processor cores.
    • Location ID: Location ID where this slave will be deployed. If none is selected jclouds will automatically choose an available one.
    • Labels: (space-separated) labels/tags that you can use to attach a build to this slave template
    • Init Script: A shell script to be run when the slave is created.
    • Stop on Terminate: If true, suspend slaves rather than terminating them.
  • Click Save to save the configuration changes.
  • Goto Jenkins' home page, click on `Build Executor Status` link on the sidebar.
  • Verify that you have a button with `Provision via JClouds - (YOUR PROFILE NAME) drop down with the slave template name you configured.
  • Click on the slave and see if your slave launched succesfully (please wait until the operation completes).

Executing build on the slave

  • To run your build on the newly configured slave computer, just enable the `Restrict where this project can be run` option in the build configuration page.
  • Enter the label which you choose for the instance template in the `Label Expression` text field. This should auto-complete labels for you.
  • Click save to save the configuration options.
  • Schedule the build to check whether the build is executed on the selected slave template.

Adding a Blobstore Profile for storing build artifacts

The plugin also provides a way to store your build artifacts on JClouds supported cloud storage providers. You can configure multiple
blobstore profiles and configure the build to copy different files/artifacts to the specified container. Here's how you configure the same.

  • Goto Jenkins Configuration Page
  • Click Ad under the section `JClouds Cloud Storage Settings`
  • Provide the configuration Options:
  • You can add multiple providers by clicking on Add.
  • Click Save on the bottom of the page, to save the settings.

Publishing artifacts after a build

After you configure a cloudstorage provider, you can enable the publishing file by enabling it under `Post-build Actions` in the build job configuration page.

  • Click on the checkbox `Publish artifacts to JClouds Clouds Storage`
  • You should now see a dropdown with configured storage profiles. Select the one you want to use for this build.
  • Click on Add button next to `Files to upload`.
  • Add the sourcd file path (relative to workspace)
  • Add the destination container name.
  • Repeat to add more files if you want to copy.
  • Click save.

When the build is complete and succesful, the configured files will be published to the configured blobstore.


Version 2.5.1 (released March 5, 2014)

  • Switch back to Java 1.6
  • Jclouds version updated to 1.7.1
  • Allow shading guava and jclouds
  • Added the DigitalOcean provider
  • Added an option to let users install private key in the slave
  • Added option to specify networks requirements for any provider

Version 2.5 (released February 5, 2014)

  • Added OpenStack zones parameter to restrict spawning cloud slaves to them
  • Added capability to run slaves by specifying image name regexp instead of image ID
  • Bumped Java version to 1.7
  • Credential field is now password type
  • JCloudSlave now inherited from AbstractCloudSlave

Version 2.4 (released August 27, 2013)

  • Bump up jclouds to 1.6.2-incubating.
  • Allow the user to not allocate a public IP address on CloudStack. (JENKINS-18461)
  • Various OpenStack fixes
  • Add support for user data and persisting credentials.
  • Various blobstore improvements
  • Don't print auth stack trace (JENKINS-16632)
  • Add forcible synchronized serial delay option (JENKINS-15970)

Version 2.3 (released August 31, 2012)

  • Bump up jclouds to 1.5.0-beta.11.
  • Add the ability to override retention time for an individual template.
  • Now able to specify "Launch Instance" template as a string with parameter replacement enabled.

Version 2.2.2 (released July 18, 2012)

  • Bump up jclouds to 1.5.0-beta.7.
  • Use Remote FS Root for Jenkins user home. (JENKINS-14396)

Version 2.2.1 (released July 11, 2012)

  • Bump up jclouds to 1.5.0-beta.6.

Version 2.2 (released June 22, 2012)

  • Based on JClouds 1.5.0-beta.4, adding support for a bunch of new cloud providers, including CloudStack 3.x, Greenqloud, and more.
  • Added Single Use Slave option - if enabled, the slave will only be used for one build and then deleted.
  • Dramatically improved performance of slave deletion, which should also help avoid lockups of Jenkins itself.

Version 2.1.1 (released May 24, 2012)

  • Fixed a showstopper bug that actually broke everything UI-related. whoops!

Version 2.1.0 (released May 23, 2012)

  • Bumped to JClouds 1.5.0-beta.1.
  • Initial support for spinning up non-slave instances as part of a build.
  • Don't create a Jenkins user on the slave if one already exists.
  • Add a configurable timeout for slave init.
  • Improved logging.

Version 2.0.4 (released May 1, 2012)

  • Hardware ID wasn't being used.
  • Got rid of excess persisted NodeMetadata from slaves.
  • Cleaned up slave template UI.
  • Added option for infinite retention with retention time of -1.

Version 2.0.3 (released Apr 26, 2012)

  • Modified package manifest to mask older guava jars from plugin's classloader, so that the plugin will work consistently on pre-1.463 Jenkins releases.

Version 2.0.2 (released Apr 25, 2012)

  • First real release.
  • Support for multiple clouds on a single Jenkins instance.
  • Auto-provisioning functional.


plugin-cluster plugin-cluster Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment