#The following variables will be used within the scope of the commands illustrated below:
RG=<your-resource-group-name>
AASC=<your-aasc-name>
LOC=<your-aasc-location>
#Create the resource group for the services for your AASC
az group create \
-l $LOC \
-n <your-aasc-rg>
#Create your AASC App Service Plan with Container on Linux support
az appservice plan create \
-g $RG \
-n $AASC \
-l $LOC \
--is-linux
#Optional parameters and default values for "az container create":
#--sku B1
#--number-of-workers 1
#Create your AASC Web App
az webapp create \
-n $AASC \
-g $RG \
--plan $AASC \
-i <dockerhub-username>/nodejs-helloworld
#Set ACR credentials
az webapp config container set \
-n $AASC \
-g $RG \
-i <your-acr>.azurecr.io/nodejs-helloworld \
-u <your-acr-user> \
-r <your-acr>.azurecr.io \
-p <your-acr-password>
#Set appsettings
az webapp config appsettings set \
-g $RG \
-n $AASC \
--settings CONTAINER_HOST=AASC
#Optional connectionstrings settings could be set as well using: "az webapp config connection-string set"
#Restart your AASC (it could be one of the ways to update your webapp if you are referencing the latest tag for example)
az webapp restart \
-n $AASC \
-g $RG
#Configure logging for your AASC.
az webapp log config \
-n $AASC \
-g $RG \
--docker-container-logging filesystem
#Get the logs of your AASC as a zip file
az webapp log download \
-n $AASC \
-g $RG
#Start live log tracing for your AASC
az webapp log tail \
-n $AASC \
-g $RG
#Scale up your AASC (change the sku/price)
az appservice plan update \
--sku S1 \
-n $AASC
#Scale out your AASC (increase the number of instances/workers)
#Rk: the price won't be the same, it will be multiply by X if X is the number-of-workers
az appservice plan update \
--number-of-workers 2 \
-n $AASC
#Delete your AASC plan (you could save some $$)
az appservice plan delete \
--name $AASC \
--resource-group $RG