Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Installing Builds


As a cluster administrator, you can install Builds on an OpenShift Container Platform cluster.

1.1. Prerequisites

  • You have access to the OpenShift Container Platform web console.
  • You have installed the oc CLI.
  • You are logged in to the OpenShift Container Platform cluster as an administrator.
  • Your cluster has the Marketplace capability enabled or the Red Hat Operator catalog source configured manually.
Note

As a dependency component, the Red Hat OpenShift Pipelines Operator is automatically installed along with the Builds for Red Hat OpenShift Operator during installation. If you have already installed the Red Hat OpenShift Pipelines Operator, Builds uses that Operator for its functioning.

1.2. Installing Builds by using the web console

You can install the Builds for Red Hat OpenShift Operator from the OperatorHub by using the builds for Red Hat OpenShift web console. Installing this Operator enables you to install and use build components.

Procedure

  1. In the Administrator perspective of the web console, navigate to the Operators OperatorHub page.
  2. Use the Filter by keyword box to search for Builds for Red Hat OpenShift Operator in the catalog.
  3. Click the Builds for Red Hat OpenShift Operator tile.
  4. Read the brief description about the Operator and click Install.
  5. On the Install Operator page:

    1. Check that the Installation Mode is set to All namespaces on the cluster (default). This mode installs the Operator in the default openshift-builds namespace to watch and be made available to all namespaces in the cluster.
    2. Check that the Installed Namespace is set to openshift-builds by default.
    3. Select Automatic for the Approval Strategy. This ensures that the future upgrades to the Operator are handled automatically by the Operator Lifecycle Manager (OLM). If you select the Manual approval strategy, OLM creates an update request. As a cluster administrator, you must then manually approve the OLM update request to update the Operator to the new version.
    4. Select an Update Channel:

      • The Update Channel is set to latest by default. The latest channel enables installation of the most recent stable version of the Builds for Red Hat OpenShift Operator.
      • To install a specific version of the Builds for Red Hat OpenShift Operator, cluster administrators can use the corresponding builds-<version> channel. For example, to install the Builds for Red Hat OpenShift Operator version 1.1, you can use the builds-1.1 channel.
  6. Click Install.

Verification

After installing the Builds for Red Hat OpenShift Operator, you must verify that the required resources are created to ensure proper functioning of the controllers.

Procedure

  1. In the Administrator perspective of the web console, select the project as openshift-builds.
  2. Navigate to the Operators Installed Operators page.
  3. Click the All instances tab.
  4. On the All instances tab, verify that the OpenShiftBuild & ShipwrightBuild instances are listed. Alternatively, you can also click the Open Shift Build and Shipwright Build tabs.
  5. Now, navigate to the Workloads Pods page.
  6. On the Pods page, verify that the following pods are listed:

    • The openshift-builds operator pod
    • Build controller and build webhook pods
    • SharedResource daemonset and SharedResource webhook pods

1.3. Installing Builds by using the CLI

You can also install Builds by using the command-line interface (CLI).

Procedure

  1. Create a sub.yaml subscription object file to subscribe a namespace to the Builds for Red Hat OpenShift Operator, as shown in the following example:

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: openshift-builds-operator
      namespace: openshift-builds
    spec:
      channel: <channel-name> 1
      name: openshift-builds-operator 2
      source: redhat-operators 3
      sourceNamespace: openshift-marketplace 4
    1
    The channel name from where you want to subscribe the Operator.
    2
    Name of the Operator to subscribe to.
    3
    Name of the CatalogSource that provides the Operator.
    4
    Namespace of the CatalogSource. Use openshift-marketplace for the default OperatorHub CatalogSources.
  2. Apply the subscription object by runninng the following command:

    $ oc apply -f sub.yml

    The Builds for Red Hat OpenShift Operator is now installed in the default target namespace openshift-builds.

Verification

After installing the Builds for Red Hat OpenShift Operator, you must verify that the following resources are created to ensure proper functioning of the Operator:

  1. Run the following command to ensure that the OpenshiftBuild resource is created:

    $ oc get openshiftbuilds
  2. Run the following command to ensure that the ShipwrightBuilds resource is created:

    $ oc get shipwrightbuilds
  3. Run the following command to ensure that the following pods are created in the openshift-builds namespace:

    • openshift-builds operator pod
    • Build controller and build webhook pods
    • SharedResource daemonset and SharedResource webhook pods

      $ oc get pods -n openshift-builds

      The list of pods is displayed as shown in the following example:

      $ oc get pods -n openshift-builds
      NAME                                                 READY   STATUS    RESTARTS   AGE
      openshift-builds-operator-6f5c48c6b5-cvp2w           2/2     Running   0          13d
      openshift-pipelines-operator-64d8c4969c-952cc        2/2     Running   0          3d13h
      shared-resource-csi-driver-node-gbkqs                2/2     Running   0          13d
      shared-resource-csi-driver-node-kcqxc                2/2     Running   0          13d
      shared-resource-csi-driver-node-sbsvg                2/2     Running   0          13d
      shared-resource-csi-driver-webhook-9d9bd48f4-d5ln6   1/1     Running   0          13d
      shipwright-build-controller-5454475b85-mmm6w         1/1     Running   0          13d
      shipwright-build-webhook-7fbd49c6bb-2n77s            1/1     Running   0          13d
      tekton-operator-webhook-756f5dfdc7-c99mc             1/1     Running   0          3d13h

1.4. Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.