Skip to content

Latest commit

 

History

History
298 lines (196 loc) · 13.2 KB

File metadata and controls

298 lines (196 loc) · 13.2 KB

Quick Start Guide

This Quick Start Guide helps administrators and developers with installing, and accessing the OpenShift Database Access service. The OpenShift Database Access operator enables you to do the following:

  • Easy consumption of database-as-a-service (DBaaS) offerings from partners including Crunchy Bridge, CockroachDB, and Amazon’s Relational Database Services (RDS) directly from managed OpenShift clusters.

  • Easy management, monitoring, and control by administrators of cloud-hosted DBaaS including consumption, usage, and status.

Installing the OpenShift Database Access operator

The OpenShift Database Access operator allows you to configure a connection to cloud-database providers, create new database instances, and connect database instances to applications for developers to use.

Prerequisites
  • Either OpenShift Container Platform or Origin Kubernetes Distribution (OKD) 4.10 or higher.

Procedure
  1. From the OpenShift console home page, expand the Operators menu, and click OperatorHub.

  2. On the OperatorHub page, type dbaas in the filter field to find the OpenShift Database Access operator.

  3. Click on the OpenShift Database Access operator tile, and click the Install button.

  4. On the Install Operator page, review the install strategy, and click the *Install button.

  5. After the installation process completes, an alert message tells you the status of the installation. If successful, an alert message asks you refresh the OpenShift web console to the latest version. After the web console refresh, you have a new Data Services category on the navigational menu. If failure, a message displays the installation error to help you investigate the problem.

Additional resources
  • For more information about OpenShift Database Access, see the Reference Guide.

Accessing the Database Access menu for configuring and monitoring

From the OpenShift console, you can access the OpenShift Database Access navigation menu. On the Database Access page, use the appropriate project namespace for importing a cloud-database provider account.

ℹ️

After creating a DBaaSPolicy as a non-administrative user, on the Operator details page, under the Provider Account Policy section, you will see a restricted access message. By selecting Current namespace only option, you can view the policies.

Prerequisites
Procedure
  1. Log into the OpenShift console.

  2. Use the correct project namespace by following these sub-steps:

    Single page screenshot of the administrator’s entry point
    1. Select the Administrator perspective First callout.

    2. Expand the Data Services navigation menu, and click Database Access Second callout.

      ℹ️
      You might need to scroll down the navigation menu.
    3. Click the Project dropdown menu and then enable the Show default projects switch Third callout.

    4. Type dbaas in the search field.

    5. Select openshift-dbaas-operator project namespace Fourth callout.

  3. From the database inventory page you get a snapshot of the database environment. You can import a cloud-hosted database provider account, and create a new database instance by clicking the Configuration menu.

    Database inventory landing page
Additional Resources
  • For more information about OpenShift Database Access, see the Reference Guide.

Accessing the developer workspace and adding a database instance

You can access the developer workspace in the OpenShift console to manage connectivity for database instances to applications.

Prerequisites
  • Installation of the OpenShift Database Access operator.

  • Import at least one cloud-database provider account.

Procedure
  1. Log into the OpenShift console.

  2. Access the developer workspace to select an existing project or create a new project, and choose a cloud-hosted database provider to add to your project:

    Single page screenshot of the developer’s entry point
    1. Select the Developer perspective First callout.

    2. Click the Project dropdown menu Second callout.

    3. Create a new project or search for your application’s project Third callout.

    4. Click +Add Fourth callout.

    5. Click the Cloud-Hosted Databases tile to connect to a cloud-database provider Fifth callout.

  3. Click on your cloud-hosted database provider’s tile.

  4. Select a previously configured Provider Account for this database instance from the dropdown menu.

  5. Select the database instance ID you want to use, and click Add to Topology.

  6. Click Continue. Upon a successful connection, you go to the Topology page.

Additional resources
  • For more information about OpenShift Database Access, see the Reference Guide.

Connecting an application to a database instance using the topology view

You can add a database to an application by making a connection to the database instance from the cloud-database provider. On the Topology page, you see the application pod, along with a representation of the connection of the database instance.

Prerequisites
  • Installation of the OpenShift Database Access operator.

  • Import at least one cloud-database provider account.

Procedure
  1. When hovering the cursor over the deployment node, you can drag the arrow from the application to the new database instance to create a binding connector. You can also right-click on the deployment node, and click Create Service Binding to create a binding connector.

    The topology view of the application and the database with a dotted line arrow indicating database binding in the process of being dragged from the database to the application
  2. On the pop-up dialog, click Create. Once the binding is created, the application pod restarts. After the application pod restarts, your application now has database connectivity.

    The topology view of the application and the database with a solid line arrow indicating database binding to the application is complete

    This binding visually represents the injection of database connection information and credentials into the application pod.

  3. Use a service binding library based on your application’s framework to consume the service binding information and credentials.

Additional Resources
  • See the OpenShift Database Access Reference Guide for more details on service bindings, and for working application examples by using the service binding libraries.

Appendix A: Find your Crunchy Data Bridge account credentials

You need the Public API Key, and the Private API Secret to create a provider account resource for Crunchy Data Bridge.

Procedure
  1. From the Crunch Data Bridge Log in page, sign in to your account.

  2. From your personal account home page, click Settings, and then click Settings from the navigation menu.

    Crunchy Data Bridge settings on the navigation menu
  3. Copy the Application ID and Application Secret values for the import provider account fields.

    Crunchy Data Bridge API key and secret values

Appendix B: Find your CockroachDB account credentials

You need the API Key to create a provider account resource for CockroachDB.

Currently, access to the Service Accounts tab on the Access Management page is enabled by invite only from CockroachDB. To expose the Service Accounts tab on the Access Management page, you can request that this feature be enabled. Contact CockroachDB support and ask for the Cloud API to be enabled in the CockroachDB Cloud Console for your user account.

Additionally, you can view this quick video tutorial from Cockroach Labs on creating an account.

Procedure
  1. From the CockroachDB service account page, log in to your account.

  2. From your service account home page, select Access from the navigation menu.

  3. Click Service Accounts from the Access Management page.

  4. Click Create Service Account.

  5. Enter an Account name, select the Permissions, and click Create.

    Step 1 for creating a service account
  6. Enter an API key name, and click Create.

    Step 2 for creating a service account
  7. Copy the Secret key for the import provider account field, and click Done.

    Step 3 for creating a service account

Appendix C: Find your Amazon RDS account credentials

You need an Amazon Web Services (AWS) Access key ID, an AWS Secret access key, and know which AWS Region you are using to import an Amazon Relational Database Service (RDS) provider account for OpenShift Database Access. If you lose your AWS Access key ID, and your AWS Secret access key, new ones must be created.

ℹ️

Amazon only allows two secret access keys for each user. You might need to deactivate unused keys, or delete lost keys before you can create a new access key.

You are limited to one Amazon RDS provider account per OpenShift cluster. Using your AWS credentials on more than one OpenShift cluster breaks established connections on all OpenShift clusters, except for the last OpenShift cluster that established a connection.

OpenShift Database Access only supports RDS database instance deployments, and does not support database cluster deployments.
Database instances using a custom Oracle or custom SQL Server engine type are not supported.
Prerequisites
Procedure
  1. Sign in to Amazon’s Identity and Access Management (IAM) console with your AWS user account.

  2. From the IAM console home page, expand the Access management menu, and click Users.

  3. Select a user from the list.

  4. On the user’s summary page, select the Security credentials tab, and click the Create access key button.

  5. Copy the AWS Access key ID, and the AWS Secret access key.