-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from smurawski/azd_support
Azd support and prepare playwright for testing store front too.
- Loading branch information
Showing
8 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
$services=@("ai-service", "makeline-service", "order-service", "product-service", "store-admin", "store-front", "virtual-customer", "virtual-worker") | ||
|
||
if (($env:DEPLOY_AZURE_CONTAINER_REGISTRY -like "true") -and ($env:BUILD_CONTAINERS -like "true")) { | ||
echo "Build container images" | ||
foreach ($service in $services) { | ||
echo "Building aks-store-demo/${service}:latest" | ||
az acr build --registry $env:AZURE_REGISTRY_NAME --image aks-store-demo/${service}:latest ./src/${service}/ | ||
} | ||
} | ||
elseif (($env:DEPLOY_AZURE_CONTAINER_REGISTRY -like "true") -and ($env:BUILD_CONTAINERS -like "false")) { | ||
echo "Import container images" | ||
foreach ($service in $services) { | ||
echo "Importing aks-store-demo/${service}:latest" | ||
az acr import --name $env:AZURE_REGISTRY_NAME --source ghcr.io/azure-samples/aks-store-demo/${service}:latest --image aks-store-demo/${service}:latest | ||
} | ||
} | ||
else { | ||
echo "No BUILD_CONTAINERS variable set, skipping container build/import" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
echo "Retrieving cluster credentials" | ||
az aks get-credentials --resource-group $env:AZURE_RESOURCEGROUP_NAME --name $env:AZURE_AKS_CLUSTER_NAME --overwrite-existing | ||
|
||
$makelineUseSqlApi = "false" | ||
if ($env:AZURE_DATABASE_API -eq "cosmosdbsql") { | ||
$makelineUseSqlApi = "true" | ||
} | ||
|
||
echo "Deploy Helm chart" | ||
helm upgrade aks-store-demo ./charts/aks-store-demo ` | ||
--install ` | ||
--set aiService.create=true ` | ||
--set aiService.modelDeploymentName=$env:AZURE_OPENAI_MODEL_NAME ` | ||
--set aiService.openAiEndpoint=$env:AZURE_OPENAI_ENDPOINT ` | ||
--set aiService.managedIdentityClientId=$env:AZURE_IDENTITY_CLIENT_ID ` | ||
--set aiService.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/ai-service ` | ||
--set orderService.useAzureServiceBus=true ` | ||
--set orderService.queueHost=$env:AZURE_SERVICE_BUS_HOST ` | ||
--set orderService.queuePort=5671 ` | ||
--set orderService.queueUsername=$env:AZURE_SERVICE_BUS_SENDER_NAME ` | ||
--set orderService.queuePassword=$(az keyvault secret show --name $env:AZURE_SERVICE_BUS_SENDER_KEY --vault-name $env:AZURE_KEY_VAULT_NAME --query value -o tsv) ` | ||
--set orderService.queueTransport=tls ` | ||
--set orderService.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/order-service ` | ||
--set makelineService.useAzureCosmosDB=true ` | ||
--set makelineService.orderQueueUri=$env:AZURE_SERVICE_BUS_URI ` | ||
--set makelineService.orderQueueUsername=$env:AZURE_SERVICE_BUS_LISTENER_NAME ` | ||
--set makelineService.orderQueuePassword=$(az keyvault secret show --name $env:AZURE_SERVICE_BUS_LISTENER_KEY --vault-name $env:AZURE_KEY_VAULT_NAME --query value -o tsv) ` | ||
--set makelineService.orderDBUri=$env:AZURE_COSMOS_DATABASE_URI ` | ||
--set makelineService.orderDBUsername=$env:AZURE_COSMOS_DATABASE_NAME ` | ||
--set makelineService.orderDBPassword=$(az keyvault secret show --name $env:AZURE_COSMOS_DATABASE_KEY --vault-name $env:AZURE_KEY_VAULT_NAME --query value -o tsv) ` | ||
--set makelineService.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/makeline-service ` | ||
--set productService.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/product-service ` | ||
--set storeAdmin.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/store-admin ` | ||
--set storeFront.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/store-front ` | ||
--set virtualCustomer.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/virtual-customer ` | ||
--set virtualWorker.image.repository=$env:AZURE_REGISTRY_URI/aks-store-demo/virtual-worker ` | ||
--set makelineService.useSqlApi=$makelineUseSqlApi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
echo "Ensuring Azure CLI extensions and dependencies are installed" | ||
az provider register --namespace Microsoft.ContainerService | ||
az feature register --namespace Microsoft.ContainerService --name AKS-KedaPreview | ||
az feature register --namespace Microsoft.ContainerService --name AKS-PrometheusAddonPreview | ||
az feature register --namespace Microsoft.ContainerService --name EnableWorkloadIdentityPreview | ||
az feature register --namespace Microsoft.ContainerService --name NetworkObservabilityPreview | ||
az extension add --upgrade --name aks-preview | ||
az extension add --upgrade --name amg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,38 @@ metadata: | |
template: [email protected] | ||
hooks: | ||
preprovision: | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/preprovision.sh | ||
posix: | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/preprovision.sh | ||
windows: | ||
shell: pwsh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/preprovision.ps1 | ||
postprovision: | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/postprovision.sh | ||
posix: | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/postprovision.sh | ||
windows: | ||
shell: pwsh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/postprovision.ps1 | ||
predeploy: # This is a hack until Helm is supported in azd (https://github.com/Azure/azure-dev/issues/1618) | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/predeploy.sh | ||
posix: | ||
shell: sh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/predeploy.sh | ||
windows: | ||
shell: pwsh | ||
continueOnError: false | ||
interactive: false | ||
run: azd-hooks/predeploy.ps1 | ||
infra: | ||
provider: terraform | ||
path: infra/terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters