이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 3. JWS Operator installation from OperatorHub
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.
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
- Open the web console and select Operators > OperatorHub.
- In the Filter by keyword search field, type "JWS".
- Select the JWS Operator.
- On the JBoss Web Server Operator menu, select the Capability level that you want to use and click Install.
On the Install Operator page, perform the following steps:
Select the Update channel where the JWS Operator is available.
NoteThe JWS Operator is currently available through one channel only.
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.
NoteIf you do not specify a namespace, the Operator is installed to all namespaces on the cluster by default.
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.
Click Install.
NoteIf 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
octool on your local system.
Procedure
To inspect the JWS Operator, perform the following steps:
View the list of JWS Operators that are available to the cluster from OperatorHub:
oc get packagemanifests -n openshift-marketplace | grep jws
$ oc get packagemanifests -n openshift-marketplace | grep jwsCopy to Clipboard Copied! Toggle word wrap Toggle overflow The preceding command displays the name, catalog, and age of each available Operator.
For example:
NAME CATALOG AGE jws-operator Red Hat Operators 16h
NAME CATALOG AGE jws-operator Red Hat Operators 16hCopy to Clipboard Copied! Toggle word wrap Toggle overflow Inspect the JWS Operator to verify the supported installation modes and available channels for the Operator:
oc describe packagemanifests jws-operator -n openshift-marketplace
$ oc describe packagemanifests jws-operator -n openshift-marketplaceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Check the actual list of Operator groups:
oc get operatorgroups -n <project_name>
$ oc get operatorgroups -n <project_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME AGE mygroup 17hCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you need to create an Operator group, perform the following steps:
NoteIf the Operator you want to install uses
SingleNamespaceinstallation 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
AllNamespacesinstallation mode or you already have an appropriate Operator group in place, you can ignore this step.Create a YAML file for the
OperatorGroupobject.For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 theoc project -qcommand.Create the
OperatorGroupobject from the YAML file:oc apply -f <filename>.yaml
$ oc apply -f <filename>.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the preceding example, replace
<filename>.yamlwith the name of the YAML file that you have created for theOperatorGroupobject.
To create a Subscription object, perform the following steps:
Create a YAML file for the
Subscriptionobject.For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 theoc project -qcommand.The namespace that you specify must have an
OperatorGroupobject that has the same installation mode setting as the Operator. If the Operator usesAllNamespacesinstallation mode, replace<project_name>withopenshift-operators, which already provides an appropriate Operator group. If the Operator usesSingleNamespaceinstallation mode, ensure that this namespace has only oneOperatorGroupobject.Ensure that the
sourcesetting matches theCatalog Sourcevalue that was displayed when you verified the available channels for the Operator (for example,redhat-operators).Create the
Subscriptionobject from the YAML file:oc apply -f <filename>.yaml
$ oc apply -f <filename>.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the preceding example, replace
<filename>.yamlwith the name of the YAML file that you have created for theSubscriptionobject.
Verification
To verify that the JWS Operator is installed successfully, enter the following command:
oc get csv -n <project_name>
$ oc get csv -n <project_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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:
Expand NAME DISPLAY VERSION REPLACES PHASE jws-operator.v2.2.x
JWS Operator
2.2.x
jws-operator.v2.1.y
Succeeded
In the preceding output,
2.2.xrepresents the current Operator version (for example,2.2.0), and2.1.yrepresents the previous Operator version that the current version replaces (for example,2.1.3).