This repository contains artifacts to help you get started running Tomcat applications on Azure container platforms, such as the Azure Kubernetes Service (AKS). It is intended to accompany the [Tomcat to AKS Migration guide](https://docs.microsoft.com/azure/java/migrate-tomcat-to-containers-on-azure-kubernetes-service).
We provide a WAR build of [Spring Pet Clinic](https://github.com/spring-petclinic/spring-framework-petclinic) in ROOT.war as a sample application. By following the steps below, you can see this QuickStart in action without the need to provide your own applciation or to make any modifications.
Once the container is running, navigate to `http://localhost:8080` in [your favorite browser](https://www.microsoft.com/edge). You should see the Petclinic application come up.
Alternatively, you can build and test the image entirely on Azure. These steps can be performed from [Azure CloudShell](https://shell.azure.com) or from any machine with [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) installed.
1. Once the Azure Container Registry instance is created, run the following command, where `${REGISTRY_NAME}` is the name of the Azure Container Registry you just created:
The Azure Container Registry will now build the docker image on its own server.
1. Once the image build has completed, run the following command. It will deploy the image onto an Azure Container Instance. `${RESOURCE_GROUP}` should be the name of a resource group in your azure subscription. `${REGISTRY_NAME}` should be the same as above
When the command completes, it will display an IP address. Navigate to `http://<The IP Address>:8080` in your browser, and you should see the home page of the deployed web application.
To terminate the container instance, run
```bash
az container delete -g ${RESOURCE_GROUP} -n ${REGISTRY_NAME} --yes