Chapter 5. Adding the Data Virtualization Operator to the project
Virtual databases are built and deployed by an OpenShift Operator. Before we can proceed, we must add the Data Virtualization Operator to our OpenShift project.
In this section we’ll complete the following tasks:
- Add our credentials to a pull secret so that we can access certified container images from Red Hat.
- Install the Data Virtualization Operator.
- Link the pull secret the Operator service account.
- You cloned or downloaded local copies of the resources in the tutorial repository as described in Section 4.1, “Cloning the tutorial resources”.
- You have access to an OpenShift Container Platform cluster using an account with cluster-admin permissions.
For more information about Operators, see the OpenShift documentation.
5.1. Creating a docker-registry pull secret
The Data Virtualization Operator that we’ll use to create our virtual database is available in the OpenShift OperatorHub. Before we can access software in the OperatorHub, we must first create a pull secret of type
docker-registry in our OpenShift project. Adding our credentials to the secret enables us to retrieve the latest Data Virtualization Operator image from Red Hat.
Use the OpenShift CLI to sign into your OpenShift environment with administrator privileges.
For example, from a terminal window, type the following OpenShift CLI command:
oc login -u system:admin https://openshift.cluster-xyz.example.com:6443
Create the project where you want to add your data virtualization.
For example, to create a project with the name
dv-tutorial, type the following command:
oc new-project dv-tutorial
Create a docker-registry secret to enable you to retrieve secured container images from Red Hat.Note
Instead of using your Red Hat account username and password to create the secret, you use a registry service account to create an authentication token.
Type the following command:
oc create secret docker-registry dv-pull-secret --docker-server=registry.redhat.io \ --docker-username=_CUSTOMER_PORTAL_USERNAME_ \ --docker-password=_CUSTOMER_PORTAL_PASSWORD_ \ --docker-email=_EMAIL_ADDRESS_
oc create secret docker-registry dv-pull-secret --docker-server=registry.redhat.io --email@example.com --docker-password='xxxxxxxxxx' --firstname.lastname@example.orgNote
You must create a docker-registry secret in every project namespace where the image streams reside and which use registry.redhat.io.
We’re now ready to install the Data Virtualization Operator.
5.2. Installing the Data Virtualization Operator in your project
The Data Virtualization Operator automates tasks related to deploying a virtual database. We’ll install the Data Virtualization Operator into the OpenShift project that we set up for the tutorial. After it’s installed, the Operators is available only in this project namespace, so we won’t be able to use it from other projects in the cluster.
If we want to create virtual databases in other projects, we’ll have to install the Operator in each one of them. For more information about Operators, see the OpenShift documentation.
We’ll install the Operator from the OpenShift console.
- Access to an OpenShift Container Platform cluster using an account with cluster-admin permissions.
- You created a registry pull secret as described in Section 5.1, “Creating a docker-registry pull secret”.
- Sign in to the OpenShift console.
- Click Operators > OperatorHub to open the OperatorHub.
From the Projects drop-down menu, click the name of the project where you added the docker-registry secret, for example dv-tutorial.Important
You must install the Operator in the project where you previously created the secret.
Locate the Operator with the name Red Hat Integration - Data VirtualizationTip
In the Filter by keyword field, type
dvto show the available Data Virtualization Operators.
Click Red Hat Integration - Data Virtualization.
Should there be multiple versions of the Operator, read the Operator description to decide which version is best for your environment.
- Click Install to open the Create Operator Subscription page.
- Click Subscribe to install the Operator. The Installed Operators page shows the status of the installation.
- After the status of the Operator installation changes to Succeeded, you are ready to link the pull secret to the Operator service account.