Child pages
  • Oracle Cloud Infrastructure Compute Plugin

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A Jenkins Plugin to create compute instances on Oracle Cloud Infrastructure (OCI) Compute and start agents on them dynamically.

 


License 

Oracle Cloud Infrastructure Compute Plugin is dual-licensed to you under the Universal Permissive License (UPL) and Apache License 2.0. Refer https://github.com/jenkinsci/oracle-cloud-infrastructure-compute-plugin/blob/master/LICENSE.txt for License terms

Prerequisites

  1. You need to have a oracle cloud account which includes OCI Compute service, to sign up, try Oracle Cloud
  2. Your Jenkins server must be installed with JDK8 or higher version

...

  1. Click "Add" in "Instance Templates" section to add one resource configuration set for desired compute instances, you can click "Add" multiple times if you need different compute instance configurations.

  2. Input or select values in the 'Instance Template' section:

    • Description: help other users/colleagues to understand what this template is used for.
    • Usage: it's recommended that you select "Only build jobs with label expressions matching this node" for now.
    • Labels: unique identifier which allows Jenkins to pick the right instance template to start.
    • Compartment: a compartment is a collection of related resources (such as instances, virtual cloud networks, block volumes) that can be accessed only by certain groups that have been given permission by an administrator. You can select a compartment where to create an instance.
    • Available Domain, Shape, Image, Virtual Cloud Network, Subnet: specify desired requirement on Domain, CPU, Image, Network [Important : Make sure Java is installed in selected image or refer "Init Script" in Step 10 to install Java on the newly launched compute instances]
    • SSH Public Key Name: here user can paste ssh public key
    • SSH Private Key: here user need to paste corresponding private key that allows jenkins connect to the compute instance provisioned using above selected public key.
  3. Click "Verify SSH Key Pair" to verify the public key and private key are matched or not as blew.

  4. Click "Advanced" for more configuration options:

    • Remote FS root, Remote SSH user: dedicated directory for Jenkins agent in agent node and the ssh user used for Jenkins master to access Jenkins agent, make sure the SSH user has written permission on Remote FS root directory.
    • Instance Creation Timeout: number of seconds to wait for new compute instance to reach state "ready", default value is 300.
    • Instance SSH Connection Timeout: number of seconds to wait for new compute instance from state "ready" to be SSH connectable from Jenkins master, default value is 60.
    • Idle Termination Minutes: number of minutes for Jenkins to wait before deleting an idle agent, which means completely removal of the created compute instance. A value of 0 (or an empty string) indicates that idle agents should never be stopped/deleted. As an example, let's say an agent was started at 11:00 and Idle Termination Minutes was set 5. The agent executed several Jenkins jobs from 11:00 to 11:20, and has been idle since then. At 11:25 Jenkins finds the idle timeout of above agent has reached and the agent will be deleted.
    • Number of Executors: this controls the number of concurrent builds that Jenkins can perform. So the value affects the overall system load Jenkins may incur. A good value to start with would be the number of processors on your system. Increasing this value beyond that would cause each build to take longer, but it could increase the overall throughput, because it allows CPU to build one project while another build is waiting for I/O. When using Jenkins in the master/agent mode, setting this value to 0 would prevent the master from doing any building on its own. Agents may not have zero executors, but may be temporarily disabled using the button on the agent's status page.
    • Init Script: user can define several lines of shell based commands to configure the provisioned compute instances (One-time) before the first Jenkins job starts to build; for example, if the image user selected does not have Java pre-installed, user can input Java installation command like "sudo yum -y install java"
    • Init Script Timeout: Number of seconds to wait for the completion of Init Script. Default value is 120 seconds.
  5. Click "Save" or "Apply"

 

Changelog