title | description | author | ms.author | ms.service | ms.topic | ms.date | ms.custom | zone_pivot_groups |
---|---|---|---|---|---|---|---|---|
Quickstart - Deploy your first application to Azure Spring Apps |
Describes how to deploy an application to Azure Spring Apps. |
KarlErickson |
karler |
azure-spring-apps |
quickstart |
11/07/2023 |
devx-track-java, devx-track-extended-java, devx-track-azurecli, mode-other, engagement-fy23, devx-track-extended-azdevcli |
spring-apps-plan-selection |
Note
The first 50 vCPU hours and 100 GB hours of memory are free each month. For more information, see Price Reduction - Azure Spring Apps does more, costs less! on the Apps on Azure Blog.
Note
Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
This article explains how to deploy a small application to run on Azure Spring Apps.
The application code used in this tutorial is a simple app. When you complete this example, the application is accessible online, and you can manage it through the Azure portal.
[!INCLUDE quickstart-tool-introduction]
::: zone pivot="sc-consumption-plan,sc-standard"
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- Git.
- Java Development Kit (JDK), version 17.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- Git.
- Java Development Kit (JDK), version 17.
- Azure Developer CLI (AZD), version 1.2.0 or higher.
::: zone-end
::: zone pivot="sc-enterprise"
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of Enterprise plan in Azure Marketplace.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of Enterprise plan in Azure Marketplace.
- Git.
- Java Development Kit (JDK), version 17.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of Enterprise plan in Azure Marketplace.
- Git.
- Java Development Kit (JDK), version 17.
- Azure CLI version 2.45.0 or higher.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of Enterprise plan in Azure Marketplace.
- Java Development Kit (JDK), version 17.
- IntelliJ IDEA.
- Azure Toolkit for IntelliJ.
- An Azure subscription. [!INCLUDE quickstarts-free-trial-note]
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the Requirements section of Enterprise plan in Azure Marketplace.
- Java Development Kit (JDK), version 17.
- Visual Studio Code.
::: zone-end
::: zone pivot="sc-consumption-plan"
[!INCLUDE deploy-app-with-standard-consumption-plan]
::: zone-end
::: zone pivot="sc-standard"
[!INCLUDE deploy-app-with-basic-standard-plan]
::: zone-end
::: zone pivot="sc-enterprise"
[!INCLUDE deploy-app-with-enterprise-plan]
::: zone-end
This section describes how to validate your application.
::: zone pivot="sc-consumption-plan"
After the deployment finishes, find the application URL from the deployment outputs. Use the following steps to validate:
-
Access the application URL from the Outputs page of the Deployment. When you open the app, you get the response
Hello World
.:::image type="content" source="media/quickstart/hello-app-url.png" alt-text="Screenshot of the Azure portal that shows the Outputs page of the Deployment." border="false" lightbox="media/quickstart/hello-app-url.png":::
-
Check the details for each resource deployment, which are useful for investigating any deployment issues.
After the deployment finishes, access the application with the output application URL. Use the following steps to check the app's logs to investigate any deployment issue:
-
Access the output application URL from the Outputs page of the Deployment. When you open the app, you get the response
Hello World
.:::image type="content" source="media/quickstart/hello-app-url.png" alt-text="Screenshot of the Azure portal that shows the Outputs page of the Deployment." border="false" lightbox="media/quickstart/hello-app-url.png":::
-
From the navigation pane of the Azure Spring Apps instance Overview page, select Logs to check the app's logs.
:::image type="content" source="media/quickstart/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart/logs.png":::
After the deployment finishes, access the application with the output endpoint. When you open the app, you get the response Hello World
.
::: zone-end
::: zone pivot="sc-standard"
After the deployment finishes, use the following steps to find the application URL from the deployment outputs:
-
Access the application URL from the Outputs page of the Deployment. When you open the app, you get the response
Hello World
.:::image type="content" source="media/quickstart/hello-app-url.png" alt-text="Screenshot of the Azure portal that shows the Outputs page of the Deployment." border="false" lightbox="media/quickstart/hello-app-url.png":::
-
Check the details for each resource deployment, which are useful for investigating any deployment issues.
After the deployment finishes, use the following steps to check the app's logs to investigate any deployment issue:
-
Access the application URL from the Outputs page of the Deployment. When you open the app, you get the response
Hello World
.:::image type="content" source="media/quickstart/hello-app-url.png" alt-text="Screenshot of the Azure portal that shows the Outputs page of the Deployment." border="false" lightbox="media/quickstart/hello-app-url.png":::
-
From the navigation pane of the Azure Spring Apps instance overview page, select Logs to check the app's logs.
:::image type="content" source="media/quickstart/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart/logs.png":::
After the deployment finishes, access the application with the output endpoint. When you open the app, you get the response Hello World
.
::: zone-end
::: zone pivot="sc-enterprise"
After the deployment finishes, use the following steps to find the application URL from the deployment outputs:
-
Access the application URL from the Outputs page of the Deployment. When you open the app, you get the response
Hello World
.:::image type="content" source="media/quickstart/hello-app-url.png" alt-text="Screenshot of the Azure portal that shows the Outputs page of the Deployment." border="false" lightbox="media/quickstart/hello-app-url.png":::
-
Check the details for each resource deployment, which are useful for investigating any deployment issues.
After the deployment finishes, use the following steps to validate the app:
-
Access the application URL. When you open the app, you get the response
Hello World
. -
Check the console logs, which are useful for investigating any deployment issues.
After the deployment finishes, use the following steps to check the app's logs to investigate any deployment issue:
-
Access the application with the output application URL. When you open the app, you get the response
Hello World
. -
Use the following command to check the app's log to investigate any deployment issue:
az spring app logs \ --service ${SERVICE_NAME} \ --name ${APP_NAME}
Use the following steps to stream your application logs:
-
Access the application with the output application URL. When you open the app, you get the response
Hello World
. -
Open the Azure Explorer window, expand the node Azure, expand the service node Azure Spring Apps, expand the Azure Spring Apps instance you created, and then select the demo instance of the app you created.
-
Right-click and select Start Streaming Logs, then select OK to see real-time application logs.
:::image type="content" source="media/quickstart/app-stream-log.png" alt-text="Screenshot of IntelliJ that shows the Azure Streaming Log." lightbox="media/quickstart/app-stream-log.png":::
Use the following steps to stream your application logs:
-
Access the application with the output application URL. When you open the app, you get the response
Hello World
. -
Follow the steps in the Stream your application logs section of Java on Azure Spring Apps.
::: zone-end
[!INCLUDE clean-up-resources-portal-or-azd]
[!div class="nextstepaction"] Structured application log for Azure Spring Apps
[!div class="nextstepaction"] Map an existing custom domain to Azure Spring Apps
[!div class="nextstepaction"] Use Azure Spring Apps CI/CD with GitHub Actions
[!div class="nextstepaction"] Automate application deployments to Azure Spring Apps
[!div class="nextstepaction"] Use managed identities for applications in Azure Spring Apps
[!div class="nextstepaction"] Quickstart: Create a service connection in Azure Spring Apps with the Azure CLI
::: zone pivot="sc-standard, sc-consumption-plan"
[!div class="nextstepaction"] Introduction to the sample app
::: zone-end
::: zone pivot="sc-enterprise"
[!div class="nextstepaction"] Introduction to the Fitness Store sample app
::: zone-end
For more information, see the following articles: