This sample shows you how to deploy an existing Liberty application to AKS using Liberty on AKS solution templates. When you're finished, you can continue to manage the application via the Azure CLI or Azure Portal.
Cargo Tracker is a Domain-Driven Design Jakarta EE application. The application is built with Maven and deployed to Open Liberty running on Azure Kubernetes Service (AKS). The application is exposed by Azure Application Gateway service. For quickstart uses the official Azure offer for running Liberty on AKS, see Deploy a Java application with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster.
Features • Gettting Started • Guidance
(include a screenshot of your template's endpoint here-- so users know what it should look like when they're done)
This template, the application code and configuration it contains, has been built to showcase Microsoft Azure specific services and tools. We strongly advise our customers not to make this code part of their production environments without implementing or enabling additional security features.
For a more comprehensive list of best practices and security recommendations for Intelligent Applications, visit our official documentation”
The following technologies are part of the project:
- Java 17
- Maven
- Azure Kubernetes Service (AKS)
- Open Liberty
- Azure Application Gateway
- Azure CLI (az))
- Azure Developer CLI (azd))
This project provides the following features:
- Deploy an existing Liberty application to AKS using Liberty on AKS solution templates
- Best practices to build Domain-Driven Design Jakarta EE applications.
- Find the shortest path for cargo transportation with Azure Open AI services
- Github codespaces
- VS Code Dev Containers
- Local Environment
All the steps of this lab have been tested in the GitHub CodeSpace. This is the preferred option for running this template.
You can run this template by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
-
Open a terminal window
-
Sign into your Azure account:
azd auth login --use-device-code az login
-
Provision the Azure resources and deploy your code:
azd up
It will prompt you to enter an environment name for azd like
cargo-tracker-liberty-aks-azd
, and then select a subscription from the list, and then select a location when OpenAI service is available(like "eastus2"). Then it will provision the resources and deploy the code. -
When azd is done, you can visit the output Cargo Tracker URL to see the running application.
Cargo Tracker URL: http://******.cloudapp.azure.com/cargo-tracker/
-
To clean up the resources, run the following command:
azd down
- An Azure subscription.
- kubectl
- helm
- Docker
- Maven
- Java 17
- Azure CLI (az)
- Azure Developer CLI (azd)
This template uses Azure OpenAI Service deployment mododules gpt-4o which may not be available in all Azure regions. Check for up-to-date region availability and select a region during deployment accordingly.
- We recommend using East US, East US 2.
You can estimate the cost of this project's architecture with Azure's pricing calculator
- Azure OpenAI Service - Standard
- Azure Kubernetes Service (AKS)
- Azure Monitor - Analytics Logs
- Azure Database for Postgresql - Flexible Server
Note
When implementing this template please specify whether the template uses Managed Identity or Key Vault
This template has Managed Identity and Key Vault built in to eliminate the need for developers to manage these credentials.
Applications can use managed identities to obtain Microsoft Entra tokens without having to manage any credentials. Additionally, we have added a GitHub Action tool that scans the infrastructure-as-code files and generates a report containing any detected issues. To ensure best practices in your repo we recommend anyone creating solutions based on our templates ensure that the Github secret scanning setting is enabled in your repos.
For step by step guide to deploy the application, see Deploy Cargo Tracker to Open Liberty on Azure Kubernetes Service (AKS)