Skip to content

Commit

Permalink
deploy-azure.sh: update usage and mandatory args check
Browse files Browse the repository at this point in the history
  • Loading branch information
gitri-ms committed Aug 8, 2023
1 parent cd7857e commit 75291fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/deploy/deploy-azure.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#
.SYNOPSIS
Deploy CopilotChat Azure resources
Deploy Chat Copilot Azure resources
#>

param(
Expand Down
9 changes: 5 additions & 4 deletions scripts/deploy/deploy-azure.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

# Deploy CopilotChat Azure resources.
# Deploy Chat Copilot Azure resources.

set -e

usage() {
echo "Usage: $0 -d DEPLOYMENT_NAME -s SUBSCRIPTION -c WEBAPI_CLIENT_ID -ai AI_SERVICE_TYPE -aikey AI_SERVICE_KEY [OPTIONS]"
echo "Usage: $0 -d DEPLOYMENT_NAME -s SUBSCRIPTION -c WEBAPI_CLIENT_ID -t AZURE_AD_TENANT_ID -ai AI_SERVICE_TYPE -aikey AI_SERVICE_KEY [OPTIONS]"
echo ""
echo "Arguments:"
echo " -d, --deployment-name DEPLOYMENT_NAME Name for the deployment (mandatory)"
Expand All @@ -20,7 +20,8 @@ usage() {
echo " -wr, --web-app-region WEB_APP_REGION Region to deploy to the static web app into. This must be a region that supports static web apps. (default: \"West US 2\")"
echo " -a, --app-service-sku WEB_APP_SVC_SKU SKU for the Azure App Service plan (default: \"B1\")"
echo " -i, --instance AZURE_AD_INSTANCE Azure AD cloud instance for authenticating users"
echo " (default: \"https://login.microsoftonline.com/\")" echo " -ms, --memory-store Method to use to persist embeddings. Valid values are"
echo " (default: \"https://login.microsoftonline.com/\")"
echo " -ms, --memory-store Method to use to persist embeddings. Valid values are"
echo " \"AzureCognitiveSearch\" (default), \"Qdrant\" and \"Volatile\""
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"
Expand Down Expand Up @@ -121,7 +122,7 @@ while [[ $# -gt 0 ]]; do
done

# Check mandatory arguments
if [[ -z "$DEPLOYMENT_NAME" ]] || [[ -z "$SUBSCRIPTION" ]] || [[ -z "$WEBAPI_CLIENT_ID" ]] || [[ -z "$AI_SERVICE_TYPE" ]]; then
if [[ -z "$DEPLOYMENT_NAME" ]] || [[ -z "$SUBSCRIPTION" ]] || [[ -z "$WEBAPI_CLIENT_ID" ]] || [[ -z "$AZURE_AD_TENANT_ID" ]] || [[ -z "$AI_SERVICE_TYPE" ]]; then
usage
exit 1
fi
Expand Down

0 comments on commit 75291fe

Please sign in to comment.