Skip to content

Commit

Permalink
Remove Qdrant from webapi scripts and update default package zip file…
Browse files Browse the repository at this point in the history
…name (#1118)

### Motivation and Context
Qdrant deployed to Azure is not currently secured.

### Description
- Remove Qdrant from cloud deployment while securing work progresses
- Update payload package zipfile name.
  • Loading branch information
adrianwyatt committed May 19, 2023
1 parent 1b77a52 commit 224d2cf
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,20 @@ param(

[string]
# Package to deploy to web service
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip',
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip',

[string]
# SKU for the Azure App Service plan
$AppServiceSku = "B1",

[string]
# API key to access Semantic Kernel server's endpoints
$semanticKernelApiKey = "$([guid]::NewGuid())",
$SemanticKernelApiKey = "$([guid]::NewGuid())",

[switch]
# Don't deploy Qdrant for memory storage - Use volatile memory instead
$NoQdrant,
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# [switch]
# # Don't deploy Qdrant for memory storage - Use volatile memory instead
# $NoQdrant,

[switch]
# Don't deploy Cosmos DB for chat storage - Use volatile memory instead
Expand All @@ -73,6 +74,8 @@ param(
$DebugDeployment
)

$NoQdrant = $true # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.

$jsonConfig = "
{
`\`"name`\`": { `\`"value`\`": `\`"$DeploymentName`\`" },
Expand All @@ -83,7 +86,7 @@ $jsonConfig = "
`\`"plannerModel`\`": { `\`"value`\`": `\`"$PlannerModel`\`" },
`\`"packageUri`\`": { `\`"value`\`": `\`"$PackageUri`\`" },
`\`"appServiceSku`\`": { `\`"value`\`": `\`"$AppServiceSku`\`" },
`\`"semanticKernelApiKey`\`": { `\`"value`\`": `\`"$semanticKernelApiKey`\`" },
`\`"semanticKernelApiKey`\`": { `\`"value`\`": `\`"$SemanticKernelApiKey`\`" },
`\`"deployQdrant`\`": { `\`"value`\`": $(If (!($NoQdrant)) {"true"} Else {"false"}) },
`\`"deployCosmosDB`\`": { `\`"value`\`": $(If (!($NoSpeechServices)) {"true"} Else {"false"}) },
`\`"deploySpeechServices`\`": { `\`"value`\`": $(If (!($NoSpeechServices)) {"true"} Else {"false"}) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ usage() {
echo " -o, --aoai-key AZURE_OPENAI_API_KEY Azure OpenAI API key (mandatory)"
echo " -rg, --resource-group RESOURCE_GROUP Resource group to which to make the deployment (default: \"rg-\$DEPLOYMENT_NAME\")"
echo " -r, --region REGION Region to which to make the deployment (default: \"South Central US\")"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip')"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip')"
echo " -a, --app-service-sku APP_SERVICE_SKU SKU for the Azure App Service plan (default: \"B1\")"
echo " -k, --semker-server-api-key SEMKER_SERVER_API_KEY API key to access Semantic Kernel server's endpoints (default: random UUID)"
echo " -cm, --completion-model COMPLETION_MODEL Completion model to use (default: \"gpt-35-turbo\")"
echo " -em, --embedding-model EMBEDDING_MODEL Embedding model to use (default: \"text-embedding-ada-002\")"
echo " -pm, --planner-model PLANNER_MODEL Planner model to use (default: \"gpt-35-turbo\")"
echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
echo " -nc, --no-cosmos-db Don't deploy Cosmos DB for chat storage - Use volatile memory instead"
echo " -ns, --no-speech-services Don't deploy Speech Services to enable speech as chat input"
echo " -dd, --debug-deployment Switches on verbose template deployment output"
Expand Down Expand Up @@ -90,10 +91,11 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
-nq|--no-qdrant)
NO_QDRANT=true
shift
;;
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# -nq|--no-qdrant)
# NO_QDRANT=true
# shift
# ;;
-nc|--no-cosmos-db)
NO_COSMOS_DB=true
shift
Expand Down Expand Up @@ -131,10 +133,10 @@ az account set -s "$SUBSCRIPTION"

# Set defaults
: "${REGION:="South Central US"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/skaas.zip"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip"}"
: "${APP_SERVICE_SKU:="B1"}"
: "${SEMKER_SERVER_API_KEY:="$(uuidgen)"}"
: "${NO_QDRANT:=false}"
: "${NO_QDRANT:=true}" # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
: "${NO_COSMOS_DB:=false}"
: "${NO_SPEECH_SERVICES:=false}"
: "${COMPLETION_MODEL:="gpt-35-turbo"}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ param(

[string]
# Package to deploy to web service
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip',
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip',

[string]
# SKU for the Azure App Service plan
Expand All @@ -51,9 +51,10 @@ param(
# API key to access Semantic Kernel server's endpoints
$SemanticKernelApiKey = "$([guid]::NewGuid())",

[switch]
# Don't deploy Qdrant for memory storage - Use volatile memory instead
$NoQdrant,
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# [switch]
# # Don't deploy Qdrant for memory storage - Use volatile memory instead
# $NoQdrant,

[switch]
# Don't deploy Cosmos DB for chat storage - Use volatile memory instead
Expand All @@ -68,6 +69,8 @@ param(
$DebugDeployment
)

$NoQdrant = $true # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.

$jsonConfig = "
{
`\`"name`\`": { `\`"value`\`": `\`"$DeploymentName`\`" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ usage() {
echo " -o, --openai-api-key OPENAI_API_KEY OpenAI API key (mandatory)"
echo " -rg, --resource-group RESOURCE_GROUP Resource group to which to make the deployment (default: \"rg-\$DEPLOYMENT_NAME\")"
echo " -r, --region REGION Region to which to make the deployment (default: \"South Central US\")"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip')"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip')"
echo " -a, --app-service-sku APP_SERVICE_SKU SKU for the Azure App Service plan (default: \"B1\")"
echo " -k, --semker-server-api-key SEMKER_SERVER_API_KEY API key to access Semantic Kernel server's endpoints (default: random UUID)"
echo " -cm, --completion-model COMPLETION_MODEL Completion model to use (default: \"gpt-3.5-turbo\")"
echo " -em, --embedding-model EMBEDDING_MODEL Embedding model to use (default: \"text-embedding-ada-002\")"
echo " -pm, --planner-model PLANNER_MODEL Planner model to use (default: \"gpt-3.5-turbo\")"
echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
echo " -nc, --no-cosmos-db Don't deploy Cosmos DB for chat storage - Use volatile memory instead"
echo " -ns, --no-speech-services Don't deploy Speech Services to enable speech as chat input"
echo " -dd, --debug-deployment Switches on verbose template deployment output"
Expand Down Expand Up @@ -84,10 +85,11 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
-nq|--no-qdrant)
NO_QDRANT=true
shift
;;
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# -nq|--no-qdrant)
# NO_QDRANT=true
# shift
# ;;
-nc|--no-cosmos-db)
NO_COSMOS_DB=true
shift
Expand Down Expand Up @@ -125,10 +127,10 @@ az account set -s "$SUBSCRIPTION"

# Set defaults
: "${REGION:="South Central US"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/skaas.zip"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip"}"
: "${APP_SERVICE_SKU:="B1"}"
: "${SEMKER_SERVER_API_KEY:="$(uuidgen)"}"
: "${NO_QDRANT:=false}"
: "${NO_QDRANT:=true}" # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
: "${NO_COSMOS_DB:=false}"
: "${NO_SPEECH_SERVICES:=false}"
: "${COMPLETION_MODEL:="gpt-3.5-turbo"}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ param(

[string]
# Package to deploy to web service
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip',
$PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip',

[string]
# SKU for the Azure App Service plan
Expand All @@ -34,9 +34,10 @@ param(
# API key to access Semantic Kernel server's endpoints
$SemanticKernelApiKey = "$([guid]::NewGuid())",

[switch]
# Don't deploy Qdrant for memory storage - Use volatile memory instead
$NoQdrant,
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# [switch]
# # Don't deploy Qdrant for memory storage - Use volatile memory instead
# $NoQdrant,

[switch]
# Don't deploy Cosmos DB for chat storage - Use volatile memory instead
Expand All @@ -51,6 +52,8 @@ param(
$DebugDeployment
)

$NoQdrant = $true # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.

$jsonConfig = "
{
`\`"name`\`": { `\`"value`\`": `\`"$DeploymentName`\`" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ usage() {
echo " -s, --subscription SUBSCRIPTION Subscription to which to make the deployment (mandatory)"
echo " -rg, --resource-group RESOURCE_GROUP Resource group to which to make the deployment (default: \"rg-\$DEPLOYMENT_NAME\")"
echo " -r, --region REGION Region to which to make the deployment (default: \"South Central US\")"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip')"
echo " -p, --package-uri PACKAGE_URI Package to deploy to web service (default: 'https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip')"
echo " -a, --app-service-sku APP_SERVICE_SKU SKU for the Azure App Service plan (default: \"B1\")"
echo " -k, --semker-server-api-key SEMKER_SERVER_API_KEY API key to access Semantic Kernel server's endpoints (default: random UUID)"
echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# echo " -nq, --no-qdrant Don't deploy Qdrant for memory storage - Use volatile memory instead"
echo " -nc, --no-cosmos-db Don't deploy Cosmos DB for chat storage - Use volatile memory instead"
echo " -ns, --no-speech-services Don't deploy Speech Services to enable speech as chat input"
echo " -dd, --debug-deployment Switches on verbose template deployment output"
Expand Down Expand Up @@ -60,10 +61,11 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
-nq|--no-qdrant)
NO_QDRANT=true
shift
;;
# TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
# -nq|--no-qdrant)
# NO_QDRANT=true
# shift
# ;;
-nc|--no-cosmos-db)
NO_COSMOS_DB=true
shift
Expand Down Expand Up @@ -101,10 +103,10 @@ az account set -s "$SUBSCRIPTION"

# Set defaults
: "${REGION:="South Central US"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/skaas.zip"}"
: "${PACKAGE_URI:="https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip"}"
: "${APP_SERVICE_SKU:="B1"}"
: "${SEMKER_SERVER_API_KEY:="$(uuidgen)"}"
: "${NO_QDRANT:=false}"
: "${NO_QDRANT:=true}" # TODO: Temporarily disabling qdrant deployment while we secure its endpoint.
: "${NO_COSMOS_DB:=false}"
: "${NO_SPEECH_SERVICES:=false}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.15.31.15270",
"templateHash": "10231980115310819254"
"version": "0.17.1.54307",
"templateHash": "6073078329068131785"
}
},
"parameters": {
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"packageUri": {
"type": "string",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/skaas.zip",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip",
"metadata": {
"description": "Location of package to deploy as the web service"
}
Expand Down Expand Up @@ -107,7 +107,7 @@
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"apiVersion": "2022-09-01",
"name": "openAIDeployment",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -164,8 +164,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.15.31.15270",
"templateHash": "8624783622076748465"
"version": "0.17.1.54307",
"templateHash": "9633349434860720155"
}
},
"parameters": {
Expand Down Expand Up @@ -197,7 +197,7 @@
},
"packageUri": {
"type": "string",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/skaas.zip",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip",
"metadata": {
"description": "Location of package to deploy as the web service"
}
Expand Down Expand Up @@ -797,7 +797,7 @@
"outputs": {
"endpoint": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'openAIDeployment'), '2020-10-01').outputs.deployedUrl.value]"
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'openAIDeployment'), '2022-09-01').outputs.deployedUrl.value]"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.15.31.15270",
"templateHash": "9735786839376477539"
"version": "0.17.1.54307",
"templateHash": "2182493617068056816"
}
},
"parameters": {
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"packageUri": {
"type": "string",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/skaas.zip",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip",
"metadata": {
"description": "Location of package to deploy as the web service"
}
Expand Down Expand Up @@ -102,7 +102,7 @@
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"apiVersion": "2022-09-01",
"name": "openAIDeployment",
"properties": {
"expressionEvaluationOptions": {
Expand Down Expand Up @@ -159,8 +159,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.15.31.15270",
"templateHash": "8624783622076748465"
"version": "0.17.1.54307",
"templateHash": "9633349434860720155"
}
},
"parameters": {
Expand Down Expand Up @@ -192,7 +192,7 @@
},
"packageUri": {
"type": "string",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/skaas.zip",
"defaultValue": "https://skaasdeploy.blob.core.windows.net/api/semantickernelapi.zip",
"metadata": {
"description": "Location of package to deploy as the web service"
}
Expand Down Expand Up @@ -792,7 +792,7 @@
"outputs": {
"endpoint": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'openAIDeployment'), '2020-10-01').outputs.deployedUrl.value]"
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'openAIDeployment'), '2022-09-01').outputs.deployedUrl.value]"
}
}
}
Loading

0 comments on commit 224d2cf

Please sign in to comment.