Customer provided executors is a feature of DEV@cloud that allows customers to connect a slave from Linux, Mac OSX or Windows using the Jenkins CLI.
There are several reasons why you might want to provide your own executor (slave):
This is a beta/preview feature which should not be considered stable. It may disappear or significantly change without notice. Please fill out the survey to let us know what you think.
First of all, the jenkins-cli.jar is needed. A cli jar of at least version 1.460 is needed (Note that DEV@cloud is currently using Jenkins 1.447 but the latest versions of the CLI are needed to work well). Also create a workspace directory for the jobs to be executed in.
Next, you will need an SSH keypair for authentication. It is recommended that one is generated specifically for this purpose, especially if the slave will be connected from a server. The public key needs to be added to your user account on GrandCentral.
Below is the basic usage of the cli.
$ java -jar jenkins-cli.jar -s https://<myaccount>.ci.cloudbees.com -i ~/.ssh/id_rsa customer-managed-slave -help:
"-help" is not a valid option
java -jar jenkins-cli.jar customer-managed-slave args...
Connects a customer managed slave
-description VAL : Description to be put on the slave
-executors N : Number of executors
-fsroot VAL : Directory where Jenkins places files
-labels VAL : Whitespace-separated list of labels to be assigned for this
slave. Multiple options are allowed.
-name VAL : Name of the slave. If unspecified, one is generated for you
-s specifies the address of your jenkins instance.
-i is optional if the key you want to use is /.ssh/id_rsa or /.ssh/id_dsa. For other key-files a path will need to be specified. Note the SSH key must be an openssh key.
A full command is something like:
An important piece is the label. Labels allow you to connect multiple slaves, and have jobs choose any slave that matches the label.
Currently to make a job run on the provided slave, you need to select "Restrict where this project can be run" in the job configuration page, and input your label you want the job to run on.
Jobs configured to run on provided slaves will not run on the CloudBees elastic slaves, and jobs with no label set, will not run on provided slaves.
Because of how the masters are configured at the moment, to use some tools like maven you may need to provide the tool in the location Jenkins expects it to be, either directly, or with a symlink. Below are the paths that are used for the JDK's and Maven's. You can inspect /opt on DEV@cloud slaves with a job to find other provided tools if needed.
Java parent path: /opt/jdk
Java versions under the parent path:
Maven parent path: /opt/maven
Maven versions under the parent:
All users on your account are allowed to connect slaves using their registered public/private keypair.
All communication to and from your slave is secured by HTTPS.
If you have tried (or not tried) the feature - fill in a short poll for us (takes about 30 secs).