OpenShift plugin

The XL Release OpenShift plugin allows you to work with resources on an OpenShift host from the XL Release UI. The following task types are included:

  • OpenShift: Create resource
  • OpenShift: Remove resource
  • OpenShift: Start Build
  • OpenShift: Image Tag
  • OpenShift: Start Deployment
  • OpenShift: Check Service

In the release flow editor, the Openshift tasks have a blue border.

Features

  • Create a new OpenShift resource
  • Remove an OpenShift resource
  • Wait for a created resource to be in a running state
  • Start an OpenShift build
  • Tag an OpenShift image stream
  • Start an OpenShift deployment
  • Check for an OpenShift service accessibility

Requirements

The OpenShift plugin requires the following:

  1. The XL Release Remoting plugin to be installed.
  2. OpenShift command line client: oc to be installed on a Unix host machine.

Set up an OpenShift client

Set up a connection to a Unix server with the installed OpenShift client:

  1. In XL Release, go to Settings > Shared configuration and click Add Unix Host.

  2. In the Address field, enter the IP address or host name of the remote machine with the installed OpenShift client.

  3. In the Port field, enter the SSH port of the remote machine.

  4. In the Username and Password fields, specify the user name and password of the SSH user that XL Release uses when connecting to the remote machine.

  5. In the Sudo Username field, enter the user name of the sudo user on the remote machine (for example: root).

    Create Unix host

Set up an OpenShift client (OC):

  1. In XL Release, go to Settings > Shared configuration and click Add Openshift Client (OC) Configuration.

  2. In the Client Host field, select Unix host you created.

  3. In the OC Path field, enter the path for OC.

  4. In the Openshift Server field, enter URL to connect with the OpenShift Server.

  5. In the Username field, enter username to connect with the OpenShift Server.

  6. In the Password field, enter password to connect with the OpenShift Server.

    Create OC Client

Set up an OpenShift client (API):

  1. In XL Release, go to Settings > Shared configuration and click Add Openshift Client (API) Configuration.

  2. In the Openshift Server field, enter URL to connect with the OpenShift Server.

  3. Select Skip SSL Verification checkbox.

  4. In the CA Certificate field, enter the certificate located in .minishift directory.

  5. In the TLS certificate field, enter the certificate located in .minishift directory.

  6. In the TLS private key field, enter the private key located in .minishift directory.

  7. In the Token field, enter the OC token located in the OC Admin page under Help -> Command Line Tools.

    Create OC Client

Create resource task type

The OpenShift: Create Resource task type creates a resource in the default project in OpenShift. This requires you to specify a configuration in JSON format. You can specify the configuration:

  • By providing a JSON in the task
  • By providing a URL to a JSON file

You can enter the JSON configuration as plain text in the Configuration file field:

OpenShift Create Resource task with configuration file

You can also provide a URL for the configuration file in the Url field. If the URL is secure, you must provide credentials in the Username and Password fields.

OpenShift Create Resource task with URL to configuration file

  • If the output of this command is needed in JSON format, add -o json to the cmdParams.

  • In the Pattern field, you can specify a regular expression to match the output of the specified OC command. When the output matches the regular expression, the task will succeed and the release moves to the next task.

OpenShift Wait for Resource task

Remove resource task type

The OpenShift: Remove Resource task type destroys a resource in the default project in OpenShift. This requires you to specify a configuration in JSON format. As in the Create Resource task type, you can enter the JSON in the task or provide a URL to a configuration file.

Start build task type

The OpenShift: Start Build task type starts a build in default project in OpenShift. You must specify the build name that already exists on OpenShift.

OpenShift Start Build

Image tag task type - OpenShift Client

The OpenShift: Image Tag - OC Client task type tags an image stream in OpenShift. You must specify the source image and target image name that already exists on OpenShift. This also provides an optional source and a target project. If not specified, it uses the default project in OpenShift.

OpenShift Image Tag

Image tag task type - OpenShift API

The OpenShift: Image Tag - OC API task type tags an image stream in OpenShift. The difference from OC - Client is that if the image tag is not specified from Openshift when the project is built, the OC API will show it as an error. To fix this, the first image tag needs to either be specified in the yaml or use the OC Client to create it first.

OpenShift Image Tag

Start deployment task type

The OpenShift: Start Deployment task type starts a deployment in the default project in OpenShift. You must specify the deployment name that already exists on OpenShift.

OpenShift Start Deployment

Check service task type - OpenShift client

The OpenShift: Check Service task type checks accessibility of a service in the default project in OpenShift. You must specify the service name that already exists on OpenShift.

OpenShift Check Service

Check service task type - OpenShift API

The OpenShift: Check Service - OpenShift API task is fairly similar to the OC client version. Keep in mind that a health check port (type: NodePort,LoadBalancer) must be available from Openshift service.

OpenShift Check Service

Release notes

XL Release OpenShift plugin 9.0.0

  • Added compatibility with XL Release 9.0.0

XL Release OpenShift plugin 8.6.0

Improvements

  • [XLINT-609] - Fixes broken parts of plugin 8.5 and bug with StartBuild task not checking success.
  • [XLINT-557] - Fixes CheckService task connecting always to the first project in Openshift.

XL Release OpenShift plugin 8.1.0

Improvements

  • [REL-6783] - Add support for self-signed certs or optionally skip verification

XL Release OpenShift plugin 8.0.0

Important: Version 8.0.0 is not backward compatible and introduces a breaking change with the addition of the {{openshift.client}} shared configuration.

Improvements

  • [REL-6160] - Add oc path as a property in Shared Configuration
  • [REL-6161] - Accept oc client cli configurations in Shared Configuration as separate object
  • [REL-6366] - Club wait logic with Create Resource and Remove Resource tasks

XL Release OpenShift plugin 7.5.0

Features

  • Add Create/Wait/Delete Resource tasks for OpenShift
  • Add task to trigger a build in OpenShift
  • Add task to tag an image
  • Add a task to trigger a deployment
  • Add a task to verify whether a service is accessible