Rechercher

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

Chapter 3. JWS Operator installation from OperatorHub

download PDF

You can install the JWS Operator from OperatorHub to facilitate the deployment and management of JBoss Web Server applications in an OpenShift cluster. OperatorHub is a component of the Operator Framework that you can use to discover Operators that you want to install. OperatorHub works in conjunction with the Operator Lifecycle Manger (OLM), which installs and manages Operators in a cluster.

You can install the JWS Operator from OperatorHub in either of the following ways:

3.1. Installing the JWS Operator by using the web console

If you want to install the JWS Operator by using a graphical user interface, you can use the OpenShift web console to install the JWS Operator.

Note

When you install the JWS Operator by using the web console, and the Operator is using SingleNamespace installation mode, the OperatorGroup and Subscription objects are installed automatically.

Prerequisites

  • You have deployed an OpenShift Container Platform cluster by using an account with cluster administrator and Operator installation permissions.

Procedure

  1. Open the web console and select Operators > OperatorHub.
  2. In the Filter by keyword search field, type "JWS".
  3. Select the JWS Operator.
  4. On the JBoss Web Server Operator menu, select the Capability level that you want to use and click Install.
  5. On the Install Operator page, perform the following steps:

    1. Select the Update channel where the JWS Operator is available.

      Note

      The JWS Operator is currently available through one channel only.

    2. Select the Installation mode for the Operator.

      You can install the Operator to all namespaces or to a specific namespace on the cluster. If you select the specific namespace option, use the Installed Namespace field to specify the namespace where you want to install the Operator.

      Note

      If you do not specify a namespace, the Operator is installed to all namespaces on the cluster by default.

    3. Select the Approval strategy for the Operator.

      Consider the following guidelines:

      • If you select Automatic updates, when a new version of the Operator is available, the OLM upgrades the running instance of your Operator automatically.
      • If you select Manual updates, when a newer version of the Operator is available, the OLM creates an update request. As a cluster administrator, you must then manually approve the update request to ensure that the Operator is updated to the new version.
  6. Click Install.

    Note

    If you have selected a Manual approval strategy, you must approve the install plan before the installation is complete.

    The JWS Operator then appears in the Installed Operators section of the Operators tab.

3.2. Installing the JWS Operator by using the command line

If you want to install the JWS Operator by using a command-line interface, you can use the oc command-line tool to install the JWS Operator. The JWS Operator that Red Hat provides is named jws-operator.

The steps to install the JWS Operator from the command line include verifying the supported installation modes and available channels for the Operator and creating a Subscription object. Depending on the installation mode that the Operator uses, you might also need to create an Operator group in the project namespace before you create the Subscription object.

Prerequisites

  • You have deployed an OpenShift Container Platform cluster by using an account with Operator installation permissions.
  • You have installed the oc tool on your local system.

Procedure

  1. To inspect the JWS Operator, perform the following steps:

    1. View the list of JWS Operators that are available to the cluster from OperatorHub:

      $ oc get packagemanifests -n openshift-marketplace | grep jws

      The preceding command displays the name, catalog, and age of each available Operator.

      For example:

      NAME            CATALOG             AGE
      jws-operator    Red Hat Operators   16h
    2. Inspect the JWS Operator to verify the supported installation modes and available channels for the Operator:

      $ oc describe packagemanifests jws-operator -n openshift-marketplace
  2. Check the actual list of Operator groups:

    $ oc get operatorgroups -n <project_name>

    In the preceding example, replace <project_name> with your OpenShift project name.

    The preceding command displays the name and age of each available Operator group.

    For example:

    NAME       AGE
    mygroup    17h
  3. If you need to create an Operator group, perform the following steps:

    Note

    If the Operator you want to install uses SingleNamespace installation mode and you do not already have an appropriate Operator group in place, you must complete this step to create an Operator group. You must ensure that you create only one Operator group in the specified namespace.

    If the Operator you want to install uses AllNamespaces installation mode or you already have an appropriate Operator group in place, you can ignore this step.

    1. Create a YAML file for the OperatorGroup object.

      For example:

      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: <operatorgroup_name>
        namespace: <project_name>
      spec:
        targetNamespaces:
        - <project_name>

      In the preceding example, replace <operatorgroup_name> with the name of the Operator group that you want to create, and replace <project_name> with the name of the project where you want to install the Operator. To view the project name, you can run the oc project -q command.

    2. Create the OperatorGroup object from the YAML file:

      $ oc apply -f <filename>.yaml

      In the preceding example, replace <filename>.yaml with the name of the YAML file that you have created for the OperatorGroup object.

  4. To create a Subscription object, perform the following steps:

    1. Create a YAML file for the Subscription object.

      For example:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
          name: jws-operator
          namespace: <project_name>
      spec:
          channel: alpha
          name: jws-operator
          source: redhat-operators
          sourceNamespace: openshift-marketplace

      In the preceding example, replace <project_name> with the name of the project where you want to install the Operator. To view the project name, you can run the oc project -q command.

      The namespace that you specify must have an OperatorGroup object that has the same installation mode setting as the Operator. If the Operator uses AllNamespaces installation mode, replace <project_name> with openshift-operators, which already provides an appropriate Operator group. If the Operator uses SingleNamespace installation mode, ensure that this namespace has only one OperatorGroup object.

      Ensure that the source setting matches the Catalog Source value that was displayed when you verified the available channels for the Operator (for example, redhat-operators).

    2. Create the Subscription object from the YAML file:

      $ oc apply -f <filename>.yaml

      In the preceding example, replace <filename>.yaml with the name of the YAML file that you have created for the Subscription object.

Verification

  • To verify that the JWS Operator is installed successfully, enter the following command:

    $ oc get csv -n <project_name>

    In the preceding example, replace <project_name> with the name of the project where you have installed the Operator.

    The preceding command displays details of the installed Operator.

    For example:

    NAMEDISPLAYVERSIONREPLACESPHASE

    jws-operator.v2.0.x

    JWS Operator

    2.0.x

    jws-operator.v2.0.y

    Succeeded

    In the preceding output, 2.0.x represents the current Operator version (for example, 2.0.6), and 2.0.y represents the previous Operator version that the current version replaces (for example, 2.0.5).

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.