Preparing a Red Hat OpenShift environment
Create your Event Gateway namespace, define your catalog sources, and install the Event Endpoint Management operator.
Before you begin
- Planning your Event Gateway deployment covers general requirements for your Event Gateway environment.
- Requirements for an operator-managed Event Gateway covers additional requirements for operator-managed gateways.
Create a project (namespace)
Create a namespace for your Event Gateway instance by creating a project. When you create a project, a namespace with the same name is also created.
defaultkube-systemkube-publicopenshift-operators
- Log in to the Red Hat OpenShift Container Platform web console.
- Expand the Home dropdown and select Projects to open the Projects pane.
- Click Create Project.
- Enter a new project name in the Name field, and optionally, a display name in the Display Name field, and a description in the Description field.
- Click Create.
- Log in to your Red Hat OpenShift Container Platform CLI (
oc login). -
Run the following command to create a new project:
oc new-project <project_name> --description="<description>" --display-name="<display_name>"The
--descriptionand--display-namearguments are optional.
Create an image pull secret
Create an image pull secret that is called ibm-entitlement-key in your Event Gateway namespace. The secret enables the Event Gateway container image to be pulled from the image
registry.
- Obtain an entitlement key from the IBM Container software library.
- Create the secret in your Event Gateway namespace.
- To create the secret with the CLI, use the following
command:
oc create secret docker-registry ibm-entitlement-key --docker-username=cp --docker-password="<your-entitlement-key>" --docker-server="cp.icr.io" -n <namespace> - To create the secret with the web console:
- Select .
- Expand the Project dropdown and select the project that you created for your Event Gateway.
- Click .
- Set the fields as follows:
- Secret name:
ibm-entitlement-key. - Registry server address:
cp.icr.io. - Username:
cp. - Password: Your entitlement key.
- Secret name:
- Click Create.
- To create the secret with the CLI, use the following
command:
Creating the catalog sources
Two options are available for creating the Event Endpoint Management catalog sources in your Red Hat OpenShift environment:
-
Download the Container Application Software for Enterprises (CASE) files for the latest version of the Event Endpoint Management operator.
-
Add the IBM Operator Catalog to your cluster to make the latest version of Event Endpoint Management available in your cluster.Important: Use this option only if automatic updates are not enabled in your cluster.
Download the Container Application Software for Enterprises (CASE) files
- Log in to your Red Hat OpenShift Container Platform CLI (
oc login). -
Verify that you have the IBM Catalog Management Plug-in for IBM Cloud Paks (
ibm-pak) installed:oc ibm-pak --helpIf
ibm-pakis not installed, then follow the steps in theibm-pakreadme to install it. -
Run the following command to download, validate, and extract the latest Event Endpoint Management CASE version.
oc ibm-pak get ibm-eventendpointmanagement -
Generate mirror manifests by running the following command:
oc ibm-pak generate mirror-manifests ibm-eventendpointmanagement icr.ioThe previous command generates the following files locally:- catalog-sources.yaml
- catalog-sources-linux-
<arch>.yaml (if there are architecture-specific catalog sources) - image-content-source-policy.yaml
- images-mapping.txt
-
Apply the catalog sources to the cluster by running the following command:
oc apply -f ~/.ibm-pak/data/mirror/ibm-eventendpointmanagement/11.8.0/catalog-sources.yaml
When the Event Endpoint Management sources are installed, you can proceed to Install the Event Endpoint Management operator.
Add the IBM Operator Catalog to your cluster
If you have other IBM products that are installed in your cluster, then you might already have the IBM Operator Catalog available.
- Log in to your Red Hat OpenShift Container Platform CLI (
oc login). -
Create a file called ibm_catalogsource.yaml and paste in the following contents:
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-operator-catalog namespace: openshift-marketplace spec: displayName: "IBM Operator Catalog" publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-operator-catalog -
Create the catalog source by applying the ibm_catalogsource.yaml file:
oc apply -f ibm_catalogsource.yaml
- Log in to the Red Hat OpenShift Container Platform web console.
- Select the plus icon on the upper right.
- Paste the following contents into the YAML
editor:
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-operator-catalog namespace: openshift-marketplace spec: displayName: "IBM Operator Catalog" publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-operator-catalog - Click Create.
When the IBM Operator Catalog is installed in your Red Hat OpenShift environment, you can proceed to Install the Event Endpoint Management operator
Install the Event Endpoint Management operator
To install the operator by using the OpenShift Container Platform web console, complete the following steps:
- Log in to the Red Hat OpenShift Container Platform web console.
- Expand the Operators dropdown and select OperatorHub to open the OperatorHub dashboard.
- In the All Items search box, enter
IBM Event Endpoint Managementto locate the operator title. - Click the IBM Event Endpoint Management tile.
- Click Install to open the Install Operator dashboard.
- Select the installation mode that suits your requirements:
- Manage Event Gateway instances in any namespace.
Select All namespaces on the cluster (default).
The operator is deployed into the system namespace
openshift-operators, and can manage instances in any namespace. - Manage instances only in a single namespace. Select A specific namespace on the
cluster. The operator is deployed into the specified namespace, and cannot manage instances in any other namespace.Note: Installing different versions of the Event Endpoint Management operator in different namespaces on the same cluster is not supported.
- Manage Event Gateway instances in any namespace.
Select All namespaces on the cluster (default).
- Set Update approval to Manual.Important: The Update approval property applies to all operators in the namespace. If you are installing the operator in a shared namespace, then check with the administrators of the other software in that namespace to confirm that they use manual approval. If other software in the namespace requires automatic update approval, then do not install the Event Endpoint Management operator in that namespace; create a dedicated namespace for the Event Endpoint Management operator where Update approval is set to manual.
- Click Install to begin the installation.
To install the operator by using the OpenShift Container Platform CLI, complete the following steps:
- Log in to your Red Hat OpenShift Container Platform CLI (
oc login). -
Change to the namespace where you want to install the operator.
- If you are installing the operator to manage Event Gateway instances in all namespaces, then use the
openshift-operatorsnamespace:oc project openshift-operators - If you want the operator to manage Event Gateway
instances in a single namespace only, then specify that
namespace.
oc project <target-namespace>Note: Installing different versions of the Event Endpoint Management operator in different namespaces on the same cluster is not supported.
- If you are installing the operator to manage Event Gateway instances in all namespaces, then use the
-
If you are installing the operator to manage a single namespace (if you are not using the
openshift-operatorsnamespace), then check whether an existingOperatorGroupexists in your target namespace:
If anoc get OperatorGroupOperatorGroupexists, then continue to the next step to create aSubscription.If anOperatorGroupdoes not exist, then create one as follows:- Create a file called operator-group.yaml and paste in the following
content, replacing
<target-namespace>with your namespace:apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: ibm-eventautomation-operatorgroup namespace: <target-namespace> spec: targetNamespaces: - <target-namespace> - Create the
OperatorGroupby applying the file:oc apply -f operator-group.yaml
- Create a file called operator-group.yaml and paste in the following
content, replacing
-
Create a
Subscriptionfor the Event Endpoint Management operator as follows:- Create a file called subscription.yaml and paste in the following
contents:
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: ibm-eventendpointmanagement namespace: <target-namespace> spec: channel: v11.6 installPlanApproval: Manual name: ibm-eventendpointmanagement source: <catalog-source-name> sourceNamespace: openshift-marketplaceReplace the placeholder values as follows:-
<target-namespace>is the namespace where you want to install the Event Endpoint Management operator.Set
<target-namespace>toopenshift-operatorsif you want the operator to manage Event Gateway instances in all namespaces. Set<target-namespace>to your Event Gateway namespace if you want the operator to manage only gateways in that namespace. -
<catalog-source-name>is the name of the catalog source that was created for this operator.Set this property to
ibm-eventendpointmanagement-catalogwhen you are using a CASE bundle, oribm-operator-catalogif the source is the IBM Operator Catalog.
-
- Create the subscription by applying the subscription.yaml
file:
oc apply -f subscription.yaml
- Create a file called subscription.yaml and paste in the following
contents:
Checking the operator status
- Expand the Operators dropdown and select Installed Operators.
- Expand the Project dropdown and select the project (namespace) that the
operator is installed in. Note: If the operator is installed in the
openshift-operatorsnamespace, then it appears under any selected project. If you select all projects, then the operator is shown multiple times in the resulting list (once for each project). - Click the operator called IBM Event Endpoint Management.
- Scroll down to the ClusterServiceVersion details section of the page.
- Check the Status field. After the operator is successfully installed, the
status shows
Succeeded.
oc get csvThe command returns a list of
installed operators. The installation is successful if the value in the PHASE
column for your Event Endpoint Management operator is
Succeeded.