Skip to content

Latest commit

 

History

History
277 lines (162 loc) · 13.5 KB

quickstart.md

File metadata and controls

277 lines (162 loc) · 13.5 KB
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

Quickstart: Deploy your first application to Azure Spring Apps

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]

1. Prerequisites

::: zone pivot="sc-consumption-plan,sc-standard"


::: zone-end

::: zone pivot="sc-enterprise"


::: 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

5. Validate the app

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:

  1. 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":::

  2. 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:

  1. 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":::

  2. 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:

  1. 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":::

  2. 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:

  1. 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":::

  2. 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:

  1. 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":::

  2. 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:

  1. Access the application URL. When you open the app, you get the response Hello World.

  2. 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:

  1. Access the application with the output application URL. When you open the app, you get the response Hello World.

  2. 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:

  1. Access the application with the output application URL. When you open the app, you get the response Hello World.

  2. 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.

  3. 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:

  1. Access the application with the output application URL. When you open the app, you get the response Hello World.

  2. 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]

7. Next steps

[!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: