Skip to content

Latest commit

 

History

History
209 lines (126 loc) · 10.4 KB

quickstart-deploy-event-driven-app.md

File metadata and controls

209 lines (126 loc) · 10.4 KB
title description author ms.service ms.topic ms.date ms.author ms.custom zone_pivot_groups
Quickstart - Deploy event-driven application to Azure Spring Apps
Learn how to deploy an event-driven application to Azure Spring Apps.
KarlErickson
spring-apps
quickstart
11/07/2023
rujche
devx-track-java, devx-track-extended-java, devx-track-azurecli, mode-other, engagement-fy23
spring-apps-plan-selection

Quickstart: Deploy an event-driven 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 applies to: ✔️ Standard consumption and dedicated (Preview) ✔️ Basic/Standard ✔️ Enterprise

This article explains how to deploy a Spring Boot event-driven application to Azure Spring Apps.

The sample project is an event-driven application that subscribes to a Service Bus queue named lower-case, and then handles the message and sends another message to another queue named upper-case. To make the app simple, message processing just converts the message to uppercase. The following diagram depicts this process:

:::image type="content" source="media/quickstart-deploy-event-driven-app/diagram.png" alt-text="Diagram showing the Azure Spring Apps event-driven app architecture." lightbox="media/quickstart-deploy-event-driven-app/diagram.png" border="false":::

This article provides the following options for deploying to Azure Spring Apps:

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

[!INCLUDE quickstart-tool-introduction]

::: zone-end

::: zone pivot="sc-enterprise"

  • The Azure portal option is the easiest and fastest way to create resources and deploy applications with a single click. This option is suitable for Spring developers who want to quickly deploy applications to Azure cloud services.
  • The Azure portal + Maven plugin option is a more conventional way to create resources and deploy applications step by step. This option is suitable for Spring developers using Azure cloud services for the first time.
  • The Azure CLI option uses a powerful command line tool to manage Azure resources. This option is suitable for Spring developers who are familiar with Azure cloud services. ::: zone-end

1. Prerequisites

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


::: zone-end

::: zone pivot="sc-enterprise"


::: zone-end

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

[!INCLUDE deploy-event-driven-app-with-standard-consumption-plan]

::: zone-end

::: zone pivot="sc-standard"

[!INCLUDE deploy-event-driven-app-with-basic-standard-plan]

::: zone-end

::: zone pivot="sc-enterprise"

[!INCLUDE deploy-event-driven-app-with-enterprise-plan]

::: zone-end

5. Validate the app

Use the following steps to confirm that the event-driven app works correctly. You can validate the app by sending a message to the lower-case queue, then confirm that there's a message in the upper-case queue.

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

[!INCLUDE validate-event-driven-app]

  1. Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.

    :::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::

::: zone-end

::: zone pivot="sc-enterprise"

[!INCLUDE validate-event-driven-app]

  1. Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.

    :::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::

  2. Check the details for each resource deployment, which are useful for investigating any deployment issues.

[!INCLUDE validate-event-driven-app]

  1. Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.

    :::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::

  2. Check the details for each resource deployment, which are useful for investigating any deployment issues.

[!INCLUDE validate-event-driven-app]

  1. Go to the Azure Spring Apps instance Overview page and select Logs to check the app's logs.

    :::image type="content" source="media/quickstart-deploy-event-driven-app/logs.png" alt-text="Screenshot of the Azure portal that shows the Azure Spring Apps Logs page." lightbox="media/quickstart-deploy-event-driven-app/logs.png":::

  2. Use the following command to check the app's log to investigate any deployment issue:

    az spring app logs \
        --service ${AZURE_SPRING_APPS_INSTANCE} \
        --name ${APP_NAME}
    

::: 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"] Set up 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"] Create a service connection in Azure Spring Apps with the Azure CLI

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

[!div class="nextstepaction"] Run microservice apps (Pet Clinic)

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