Skip to content

Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster.

License

Notifications You must be signed in to change notification settings

majguo/arm-deployment-script-aks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster

Prerequisites

  1. You will need an Azure subscription. If you don't have one, you can get one for free for one year here.
  2. Install a Java SE implementation (for example, AdoptOpenJDK OpenJDK 8 LTS/OpenJ9).
  3. Install Maven 3.5.0 or higher.
  4. Install Docker for your OS.
  5. Install Azure CLI 2.0.75 or later.
  6. Install jq

Steps of deployment

  1. Checkout azure-javaee-iaas

    1. Change to directory hosting the repo project & run mvn clean install
  2. Checkout arm-ttk under the specified parent directory

  3. Checkout this repo under the same parent directory and change to directory hosting the repo project

  4. Build the project by replacing all placeholder ${<place_holder>} with valid values

    1. Create a new AKS cluster and a new Azure Container Registry (ACR) instance:

      mvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DidentityId=<user-assigned-managed-identity-id> -DcreateAKSCluster=true -DcreateACR=true -DuploadAppPackage=<true or false> -DuseOpenLibertyImage=<true or false> -DuseJava8=<true or false> -DappReplicas=<number of replicas> -Dtest.args="-Test All" -Ptemplate-validation-tests clean install
    2. Or use an existing AKS cluster and an existing ACR instance:

      mvn -Dgit.repo=<repo_user> -Dgit.tag=<repo_tag> -DidentityId=<user-assigned-managed-identity-id> -DcreateAKSCluster=false -DaksClusterName=<aks-cluster-name> -DaksClusterRGName=<cluster-group-name> -DcreateACR=false -DacrName=<acr-instance-name> -DuploadAppPackage=<true or false> -DuseOpenLibertyImage=<true or false> -DuseJava8=<true or false> -DappReplicas=<number of replicas> -Dtest.args="-Test All" -Ptemplate-validation-tests clean install
  5. Change to ./target/arm directory

  6. Using deploy.azcli to deploy the application package to AKS cluster

    ./deploy.azcli -n <deploymentName> -i <subscriptionId> -g <resourceGroupName> -l <resourceGroupLocation> -f <application-package-path> 

After deployment

  1. If you check the resource group resourceGroupName in Azure portal, you will see related resources created:
    1. An new AKS cluster if it's specified;
    2. An new ACR instance if it's specified;
    3. An deployment script instance;
  2. To visit the application home page:
    1. Open the resource group resourceGroupName;
    2. Navigate to "Deployments > deploymentName > Outputs";
    3. Copy value of property result > applicationEndpoint and open it in the browser;

About

Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages