This example assumes you have previously completed the following examples:
- Create an Azure Resource Group
- Create an Azure Container Registry
- Build and push a GraalVM application to ACR
- Create settings.xml using admin access keys
- Create an Azure App Service Plan
To deploy the example use the following command lines:
export APPSERVICE_CONTAINER_GRAALVM=appservice-container-graalvm-$RANDOM
mvn azure-webapp:deploy \
--settings=$SETTINGS_XML \
-DappName=$APPSERVICE_CONTAINER_GRAALVM \
-DimageName=$ACR_GRAALVM_IMAGE \
-DappServicePlan=$APPSERVICE_PLAN \
-DresourceGroup=$RESOURCE_GROUP \
-DserverId=$ACR_NAME
echo `az webapp show \
--resource-group $RESOURCE_GROUP \
--name $APPSERVICE_CONTAINER_GRAALVM \
--query 'hostNames[0]' \
--output tsv`/hello
Then open your browser to the URL shown as output and you should see:
Hello
The example supports the following properties that you can pass in as -Dname=value to the Maven command line to customize your deployment.
name | description |
---|---|
appName |
the application name |
appServicePlan |
the App Service plan to use |
imageName |
the image name |
registry |
the Azure Container Registry name |
registryUrl |
the Azure Container Registry url |
resourceGroup |
the Azure Resource Group name |
serverId |
the Maven server id |
Do NOT forget to remove the resources once you are done running the example.
3m