Skip to end of metadata
Go to start of metadata

Jenkins plugin for 1&1 Cloud Server

Description

This plugin allows Jenkins to start nodes on the 1&1 Cloud Server API on demand, and delete them when they are unused.

Getting Started

Jenkins plugin for 1&1 Cloud Server has the following requirements:

  • 1&1 account (API key)

Before you begin, you need to have a 1&1 account.

To enable the API token:

  1. Log in to your 1&1 Control Panel and select the relevant package.
  2. Click 1&1 Cloud Panel from the Cloud Server section of the control panel.
  3. Select Users from the Management section of the Infrastructure menu.
  4. Select the user.
  5. In the API section in the lower part of the screen, click Disabled next to the API KEY.
  6. Click OK to activate the API key.

Usage

After the plugin is installed, navigate to the main Manage Jenkins > Configure System page, and scroll down to the Cloudsection. Click Add a new cloud and select the 1&1 option. This will display the UI for configuring the 1&1 Cloud Server plugin.

Cloud Option Reference

The following table lists the cloud options and their brief descriptions:

NameRequiredDescription
Unique nameyesThe unique name for the cloud
API TokenyesThe 1&1 authentication key
SSH public keyyesA valid public SSH Key to be copied into the server during creation
SSH private keyyesA valid private SSH key to permit SSHing into the instances that are started
Instance capyesThe upper limit to the number of 1&1 servers that Jenkins is allowed to launch
Timeout in minutesyesTime reserved for the operations on this cloud to complete before triggering a timeout, expressed in minutes

Fill out the options fields, then use Test Connection to verify that Jenkins can successfully connect to the 1&1 Cloud Server API.

After verifying the API connection, a new node template can be added by clicking Add button. Node templates will be used to create servers and launch them as nodes.

Server Option Reference

The following table lists the server options and their brief descriptions:

NameRequiredDescription
Unique nameyesAn unique name for the node template/server. Note that no two node templates should have the same name within a Cloud. Each node template name must be unique. As the node template name is used in generating the server, name, only the characters A-Z, a-z. 0-9 and . can be used in the name.
Fixed instance sizeYesThe size used for provisioning new servers from this template.
Run as userYesJekins will SSH into the server as the user provided in this field. If you specify anything other than root, make sure that the user exists and that Jenkins will be able to SSH using the SSH private key specified for this Cloud.
Jenkins workspace directory pathYesAbsolute path to a directory in which Jenkins will put the workspace directory. Make sure that the user Jenkins runs as has enough permissions to write into that directory.
SSH portYesThe port at which the SSH daemon is listening for the incoming SSH connections.
LabelsYesLabels (also called "tags") are used for grouping multiple nodes into one logical group. Use spaces between each label. For instance 'regression centos7' will assign a node the labels 'regression' and 'centos7'. For example, if you have multiple CentOS 7 nodes and you have jobs that require CentOS 7, then you can configure all your CentOS 7 nodes to have the label 'centos7', then tie the job to the 'centos7' label. This allows your job to run on any of your CentOS 7 nodes but not anywhere else.
Number of executorsYesDetermines how many executors can run on the node. Should be an integer greater than zero.
Idle termination timeYesDetermines how long nodes can remain idle before being terminated and the server destroyed.

Times are expressed in minutes. A value of 0 indicates that idle nodes should never be terminated.

As Jenkins doesn't check the idle status of nodes every minute even if you tell it to (it might skip checks for a few minutes), Jenkins might terminate the node a few minutes later than what you specify in this field.
Instance capYesThe upper limit to the number of 1&1 servers that Jenkins is allowed to launch for this node template.
Init scriptNoInitialization script used for node setup.
Allow jobs with no label restrictionNoIf a non-empty set of labels is specified and this is checked, jobs that are not restricted to run on any specific node will trigger creation of a server based on this node template.

If a non-empty set of labels is specified and this is not checked, jobs that are not restricted to run on any specific node will not trigger creation of a server based on this node Template.

If no labels for this node template are specified, then regardless of whether this option is checked or not, jobs that are not restricted to run on any specific node will trigger creation of a server based on this node Template.

Support

You are welcome to contact us with questions or comments using the Community section of the 1&1 Cloud Community. Please report any feature requests or issues using GitHub issue tracker.

Contributing

  1. Fork the repository (https://github.com/jenkinsci/oneandone-cloudserver-plugin/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request