Installing Pipelines

The following section describes how to install and uninstall OpenShift Pipelines.

Installing the Pipelines Operator in Web Console

OpenShift Pipelines can be installed by using the operator listed in the OpenShift OperatorHub. When you install the pipelines operator, the custom resources required for the pipeline configuration are automatically installed along with the operator.

Prerequisites

  • An OpenShift 4 cluster is required for installation. Visit try.openshift.com for information on setting up an OpenShift 4 cluster.

  • You must have cluster administrator privileges to install and use the Pipelines Operator.

  • Download the Tekton CLI tkn and add it’s location to your PATH environment variable.

Procedure

  1. In the Administrator perspective of the Web Console, navigate to Operators > OperatorHub.

  2. Use the Filter by keyword box to search for OpenShift Pipelines Operator in the catalog. Click on the OpenShift Pipelines Operator tile.

    openshift pipelines operator tiles
  3. In the Show Community Operator dialog box, click Continue.

  4. The OpenShift Pipelines Operator screen providing a brief description of the operator is displayed. Click Install.

    openshift pipelines install subscription
  5. In the Create Operator Subscription screen, ensure that:

    • the Installation Mode selected is All namespaces on the cluster (default), as the OpenShift Pipelines operator needs to watch for Tekton Custom Resources across all namespaces.

    • the Approval Strategy is Automatic so that future upgrades to the operator are handled automatically by the the Operator Lifecycle Manager (OLM). If you select Manual; when a new version of the Operator is available, you will need to manually approve the OLM update request to update to the new version.

      OpenShift Pipelines 0.5.2 has introduced changes incompatible with older versions. If the installed version is 0.5.0 or below, the operator will not be automatically upgraded. To upgrade from the 0.5.0 or below, uninstall the operator and then install it again.

  6. Click Subscribe. You will see the operator listed on the Installed Operators page.

    The operator is installed automatically into the openshift-operators namespace.

  7. In the Subscription Overview screen, verify the installation of the operator by confirming that the UPGRADE STATUS is 1 installed.

Installing the OpenShift Pipelines operator using the CLI

You can install OpenShift Pipelines operator from the OperatorHub using the CLI.

Prerequisites
  • Access to an OpenShift cluster using an admin account.

  • oc is installed on your system.

Procedure
  1. Create a Subscription object YAML file to subscribe a namespace to the OpenShift Pipelines Operator, for example, sub.yaml:

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: openshift-pipelines-operator
      namespace: openshift-operators
    spec:
      channel: dev-preview
      name: openshift-pipelines-operator
      source: community-operators
      sourceNamespace: openshift-marketplace
  2. Create the Subscription object:

    $ oc apply -f sub.yaml

    The OpenShift Pipelines operator is now installed in the default target namespace openshift-pipelines.

Uninstalling the OpenShift Pipelines operator and the OpenShift Pipelines

To uninstall pipelines you need to first delete the custom resource (added by default when you install the operator), and then uninstall the pipeline operator. Uninstalling the Pipelines operator will not remove the OpenShift Pipelines components created by default when the operator is installed.

Uninstalling the OpenShift Pipeline components and custom resource

Procedure

Uninstall the custom resource, created by default when you install the Pipelines Operator, as follows:

  1. In the Administrator perspective of the Web Console, navigate to Operators > Installed Operators.

  2. In the Project drop-down select the OpenShift- Operators project.

  3. Click on the OpenShift Pipelines Operator to see the overview of the operator.

  4. Click on the OpenShift Pipelines config tab to see the Configs screen.

  5. Click the Options menu {kebab} adjacent to the cluster config listed in the Configs screen, and select Delete Config.

    Deleting the cluster (instance of config) custom resource, will delete the openshift-pipelines components and all the Tasks and Pipelines on the cluster will be lost.

  6. Click Delete to confirm the deletion of the custom resource.

Uninstalling the pipelines operator

Procedure

To uninstall the Pipelines operator, follow these steps:

  1. From the Operators > OperatorHub page, use the Filter by keyword box to search for OpenShift Pipelines Operator.

  2. Click on the OpenShift Pipelines Operator tile. The operator tile indicates it is installed.

  3. In the OpenShift Pipelines Operator descriptor screen, click Uninstall.

  4. In the Remove Operator Subscription dialog box, ensure that the Also completely remove the Operator from the selected namespace is selected, and click Remove.