Skip to content

Commit 5aad486

Browse files
authored
Merge pull request #265758 from MicrosoftDocs/main
2/8/2024 AM Publish
2 parents 742507a + 0f38a26 commit 5aad486

File tree

129 files changed

+1282
-1139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1282
-1139
lines changed
-13.2 KB
Loading
-14.4 KB
Loading
86.2 KB
Loading
50.7 KB
Loading
-8.55 KB
Loading
46.3 KB
Loading
23.4 KB
Loading

articles/advisor/advisor-reference-reliability-recommendations.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,13 @@ In active-active configuration, both instances of the VPN gateway establish S2S
645645

646646
Learn more about [Virtual network gateway - VNetGatewayActiveActive (Enable Active-Active gateways for redundancy)](https://aka.ms/aa_vpnha_learnmore).
647647

648+
<!--
648649
### Use HEAD health probes
649650
650651
For health probes, it’s a good practice to use the HEAD method, which reduces the amount of traffic load on your origins.
651652
652653
Learn more about [Front Door - Use HEAD health probes](https://aka.ms/afd-use-health-probes).
653-
654+
-->
654655
### Use managed TLS certificates
655656

656657
Front Door management of your TLS certificates reduces your operational costs and helps you to avoid costly outages caused by forgetting to renew a certificate.
@@ -663,6 +664,12 @@ If you only have a single origin, Front Door always routes traffic to that origi
663664

664665
Learn more about [Health probe best practices](https://aka.ms/afd-disable-health-probes).
665666

667+
### Use the same domain name on Azure Front Door and your origin
668+
669+
We recommend that you preserve the original HTTP host name when you use a reverse proxy in front of a web application. Having a different host name at the reverse proxy than the one that's provided to the back-end application server can lead to cookies or redirect URLs that don't work properly. For example, session state can get lost, authentication can fail, or back-end URLs can inadvertently be exposed to end users. You can avoid these problems by preserving the host name of the initial request so that the application server sees the same domain as the web browser.
670+
671+
Learn more about [Use the same domain name on Azure Front Door and your origin](https://aka.ms/afd-same-domain-origin).
672+
666673
## SAP for Azure
667674

668675
### Enable the 'concurrent-fencing' parameter in Pacemaker cofiguration in ASCS HA setup in SAP workloads

articles/ai-services/openai/concepts/gpt-with-vision.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Enhancements let you incorporate other Azure AI services (such as Azure AI Visio
2727
**Object grounding**: Azure AI Vision complements GPT-4 Turbo with Vision’s text response by identifying and locating salient objects in the input images. This lets the chat model give more accurate and detailed responses about the contents of the image.
2828

2929
> [!IMPORTANT]
30-
> To use Vision enhancement, you need a Computer Vision resource. It must be in the paid (S0) tier and in the same Azure region as your GPT-4 Turbo with Vision resource.
30+
> To use Vision enhancement, you need a Computer Vision resource. It must be in the paid (S1) tier and in the same Azure region as your GPT-4 Turbo with Vision resource.
3131
3232
:::image type="content" source="../media/concepts/gpt-v/object-grounding.png" alt-text="Screenshot of an image with object grounding applied. Objects have bounding boxes with labels.":::
3333

articles/app-service/includes/quickstart-java/quickstart-java-quarkus.md renamed to articles/app-service/includes/quickstart-java/quickstart-java-javase.md

Lines changed: 116 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@ author: cephalin
33
ms.service: app-service
44
ms.devlang: java
55
ms.topic: include
6-
ms.date: 08/30/2023
6+
ms.date: 02/10/2024
77
ms.author: cephalin
88
---
99

10-
In this quickstart, you'll use the [Maven Plugin for Azure App Service Web Apps](https://github.com/microsoft/azure-maven-plugins/blob/develop/azure-webapp-maven-plugin/README.md) to deploy a Java web application with an embedded server to [Azure App Service](/azure/app-service/). App Service provides a highly scalable, self-patching web app hosting service. Use the tabs to switch between Tomcat, JBoss, or embedded server (Java SE) instructions.
10+
In this quickstart, you use the [Maven Plugin for Azure App Service Web Apps](https://github.com/microsoft/azure-maven-plugins/blob/develop/azure-webapp-maven-plugin/README.md) to deploy a Java web application with an embedded server to [Azure App Service](/azure/app-service/). App Service provides a highly scalable, self-patching web app hosting service. Use the tabs to switch between Tomcat, JBoss, or embedded server (Java SE) instructions.
1111

12-
The quickstart uses a [Quarkus](https://quarkus.io) sample, which comes with a bundled web server. You can deploy your own application and server bundle in a single JAR file to App Service instead of the using the Tomcat or JBoss hosting options. If you want, you can also embed a Tomcat server in the JAR file and run that in App Service.
12+
The quickstart deploys either a Spring Boot app, embedded Tomcat, or Quarkus app using the [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App) plugin.
1313

1414
> [!NOTE]
15-
> For Spring apps that requires all the Spring services, try [Azure Spring Apps](../../../spring-apps/enterprise/quickstart.md) instead. However, you can deploy Spring Boot apps to App Service.
15+
> App Service can host Spring apps. For Spring apps that require all the Spring services, try [Azure Spring Apps](../../../spring-apps/quickstart.md) instead.
1616
17-
:::image type="content" source="../../media/quickstart-java/quarkus-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Maven Hellow World web app running in Azure App Service in introduction.":::
17+
### [Spring Boot](#tab/springboot)
18+
19+
:::image type="content" source="../../media/quickstart-java/springboot-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Spring Boot Hello World web app running in Azure App Service in introduction.":::
20+
21+
### [Embedded Tomcat](#tab/embeddedtomcat)
22+
23+
:::image type="content" source="../../media/quickstart-java/embedded-tomcat-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of embedded Tomcat Hello World web app running in Azure App Service in introduction.":::
24+
25+
### [Quarkus](#tab/quarkus)
26+
27+
:::image type="content" source="../../media/quickstart-java/quarkus-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Quarkus Hello World web app running in Azure App Service in introduction.":::
28+
29+
-----
1830

1931
If Maven isn't your preferred development tool, check out our similar tutorials for Java developers:
2032
+ [Gradle](../../configure-language-java.md?pivots=platform-linux#gradle)
@@ -28,22 +40,56 @@ If Maven isn't your preferred development tool, check out our similar tutorials
2840

2941
[!INCLUDE [cloud-shell-try-it-no-header.md](../../../../includes/cloud-shell-try-it-no-header.md)]
3042

31-
## 2 - Create a Java app
43+
## 2 - Get the sample app
3244

33-
Execute the following Maven command in the Cloud Shell prompt to create a new app named `quarkus-hello-azure`:
45+
### [Spring Boot](#tab/springboot)
3446

35-
```azurecli-interactive
36-
mvn io.quarkus.platform:quarkus-maven-plugin:3.2.2.Final:create \
37-
-DprojectGroupId=org.acme \
38-
-DprojectArtifactId=quarkus-hello-azure \
39-
-Dextensions='resteasy-reactive'
40-
```
47+
1. Download and extract the [default Spring Boot web application template](https://github.com/rd-1-2022/rest-service). This repository is cloned for you when you run the [Spring CLI](https://docs.spring.io/spring-cli/reference/creating-new-projects.html) command `spring boot new my-webapp`.
4148

42-
Then change your working directory to the project folder:
49+
```bash
50+
git clone https://github.com/rd-1-2022/rest-service my-webapp
51+
```
4352

44-
```azurecli-interactive
45-
cd quarkus-hello-azure
46-
```
53+
1. Change your working directory to the project folder:
54+
55+
```azurecli-interactive
56+
cd my-webapp
57+
```
58+
59+
### [Embedded Tomcat](#tab/embeddedtomcat)
60+
61+
1. Download and extract the [embeddedTomcatExample](https://github.com/Azure-Samples/java-docs-embedded-tomcat) repository, or clone it locally by running `git clone`:
62+
63+
```bash
64+
git clone https://github.com/Azure-Samples/java-docs-embedded-tomcat
65+
```
66+
67+
1. Change your working directory to the project folder:
68+
69+
```azurecli-interactive
70+
cd java-docs-embedded-tomcat
71+
```
72+
73+
The application is run using the standard [Tomcat](https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/catalina/startup/Tomcat.html) class (see [Main.java](https://github.com/Azure-Samples/java-docs-embedded-tomcat/blob/main/src/main/java/com/microsoft/azure/appservice/examples/embeddedtomcat/Main.java) in the sample).
74+
75+
### [Quarkus](#tab/quarkus)
76+
77+
1. Generate a new Quarkus app named `quarkus-hello-azure` with the following Maven command:
78+
79+
```azurecli-interactive
80+
mvn io.quarkus.platform:quarkus-maven-plugin:3.2.2.Final:create \
81+
-DprojectGroupId=org.acme \
82+
-DprojectArtifactId=quarkus-hello-azure \
83+
-Dextensions='resteasy-reactive'
84+
```
85+
86+
1. Change your working directory to the project folder:
87+
88+
```azurecli-interactive
89+
cd quarkus-hello-azure
90+
```
91+
92+
-----
4793

4894
## 3 - Configure the Maven plugin
4995

@@ -52,7 +98,7 @@ The deployment process to Azure App Service uses your Azure credentials from the
5298
Run the Maven command shown next to configure the deployment. This command helps you to set up the App Service operating system, Java version, and Tomcat version.
5399
54100
```azurecli-interactive
55-
mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config
101+
mvn com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:config
56102
```
57103
58104
1. For **Create new run configuration**, type **Y**, then **Enter**.
@@ -63,8 +109,8 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config
63109
64110
```
65111
Please confirm webapp properties
66-
AppName : quarkus-hello-azure-1690375364238
67-
ResourceGroup : quarkus-hello-azure-1690375364238-rg
112+
AppName : <generated-app-name>
113+
ResourceGroup : <generated-app-name>-rg
68114
Region : centralus
69115
PricingTier : P1v2
70116
OS : Linux
@@ -81,7 +127,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config
81127
[INFO] ------------------------------------------------------------------------
82128
```
83129
84-
After you've confirmed your choices, the plugin adds the above plugin element and requisite settings to your project's `pom.xml` file that configure your web app to run in Azure App Service.
130+
After you confirm your choices, the plugin adds the above plugin element and requisite settings to your project's `pom.xml` file that configure your web app to run in Azure App Service.
85131

86132
The relevant portion of the `pom.xml` file should look similar to the following example.
87133

@@ -118,13 +164,36 @@ Property | Required | Description | Version
118164

119165
For the complete list of configurations, see the plugin reference documentation. All the Azure Maven Plugins share a common set of configurations. For these configurations see [Common Configurations](https://github.com/microsoft/azure-maven-plugins/wiki/Common-Configuration). For configurations specific to App Service, see [Azure Web App: Configuration Details](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App:-Configuration-Details).
120166

121-
Be careful about the values of `<appName>` and `<resourceGroup>` (`quarkus-hello-azure-1690375364238` and `quarkus-hello-azure-1690375364238-rg` accordingly in the demo). They're used later.
167+
Be careful about the values of `<appName>` and `<resourceGroup>`. They're used later.
122168
123169
## 4 - Deploy the app
124170
125-
With all the configuration ready in your *pom.xml* file, you can deploy your Java app to Azure with one single command.
171+
With all the configuration ready in your [pom.xml](https://github.com/Azure-Samples/java-docs-embedded-tomcat/blob/main/pom.xml) file, you can deploy your Java app to Azure with one single command.
172+
173+
1. Build the JAR file using the following command:
174+
175+
### [Spring Boot](#tab/springboot)
176+
177+
```bash
178+
mvn clean package
179+
```
180+
181+
### [Embedded Tomcat](#tab/embeddedtomcat)
182+
183+
```bash
184+
mvn clean package
185+
```
186+
187+
To make the application it deployable using [azure-webapp-maven-plugin](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Web-App), and running on Azure App Service, the sample configures the `package` goal as follows:
188+
189+
- Build a single uber JAR file, which contains everything the application needs to run.
190+
- Create an [executable JAR](https://en.wikipedia.org/wiki/JAR_(file_format)#Executable_JAR_files) by specifying the Tomcat class as the start-up class.
191+
- Replace the original artifact with the uber JAR to ensure that the deploy step deploys the right file.
126192
127-
1. Rebuild the JAR file using the following command:
193+
> [!TIP]
194+
> Quarkus and Spring Boot both produce two JAR files with `mvn clean package`, but `azure-webapp-maven-plugin` picks the right JAR file to deploy automatically.
195+
196+
### [Quarkus](#tab/quarkus)
128197
129198
```bash
130199
mvn clean package -Dquarkus.package.type=uber-jar -D%prod.quarkus.http.port=80
@@ -137,6 +206,8 @@ With all the configuration ready in your *pom.xml* file, you can deploy your Jav
137206
138207
You can configure these properties by using other means, but they're added to `mvn package` command here for simplicity.
139208

209+
-----
210+
140211
2. Deploy to Azure by using the following command:
141212

142213
```bash
@@ -146,7 +217,7 @@ With all the configuration ready in your *pom.xml* file, you can deploy your Jav
146217
If the deployment succeeds, you see the following output:
147218

148219
```output
149-
[INFO] Successfully deployed the artifact to https://quarkus-hello-azure-1690375364238.azurewebsites.net
220+
[INFO] Successfully deployed the artifact to https://<app-name>.azurewebsites.net
150221
[INFO] ------------------------------------------------------------------------
151222
[INFO] BUILD SUCCESS
152223
[INFO] ------------------------------------------------------------------------
@@ -155,11 +226,27 @@ With all the configuration ready in your *pom.xml* file, you can deploy your Jav
155226
[INFO] ------------------------------------------------------------------------
156227
```
157228

158-
Once deployment is completed, your application is ready at `http://<appName>.azurewebsites.net/` (`http://quarkus-hello-azure-1690375364238.azurewebsites.net` in the demo). Open the url with your local web browser, you should see
229+
### [Spring Boot](#tab/springboot)
230+
231+
Once deployment is completed, your application is ready at `http://<appName>.azurewebsites.net/`. Open the URL `http://<appName>.azurewebsites.net/greeting` with your local web browser (note the `/greeting` path), and you should see:
232+
233+
:::image type="content" source="../../media/quickstart-java/springboot-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Spring Boot Hello World web app running in Azure App Service.":::
234+
235+
### [Embedded Tomcat](#tab/embeddedtomcat)
236+
237+
Once deployment is completed, your application is ready at `http://<appName>.azurewebsites.net/`. Open the url with your local web browser, and you should see:
238+
239+
:::image type="content" source="../../media/quickstart-java/embedded-tomcat-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of embedded Tomcat web app running in Azure App Service.":::
240+
241+
### [Quarkus](#tab/quarkus)
242+
243+
Once deployment is completed, your application is ready at `http://<appName>.azurewebsites.net/`. Open the url with your local web browser, and you should see:
244+
245+
:::image type="content" source="../../media/quickstart-java/quarkus-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Quarkus web app running in Azure App Service.":::
159246

160-
:::image type="content" source="../../media/quickstart-java/quarkus-hello-world-in-browser-azure-app-service.png" alt-text="Screenshot of Maven Hellow World web app running in Azure App Service.":::
247+
-----
161248

162-
**Congratulations!** You've deployed your first Java app to App Service.
249+
**Congratulations!** You deployed your first Java app to App Service.
163250

164251
## 5 - Clean up resources
165252

@@ -169,4 +256,4 @@ In the preceding steps, you created Azure resources in a resource group. If you
169256
az group delete --name <your resource group name; for example: quarkus-hello-azure-1690375364238-rg> --yes
170257
```
171258
172-
This command may take a minute to run.
259+
This command might take a minute to run.

0 commit comments

Comments
 (0)