Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 3.05 KB

File metadata and controls

104 lines (75 loc) · 3.05 KB

Deploy a GraalVM application using a container image

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure Container Registry
  3. Build and push a GraalVM application to ACR
  4. Create settings.xml using admin access keys
  5. Create an Azure App Service Plan

Deploy the GraalVM application using a container image

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

Properties supported by the example

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

Cleanup

Do NOT forget to remove the resources once you are done running the example.

3m