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.

Prerequisites

  • 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.

Additional resources

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.

Procedure

  1. 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
  2. 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
  3. 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_

    For example,

    oc create secret docker-registry dv-pull-secret --docker-server=registry.redhat.io --docker-username=yourname@example.com --docker-password='xxxxxxxxxx' --docker-email=yourname@example.com
    Note

    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.

Prerequisites

Procedure

  1. Sign in to the OpenShift console.
  2. Click Operators > OperatorHub to open the OperatorHub.
  3. 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.

  4. Locate the Operator with the name Red Hat Integration - Data Virtualization

    Tip

    In the Filter by keyword field, type dv to show the available Data Virtualization Operators.

  5. 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.

  6. Click Install to open the Create Operator Subscription page.
  7. Click Subscribe to install the Operator. The Installed Operators page shows the status of the installation.
  8. After the status of the Operator installation changes to Succeeded, you are ready to link the pull secret to the Operator service account.

5.3. Linking the pull secret to the Data Virtualization Operator service account

Before we can create a virtual database, we must link the pull secret that we created earlier to the Operator service account.

Prerequisites

Procedure

  1. Sign in to the OpenShift console.
  2. Click Workloads > Pods to check the status of the Operator pod.
  3. When the status of the pod reports that it is Running, open a terminal window, and type the following command:

    oc secrets link dv-operator dv-pull-secret --for=pull

    Be sure that the name of the Operator (dv-operator in the preceding command) matches the name of the Operator that you installed.

    The command does not return any output, unless it fails. If the command fails, verify that you added the Operator to the same project where you created the secret, for example, dv-tutorial.

We are now ready to create a virtual database instance.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.