Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.07 KB

File metadata and controls

63 lines (43 loc) · 2.07 KB

Solution deployment

Prerequisites

  • Owner on Azure subscription
  • Account approved for Azure OpenAI service
  • Azure CLI installed
  • Azure PowerShell installed

Clone the repository

Create a folder to house the repository. Open a terminal and navigate to the folder. Clone the repository, then navigate to the Labs/deploy folder within the repository.

git clone https://github.com/AzureCosmosDB/Azure-OpenAI-Python-Developer-Guide.git

cd Azure-OpenAI-Python-Developer-Guide
cd diskann
cd Labs
cd deploy

Open the azuredeploy.parameters.json file, and inspect the values, modify as deemed appropriate. When the Azure Bicep template is deployed, this parameters file will be used to configure the Mongo DB Password and other parameters when provisioning the Azure resources.

Login to Azure

Open a terminal window and log in to Azure using the following command:

Connect-AzAccount

Set the desired subscription (Optional)

If you have more than one subscription associated with your account, set the desired subscription using the following command:

Set-AzContext -SubscriptionId <subscription-id>

Create resource group

New-AzResourceGroup -Name cosmos-devguide-rg -Location 'eastus2'

Deploy using bicep template

Deploy the solution resources using the following command (this will take a few minutes to run):

New-AzResourceGroupDeployment -ResourceGroupName cosmos-devguide-rg -TemplateFile .\azuredeploy.bicep -TemplateParameterFile .\azuredeploy.parameters.json -c

Enable Vector Search Feature: This Azure Bicep template will automatically enable the "Vector Search" feature within Azure Cosmos DB for NoSQL.

If it's not enabled, this Azure PowerShell command can be run to enable it on an Azure Cosmos DB for NoSQL Account:

Update-AzCosmosDBAccount -ResourceGroupName <resource-group-name> -Name <account-name> -Capabilities @{name="EnableNoSQLVectorSearch"}