Skip to main content
Version: Release SaaS

OpenShift Plugin

The Release OpenShift plugin allows you to work with resources on an OpenShift host from the Release UI.

The following task types are included:

  • OpenShift API: Start Build
  • OpenShift API: Image Tag
  • OpenShift API: Start Deployment
  • OpenShift API: Service Status

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

Features

  • Create a new OpenShift resource
  • Remove an OpenShift resource
  • 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. OpenShift command line client: oc to be installed on a Unix host machine.
  2. A valid OpenShift account and a user with admin rights associated to it.

Set up an OpenShift client

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

  1. In Release, from the navigation pane, go to Configuration > Connections 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 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 Release, from the navigation pane, go to Configuration > Connections 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 Release, from the navigation pane, go to Configuration > Connections 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

Start build task type - OpenShift API

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

OpenShift Start Build

Image tag task type - OpenShift API

The OpenShift API: Image Tag 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 file or use the OC Client to create it first.

OpenShift Image Tag

Start deployment task type - OpenShift API

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

OpenShift Start Deployment

Check service task type - OpenShift API

The OpenShift API: Service Status task is fairly similar to the OC client version. You must specify the project name and service name that already exists on OpenShift. Keep in mind that a health check port (type: NodePort,LoadBalancer) must be available from Openshift service.

OpenShift Check Service