This sample shows how to run Java 8 app in Azure Spring Cloud
.
-
Clone this repo and go to folder
git clone https://github.com/Azure-Samples/Azure-Spring-Cloud-Samples cd Azure-Spring-Cloud-Samples/java-8-sample
-
Package the app using maven
mvn clean package -D skipTests
-
Install Azure CLI extension for Azure Spring Cloud
az extension add --name spring-cloud
-
Create an instance of Azure Spring Cloud
az spring-cloud create -n <service name> -g <resource group name>
-
Create a public repo that only has the provided
application.yml
file -
Using the URI of that repo, configure Azure Spring Cloud to pull config from it
az spring-cloud config-server git set --name <service name> --uri <my config git repo>
-
Create an app with public domain assigned
az spring-cloud app create -n <app name> -s <service name> -g <resource group name> --is-public true
-
Deploy the newly created jar
az spring-cloud app deploy -n <app name> -s <service name> -g <resource group name> --jar-path ./target/java8-ASC-demo-0.0.1-SNAPSHOT.jar
-
Using the output of the new app instance, retrieve the "App Instance Name" and use in the following command to review the logs
az spring-cloud app logs -f -n <app name> -i <App Instance Name>
-
Verify app is running. Instances should have status
RUNNING
and discoveryStatusUP
az spring-cloud app show -n <app name> -s <service name> -g <resource group name>
-
Visit the Azure portal to see further information about the application.