Search

Chapter 7. Deploying the virtual database

download PDF

After you assemble your CR, the next step is to feed it to the Data Virtualization Operator to build and deploy the virtual database.

Prerequisites

Before you can use deploy the virtual database, you must have:

Procedure

  1. Open a terminal window to the 01-base-example directory in your local Teiid-Openshift-Examples respository, which contains the porfolio.yaml files.
  2. If you have not yet done so, open the file in a text editor and add the API key for the stock quote service in the Schema:Portfolio section. For more information, see the example in Section 6.1.2.6, “Virtual schema definition”
  3. Type the following command:

    oc create -f portfolio.yaml

    The command returns the following response:

    virtualdatabase.teiid.io/portfolio created

    At this stage, the virtual database is created, but it’s not yet running.

    The initial deployment can take five or more minutes. The first time that you use the Operator to deploy a virtual database in a project, the Operator must build a base image, which takes extra time. Subsequent deployments take less time, because the base image that you create is reused.

  4. Run the following command to check the build status:

    oc get vdb portfolio -o yaml | grep phase

    The build process runs through several phases. When you check the status, you might see any of the following responses:

    phase: Ready For S2I
    
    phase: Building Base Builder Image
    
    phase: Building Service Image
    
    phase: Deploying
    
    phase: Running

While you’re waiting, if you skipped the section that describes how to create the virtual database CR, now is a good time to go back and review it. When you run the preceding command again, if the build status reports that the phase is Running, you’re ready to move on to the next step.

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.