Skip to content

Latest commit

 

History

History
109 lines (79 loc) · 3.44 KB

File metadata and controls

109 lines (79 loc) · 3.44 KB

Deploy Payara using a container image

appservice/container-payara/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure Container Registry
  3. Push a Payara container image to Azure Container Registry
  4. Create settings.xml using admin access keys
  5. Create an Azure App Service Plan

Deploy Payara using a container image

To deploy Payara use the following command lines:

  export APPSERVICE_CONTAINER_PAYARA=appservice-container-payara-$RANDOM

  mvn azure-webapp:deploy \
    --settings=$SETTINGS_XML \
    -DappName=$APPSERVICE_CONTAINER_PAYARA \
    -DimageName=$ACR_PAYARA_IMAGE \
    -DappServicePlan=$APPSERVICE_PLAN \
    -DresourceGroup=$RESOURCE_GROUP \
    -DserverId=$ACR_NAME

  az webapp show \
    --resource-group $RESOURCE_GROUP \
    --name $APPSERVICE_CONTAINER_PAYARA \
    --query hostNames[0] \
    --output tsv

Then open your browser to the URL shown as output and you should see:

And this is served by a custom Payara using a container image coming from our 
own Azure Container Registry.

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 container image name
serverId the Maven server id
registry the Azure Container Registry name
registryUrl the Azure Container Registry url
resourceGroup the Azure Resource Group name

Cleanup

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

3m