If you plan to use Retrieval-Augmented Generation (RAG) with VMware Private AI Foundation with NVIDIA, set up a PostgreSQL database with pgvector by using VMware Data Services Manager.

You can create the database manually or create a self-service catalog in VMware Aria Automation that can be used by DevOps engineers and developers.

Prerequisites

Procedure

  1. Deploy a PostgreSQL database in the VI workload domain and get the connection string for the database.
    Deployment Workflow Description
    Deploy and get the connection string of a PostgreSQL database from the VMware Data Services Manager Console. See Creating Databases and Connecting to a Database.
    Deploy and get the connection string of a PostgreSQL database by using the kubectl command See Enabling Self-Service Consumption of VMware Data Services Manager.
    Deploy and get the connection string of a PostgreSQL database from VMware Aria Automation See Deploying a Vector Database by Using a Self-Service Catalog Item in VMware Aria Automation.
    The connection string of the deployed database has the following format.
    postgres://pgvector_db_admin:encoded_pgvector_db_admin_password@pgvector_db_ip_address:5432/pgvector_db_name
  2. Activate the pgvector extension on the database by using the psql command line utility.
    1. Connect to the database.
      psql -h pgvector_db_ip_address -p 5432 -d pgvector_db_name -U pgvector_db_admin -W
    2. Activate the pgvector extension.
      pgvector_db_name=# CREATE EXTENSION vector;

Deploying a Vector Database by Using a Self-Service Catalog Item in VMware Aria Automation

Data scientists and DevOps engineers can use VMware Aria Automation to provision a PostgreSQL database with pgvector extension in the VI workload domain dedicated for your AI workloads.

Create a Vector Database Catalog Item in VMware Aria Automation

As a cloud administrator, add a catalog item for provisioning databases in VMware Data Services Manager to Service Broker in VMware Aria Automation.

Prerequisites

  • Verify that you have VMware Data Services Manager 2.0.2 deployed.
  • Provide a machine that has Python 3.10 installed and has access to the VMware Data Services Manager and VMware Aria Automation instances.

Procedure

  1. On the machine running Python, download the AriaAutomation_DataServicesManager bundle for VMware Data Services Manager 2.0.2 from VMware Tanzu Network and extract its content.
  2. Update the config.json file in the folder where you extracted the bundle with the URLs and user credentials for VMware Data Services Manager and VMware Aria Automation.
    Optionally, you can also set the name of the catalog item, Automaton Assembler project, and other parameters.
  3. To create the catalog items in VMware Aria Automation, run the aria.py Python script in the following way.
    python3 aria.py enable-blueprint-version-2

Results

The Python script creates items in VMware Aria Automation that are required for using VMware Data Services Manager for database provisioning. See the readme.md file in the AriaAutomation_DataServicesManager bundle

Deploy a Vector Database by Using a Self-Service Catalog Item in VMware Aria Automation

In VMware Private AI Foundation with NVIDIA, as data scientist or a DevOps engineer, you can deploy a vector database from VMware Aria Automation by using a self-service catalog item in Automation Service Broker.

Prerequisites

Verify with your cloud administrator that the prerequisites for creating a PostgreSQL database are in place. See Creating Databases.

Procedure

  1. Log in to VMware Aria Automation and, in Automation Service Broker, locate the catalog item for database deployment according to the information from your cloud administrator.
    By default, the catalog item is called DSM DBaaS.
  2. In the catalog item card, click Request and enter the details for the new PostgreSQL database.
    For more information on the settings for the database, see Creating Databases.
  3. Get the connection string of the deployed database.
    1. In Automation Service Broker, click Deployments > Deployments .
    2. Select the deployment entry for the database.
    3. On the Topology tab, select the cloud template for the database deployment and from the Actions menu for the template, select Get Connection String.

Results

For more information on provisioning and performing operations on databases in VMware Data Services Manager from VMware Aria Automation, see the readme.md file in the AriaAutomation_DataServicesManager bundle and the blog post on Data Services Manager v2.0.2 Integration with VMware Aria Automation Integration.