Resource group: aca-demo
👉 Deploy App Configuration and Key Vault with ./deploy/deploy_kv.sh
👉 Deploy ACA Environment, Log Analytics and App Insights with commands in ./demos/demo1-single/commands.md
(link)
👉 Deploy container app with commands from ./demos/demo1-single/commands.md
(link)
Demonstrate:
- Container App is deployed
- Logs are streamed to Log Analytics
- Ingress is configured
- HTTP ingress
- TCP ingress requires a vnet
- There is one revision
- Making a change to the container results in a new revision
- change the container
tag
andenvironment variable
WELCOME
- change the container
- Explain single and multiple revision mode
- Enable multiple revisions
- Split traffic 50/50 between revisions
👉 Deploy worker with az containerapp up
(see ./worker/README.md
)
(link)
Example command:
az containerapp up -n worker -g $RG --environment $ENVNAME \
--source . -l westeurope
Demonstrate:
- Python image with the code is built by a new ACR instance
- Worker is deployed with image from ACR
- There is no ingress
- Look at the realtime logs and point out there are errors
- Look at the worker code in
app.py
- it needs an environment variable
AZURE_APPCONFIGURATION_ENDPOINT
- that variable needs the endpoint of the App Configuration instance
- show the App Configuration instance in the portal and the value to retrieve
- it needs an environment variable
- Demonstrate the use of Linked Services (preview)
- add the App Configuration instance as a linked service
- it configures
managed identity
and the environment variable - the environment variable gets it value from the Container App secret
- show the logs: useful work is done with the value 😉
Note: we can modify the source code and run az containerapp up
again to update the container app
👉 Deploy service bus with commands from ./demos/demo3-scale/commands.md
(link)
👉 Deploy container app with commands from ./demos/demo3-scale/commands.md
(link)
Deployment is done with Bicep:
RG=aca-demo
LOCATION=westeurope
az deployment group create --resource-group $RG --template-file ./main.bicep --parameters parLocation=$LOCATION
Demonstrate:
- Service Bus namespace is deployed and topic created (mytopic)
- Container App is deployed
- Dapr component is deployed and scoped to the container app
- There is no ingress
- Scaling is configured with a custom service bus topic scaler
- Show the logs, including the Dapr logs
- Send messages to the topic
👉 Deploy Cosmos DB with commands from ./demos/demo4-multi/commands.md
(link)
👉 Deploy frontend container app with commands from ./demos/demo4-multi/commands.md
(link)
👉 Deploy backend container app with commands from ./demos/demo4-multi/commands.md
(link)
Demonstrate:
- Cosmos DB is deployed with a container to save state with key/value pairs
- Dapr component is deployed and scoped to the container app
- Frontend is deployed with ingress
- Backend is deployed without ingress
- Frontend will call backend to store data in Cosmos DB
- Show the logs
- Start
app.py
to send messages to the front end
app.py
to work, you need the FQDN of the frontend container app:
Retrieve the FQDN from an Azure Container Apps with the Azure CLI:
RG=aca-demo
APPID=$(az containerapp show -g $RG -n frontend | jq .id -r)
export FQDN=$(az containerapp show --ids $APPID | jq .properties.configuration.ingress.fqdn -r)
Use the VS Code markdown command runner to run markdown code snippets in terminal.