Skip to content

Commit 094e020

Browse files
author
Jill Grant
authored
Merge pull request #255661 from moarychan/moary/event-driven/support-asae-portal-and-maven
[Quickstart - Event Driven] Support enterprise plan with portal + maven usage
2 parents 4744bad + 7600b06 commit 094e020

26 files changed

+260
-100
lines changed

articles/spring-apps/includes/quickstart-deploy-event-driven-app/clean-up-resources.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Use the following steps to delete the entire resource group, including the newly
2525

2626
[!INCLUDE [clean-up-resources-via-resource-group](clean-up-resources-via-resource-group.md)]
2727

28+
### [Azure portal + Maven plugin](#tab/Azure-portal-maven-plugin-ent)
29+
30+
Use the following steps to delete the entire resource group, including the newly created service:
31+
32+
[!INCLUDE [clean-up-resources-via-resource-group](clean-up-resources-via-resource-group.md)]
33+
2834
### [Azure CLI](#tab/Azure-CLI)
2935

3036
Use the following command to delete the entire resource group, including the newly created service:

articles/spring-apps/includes/quickstart-deploy-event-driven-app/deploy-app-azure-spring-apps-event-driven.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,23 @@ The **Deploy to Azure** button in the previous section launches an Azure portal
2020

2121
### [Azure portal + Maven plugin](#tab/Azure-portal-maven-plugin)
2222

23-
Use the following steps to deploy your JAR file with the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Spring-Apps).
23+
[!INCLUDE [event-driven-spring-apps-maven-plugin](event-driven-spring-apps-maven-plugin.md)]
2424

25-
1. Navigate to the sample project directory and use the following command to configure the app for Azure Spring Apps:
25+
2. Use the following command to deploy the app:
2626

2727
```bash
28-
./mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.18.0:config
29-
```
30-
31-
The following list describes the command interactions:
32-
33-
- **OAuth2 login**: You need to authorize the sign in to Azure based on the OAuth2 protocol.
34-
- **Select subscription**: Select the subscription list number of the Azure Spring Apps instance you created, which defaults to the first subscription in the list. If you use the default number, press <kbd>Enter</kbd>.
35-
- **Select Azure Spring Apps for deployment**: Select the list number of the Azure Spring Apps instance you created. If you use the default number, press <kbd>Enter</kbd>.
36-
- **Input the app name(simple-event-driven-app)**: Provide an app name. To use the default project artifact ID as the name, press <kbd>Enter</kbd>.
37-
- **Expose public access for this app (Simple Event Driven App)?**: Press <kbd>n</kbd>.
38-
- **Confirm to save all the above configurations (Y/n)**: Press <kbd>y</kbd>. If you press <kbd>n</kbd>, the configuration isn't saved in the POM file.
39-
40-
1. Use the following command to deploy the app:
41-
42-
```bash
43-
./mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.18.0:deploy
28+
./mvnw azure-spring-apps:deploy
4429
```
4530

4631
The following list describes the command interaction:
4732

4833
- **OAuth2 login**: You need to authorize the sign in to Azure based on the OAuth2 protocol.
4934

50-
After the command is executed, you can see the following output, which indicates that the deployment was successful.
35+
After the command is executed, you can see from the following log messages that the deployment was successful:
5136

52-
```output
53-
[INFO] Deployment(default) is successfully updated.
37+
```output
38+
[INFO] Deployment(default) is successfully created
39+
[INFO] Starting Spring App after deploying artifacts...
5440
[INFO] Deployment Status: Running
5541
```
5642

articles/spring-apps/includes/quickstart-deploy-event-driven-app/deploy-event-driven-app-enterprise-plan.md

Lines changed: 94 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ For clarity of structure, a separate markdown file is used to describe how to de
2020

2121
The **Deploy to Azure** button in the next section launches an Azure portal experience that downloads a JAR package from the [ASA-Samples-Web-Application releases](https://github.com/Azure-Samples/ASA-Samples-Web-Application/releases) page on GitHub. No local preparation steps are needed.
2222

23+
### [Azure portal + Maven plugin](#tab/Azure-portal-maven-plugin-ent)
24+
25+
Use the following steps to prepare the sample locally:
26+
27+
[!INCLUDE [prepare-spring-project-git-event-driven](prepare-spring-project-git-event-driven.md)]
28+
2329
### [Azure CLI](#tab/Azure-CLI)
2430

2531
Use the following steps to prepare the sample locally:
@@ -30,12 +36,62 @@ Use the following steps to prepare the sample locally:
3036

3137
## 3. Prepare the cloud environment
3238

33-
The main resources you need to run this sample are an Azure Spring Apps instance and an Azure Service Bus instance. Use the following steps to create these resources.
39+
The main resources you need to run this sample are an Azure Spring Apps instance and an Azure Service Bus instance. The following sections describe how to create these resources.
3440

3541
### [Azure portal](#tab/Azure-portal-ent)
3642

3743
[!INCLUDE [prepare-cloud-environment-on-azure-portal](event-driven-prepare-cloud-environment-enterprise-azure-portal.md)]
3844

45+
### [Azure portal + Maven plugin](#tab/Azure-portal-maven-plugin-ent)
46+
47+
### 3.1. Sign in to the Azure portal
48+
49+
Go to the [Azure portal](https://portal.azure.com/) and enter your credentials to sign in to the portal. The default view is your service dashboard.
50+
51+
### 3.2. Create a Service Bus instance
52+
53+
[!INCLUDE [provision-service-bus](provision-service-bus.md)]
54+
55+
8. Select **Queues** on the navigation menu, then select **Queue**.
56+
57+
1. On the **Create Queue** page, enter *lower-case* for **Name** and then select **Create**.
58+
59+
1. Create another queue by repeating the previous step using *upper-case* for **Name**.
60+
61+
### 3.3. Create an Azure Spring Apps instance
62+
63+
[!INCLUDE [provision-enterprise-azure-spring-apps](provision-enterprise-azure-spring-apps.md)]
64+
65+
### 3.4. Connect app instance to Service Bus instance
66+
67+
Use the following steps to connect your service instances:
68+
69+
1. Go to your Azure Spring Apps instance in the Azure portal.
70+
71+
1. From the navigation pane, open the **Apps** pane and then select **Create App**.
72+
73+
1. On the **Create App** page, for the app name, use *simple-event-driven-app* and leave all the other fields with their default values.
74+
75+
1. Select **Create** to finish creating the app and then select the app to view the details.
76+
77+
1. Select **Service Connector** from the navigation pane and then select **Create** to create a new service connection.
78+
79+
1. Fill out the **Basics** tab with the following information:
80+
81+
- **Service type**: Select **Service Bus**.
82+
- **Connection name**: Populated with an automatically generated name that you can modify.
83+
- **Subscription**: Select your subscription.
84+
- **Namespace**: Select the namespace you created.
85+
- **Client type**: Select **SpringBoot**.
86+
87+
1. Configure the **Next: Authentication** tab with the following information:
88+
89+
- **Select the authentication type you'd like to use between your compute service and target service.**: Select **Connection string**.
90+
91+
1. Select **Next: Networking**. Use the default option **Configure firewall rules to enable access to target service**.
92+
93+
1. Select **Next: Review and Create** to review your selections, then select **Create** to create the connection.
94+
3995
### [Azure CLI](#tab/Azure-CLI)
4096

4197
### 3.1. Provide names for each resource
@@ -119,26 +175,28 @@ az spring app create \
119175

120176
### 3.5. Create a Service Bus instance
121177

122-
Use the following command to create a Service Bus namespace:
178+
Use the following steps to create a Service Bus instance:
123179

124-
```azurecli
125-
az servicebus namespace create --name ${SERVICE_BUS_NAME_SPACE}
126-
```
180+
1. Use the following command to create a Service Bus namespace:
127181

128-
Then, use the following commands to create two queues named `lower-case` and `upper-case`:
182+
```azurecli
183+
az servicebus namespace create --name ${SERVICE_BUS_NAME_SPACE}
184+
```
129185

130-
```azurecli
131-
az servicebus queue create \
132-
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
133-
--name lower-case
134-
az servicebus queue create \
135-
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
136-
--name upper-case
137-
```
186+
1. Use the following commands to create two queues named `lower-case` and `upper-case`:
187+
188+
```azurecli
189+
az servicebus queue create \
190+
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
191+
--name lower-case
192+
az servicebus queue create \
193+
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
194+
--name upper-case
195+
```
138196

139197
### 3.6. Connect app instance to Service Bus instance
140198

141-
Now, both the Service Bus and the app in Azure Spring Apps have been created, but the app can't connect to the Service Bus. Use the following steps to enable the app to connect to the Service Bus, and then deploy the app:
199+
You've now created both the Service Bus and the app in Azure Spring Apps, but the app can't connect to the Service Bus. Use the following steps to enable the app to connect to the Service Bus, and then deploy the app:
142200

143201
1. Get the Service Bus's connection string by using the following command:
144202

@@ -169,6 +227,27 @@ Now, both the Service Bus and the app in Azure Spring Apps have been created, bu
169227

170228
The **Deploy to Azure** button in the previous section launches an Azure portal experience that includes application deployment, so nothing else is needed.
171229

230+
### [Azure portal + Maven plugin](#tab/Azure-portal-maven-plugin-ent)
231+
232+
[!INCLUDE [event-driven-spring-apps-maven-plugin](event-driven-spring-apps-maven-plugin.md)]
233+
234+
2. Use the following command to deploy the app:
235+
236+
```bash
237+
./mvnw azure-spring-apps:deploy
238+
```
239+
240+
The following list describes the command interaction:
241+
242+
- **OAuth2 login**: You need to authorize the sign in to Azure based on the OAuth2 protocol.
243+
244+
After the command is executed, you can see from the following log messages that the deployment was successful:
245+
246+
```output
247+
[INFO] Starting Spring App after deploying artifacts...
248+
[INFO] Deployment Status: Running
249+
```
250+
172251
### [Azure CLI](#tab/Azure-CLI)
173252

174253
The cloud environment is now ready. Deploy the app by using the following command:

articles/spring-apps/includes/quickstart-deploy-event-driven-app/event-driven-prepare-cloud-environment-consumption-azure-portal.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ Use the following steps to create all the Azure resources that the app depends o
3535
| **Resource group** | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
3636
| **Region** | The region closest to your users. | The region is used to create the resource group. |
3737

38-
:::image type="content" source="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png" alt-text="Screenshot of the Azure portal that shows the custom deployment." lightbox="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png":::
39-
4038
1. Select **Review and Create** to review your selections. Then, select **Create** to deploy the app to Azure Spring Apps.
4139

4240
1. On the toolbar, select the **Notifications** icon (a bell) to monitor the deployment process. After the deployment finishes, you can select **Pin to dashboard**, which creates a tile for this service on your Azure portal dashboard as a shortcut to the service's **Overview** page. Select **Go to resource** to open the service's **Overview** page.

articles/spring-apps/includes/quickstart-deploy-event-driven-app/event-driven-prepare-cloud-environment-enterprise-azure-portal.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ Use the following steps to create all the Azure resources that the app depends o
3535
| **Resource group** | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
3636
| **Region** | The region closest to your users. | The region is used to create the resource group. |
3737

38-
:::image type="content" source="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png" alt-text="Screenshot of the Azure portal that shows the custom deployment." lightbox="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png":::
39-
4038
1. Select **Review and Create** to review your selections. Then, select **Create** to deploy the app to Azure Spring Apps.
4139

4240
1. On the toolbar, select the **Notifications** icon (a bell) to monitor the deployment process. After the deployment finishes, you can select **Pin to dashboard**, which creates a tile for this service on your Azure portal dashboard as a shortcut to the service's **Overview** page. Select **Go to resource** to open the service's **Overview** page.

articles/spring-apps/includes/quickstart-deploy-event-driven-app/event-driven-prepare-cloud-environment-standard-azure-portal.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ Use the following steps to create all the Azure resources that the app depends o
3535
| **Resource group** | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
3636
| **Region** | The region closest to your users. | The region is used to create the resource group. |
3737

38-
:::image type="content" source="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png" alt-text="Screenshot of the Azure portal that shows the custom deployment." lightbox="../../media/quickstart-deploy-event-driven-app/event-driven-custom-deployment.png":::
39-
4038
1. Select **Review and Create** to review your selections. Then, select **Create** to deploy the app to Azure Spring Apps.
4139

4240
1. On the toolbar, select the **Notifications** icon (a bell) to monitor the deployment process. After the deployment finishes, you can select **Pin to dashboard**, which creates a tile for this service on your Azure portal dashboard as a shortcut to the service's **Overview** page. Select **Go to resource** to open the service's **Overview** page.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
author: karlerickson
3+
ms.author: v-shilichen
4+
ms.service: spring-apps
5+
ms.custom: event-tier1-build-2022
6+
ms.topic: include
7+
ms.date: 11/06/2023
8+
---
9+
10+
<!--
11+
Use the following line at the end of the heading Prerequisites, with blank lines before and after. App deployments with Spring Apps Maven plugin.
12+
13+
[!INCLUDE [event-driven-spring-apps-maven-plugin](includes/quickstart-deploy-event-driven-app/event-driven-spring-apps-maven-plugin.md)]
14+
-->
15+
16+
Use the following steps to deploy using the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Spring-Apps):
17+
18+
1. Navigate to the *complete* directory, and then run the following command to configure the app in Azure Spring Apps:
19+
20+
```bash
21+
./mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.19.0:config
22+
```
23+
24+
The following list describes the command interactions:
25+
26+
- **OAuth2 login**: You need to authorize the sign in to Azure based on the OAuth2 protocol.
27+
- **Select subscription**: Select the subscription list number of the Azure Spring Apps instance you created, which defaults to the first subscription in the list. If you use the default number, press <kbd>Enter</kbd> directly.
28+
- **Use existing Azure Spring Apps in Azure**: Press <kbd>y</kbd> to use the existing Azure Spring Apps instance.
29+
- **Select Azure Spring Apps for deployment**: Select the list number of the Azure Spring Apps instance you created. If you use the default number, press <kbd>Enter</kbd> directly.
30+
- **Use existing app in Azure Spring Apps \<your-instance-name\>**: Press <kbd>y</kbd> to use the app created.
31+
- **Confirm to save all the above configurations**: Press <kbd>y</kbd>. If you press <kbd>n</kbd>, the configuration isn't saved in the POM files.

articles/spring-apps/includes/quickstart-deploy-event-driven-app/prepare-cloud-environment-event-driven-consumption.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ Open your web browser and go to the [Azure portal](https://portal.azure.com/). E
3030

3131
[!INCLUDE [provision-service-bus](provision-service-bus.md)]
3232

33+
8. Select **Shared access policies** on the navigation menu and then select **RootManageSharedAccessKey**.
34+
35+
1. On the **SAS Policy: RootManageSharedAccessKey** page, copy and save the **Primary Connection String** value, which is used to set up connections from the Spring app.
36+
37+
1. Select **Queues** on the navigation menu and then select **Queue**.
38+
39+
1. On the **Create Queue** page, enter *lower-case* for **Name** and then select **Create**.
40+
41+
1. Create another queue by repeating the previous step using *upper-case* for **Name**.
42+
3343
### 3.3. Create an Azure Spring Apps instance
3444

3545
Use the following steps to create the service instance:
@@ -38,8 +48,6 @@ Use the following steps to create the service instance:
3848

3949
1. Select **Compute** > **Azure Spring Apps**.
4050

41-
:::image type="content" source="../../media/quickstart-deploy-event-driven-app/create-azure-spring-apps.png" alt-text="Screenshot of the Azure portal that shows the Create a resource page with Azure Spring Apps highlighted." lightbox="../../media/quickstart-deploy-event-driven-app/create-azure-spring-apps.png":::
42-
4351
1. Fill out the **Standard consumption & dedicated (preview)** form with the following information:
4452

4553
| Setting | Suggested value | Description |
@@ -51,8 +59,6 @@ Use the following steps to create the service instance:
5159
| **Region** | The region closest to your users | The location that is closest to your users. |
5260
| **Container Apps Environment** | *myacaenv* | The environment is a secure boundary around one or more container apps that can communicate with each other and share a virtual network, logging, and Dapr configuration. |
5361

54-
:::image type="content" source="../../media/quickstart-deploy-event-driven-app/create-consumption.png" alt-text="Screenshot of the Azure portal that shows the consumption tab of the Create Azure Spring Apps page." lightbox="../../media/quickstart-deploy-event-driven-app/create-consumption.png":::
55-
5662
1. (Optional) Use the following steps to create a Container Apps Environment:
5763

5864
[!INCLUDE [prepare-container-apps-environment](prepare-container-apps-environment.md)]
@@ -85,7 +91,7 @@ Use the following steps to create the service instance:
8591

8692
### [Azure Developer CLI](#tab/Azure-Developer-CLI)
8793

88-
1. Use the following command to log in Azure with OAuth2. Ignore this step if you've already logged in.
94+
1. Use the following command to log in Azure with OAuth2. Ignore this step if you already logged in.
8995

9096
```bash
9197
azd auth login

0 commit comments

Comments
 (0)