이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 7. Deploying the virtual database
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:
- Set up your environment as described in Chapter 4, Setting up the environment.
Procedure
- 
					Open a terminal window to the 01-base-exampledirectory in your local Teiid-Openshift-Examples respository, which contains theporfolio.yamlfiles.
- 
					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:Portfoliosection. For more information, see the example in Section 6.1.2.6, “Virtual schema definition”
- Type the following command: - oc create -f portfolio.yaml - oc create -f portfolio.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The command returns the following response: - virtualdatabase.teiid.io/portfolio created - virtualdatabase.teiid.io/portfolio created- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 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. 
- Run the following command to check the build status: - oc get vdb portfolio -o yaml | grep phase - oc get vdb portfolio -o yaml | grep phase- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The build process runs through several phases. When you check the status, you might see any of the following responses: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
			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.