Skip to content

Commit bbc149f

Browse files
committed
set linux tab to default
1 parent f3bcca8 commit bbc149f

File tree

3 files changed

+136
-136
lines changed

3 files changed

+136
-136
lines changed

articles/app-service/configure-language-java-apm.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,25 @@ To enable via the Azure CLI, you need to create an Application Insights resource
4949
5050
3. Set the instrumentation key, connection string, and monitoring agent version as app settings on the web app. Replace `<instrumentationKey>` and `<connectionString>` with the values from the previous step.
5151
52-
# [Windows](#tab/windows)
53-
54-
```azurecli
55-
az webapp config appsettings set -n <webapp-name> -g <resource-group> --settings "APPINSIGHTS_INSTRUMENTATIONKEY=<instrumentationKey>" "APPLICATIONINSIGHTS_CONNECTION_STRING=<connectionString>" "ApplicationInsightsAgent_EXTENSION_VERSION=~3" "XDT_MicrosoftApplicationInsights_Mode=default" "XDT_MicrosoftApplicationInsights_Java=1"
56-
```
57-
5852
# [Linux](#tab/linux)
5953
6054
```azurecli
6155
az webapp config appsettings set -n <webapp-name> -g <resource-group> --settings "APPINSIGHTS_INSTRUMENTATIONKEY=<instrumentationKey>" "APPLICATIONINSIGHTS_CONNECTION_STRING=<connectionString>" "ApplicationInsightsAgent_EXTENSION_VERSION=~3" "XDT_MicrosoftApplicationInsights_Mode=default"
6256
```
6357
58+
# [Windows](#tab/windows)
59+
60+
```azurecli
61+
az webapp config appsettings set -n <webapp-name> -g <resource-group> --settings "APPINSIGHTS_INSTRUMENTATIONKEY=<instrumentationKey>" "APPLICATIONINSIGHTS_CONNECTION_STRING=<connectionString>" "ApplicationInsightsAgent_EXTENSION_VERSION=~3" "XDT_MicrosoftApplicationInsights_Mode=default" "XDT_MicrosoftApplicationInsights_Java=1"
62+
```
63+
6464
---
6565
6666
---
6767
6868
## Configure New Relic
6969
70-
# [Windows](#tab/windows)
70+
# [Linux](#tab/linux)
7171
7272
1. Create a NewRelic account at [NewRelic.com](https://newrelic.com/signup)
7373
2. Download the Java agent from NewRelic. It has a file name similar to *newrelic-java-x.x.x.zip*.
@@ -95,7 +95,7 @@ To enable via the Azure CLI, you need to create an Application Insights resource
9595
9696
::: zone-end
9797
98-
# [Linux](#tab/linux)
98+
# [Windows](#tab/windows)
9999
100100
1. Create a NewRelic account at [NewRelic.com](https://newrelic.com/signup)
101101
2. Download the Java agent from NewRelic. It has a file name similar to *newrelic-java-x.x.x.zip*.
@@ -130,16 +130,16 @@ To enable via the Azure CLI, you need to create an Application Insights resource
130130
131131
## Configure AppDynamics
132132
133-
# [Windows](#tab/windows)
133+
# [Linux](#tab/linux)
134134
135135
1. Create an AppDynamics account at [AppDynamics.com](https://www.appdynamics.com/community/register/)
136136
2. Download the Java agent from the AppDynamics website. The file name is similar to *AppServerAgent-x.x.x.xxxxx.zip*
137-
3. Use the [Kudu console](https://github.com/projectkudu/kudu/wiki/Kudu-console) to create a new directory */home/site/wwwroot/apm*.
137+
3. [SSH into your App Service instance](configure-linux-open-ssh-session.md) and create a new directory */home/site/wwwroot/apm*.
138138
4. Upload the Java agent files into a directory under */home/site/wwwroot/apm*. The files for your agent should be in */home/site/wwwroot/apm/appdynamics*.
139139
5. In the Azure portal, browse to your application in App Service and create a new Application Setting.
140140
141141
::: zone pivot="java-javase"
142-
142+
143143
Create an environment variable named `JAVA_OPTS` with the value `-javaagent:/home/site/wwwroot/apm/appdynamics/javaagent.jar -Dappdynamics.agent.applicationName=<app-name>` where `<app-name>` is your App Service name. If you already have an environment variable for `JAVA_OPTS`, append the `-javaagent:/...` option to the end of the current value.
144144
145145
::: zone-end
@@ -156,16 +156,16 @@ To enable via the Azure CLI, you need to create an Application Insights resource
156156
157157
::: zone-end
158158
159-
# [Linux](#tab/linux)
159+
# [Windows](#tab/windows)
160160
161161
1. Create an AppDynamics account at [AppDynamics.com](https://www.appdynamics.com/community/register/)
162162
2. Download the Java agent from the AppDynamics website. The file name is similar to *AppServerAgent-x.x.x.xxxxx.zip*
163-
3. [SSH into your App Service instance](configure-linux-open-ssh-session.md) and create a new directory */home/site/wwwroot/apm*.
163+
3. Use the [Kudu console](https://github.com/projectkudu/kudu/wiki/Kudu-console) to create a new directory */home/site/wwwroot/apm*.
164164
4. Upload the Java agent files into a directory under */home/site/wwwroot/apm*. The files for your agent should be in */home/site/wwwroot/apm/appdynamics*.
165165
5. In the Azure portal, browse to your application in App Service and create a new Application Setting.
166166
167167
::: zone pivot="java-javase"
168-
168+
169169
Create an environment variable named `JAVA_OPTS` with the value `-javaagent:/home/site/wwwroot/apm/appdynamics/javaagent.jar -Dappdynamics.agent.applicationName=<app-name>` where `<app-name>` is your App Service name. If you already have an environment variable for `JAVA_OPTS`, append the `-javaagent:/...` option to the end of the current value.
170170
171171
::: zone-end
@@ -186,20 +186,20 @@ To enable via the Azure CLI, you need to create an Application Insights resource
186186
187187
## Configure Datadog
188188
189-
# [Windows](#tab/windows)
189+
# [Linux](#tab/linux)
190190
* The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
191191
192-
# [Linux](#tab/linux)
192+
# [Windows](#tab/windows)
193193
* The configuration options are different depending on which Datadog site your organization is using. See the official [Datadog Integration for Azure Documentation](https://docs.datadoghq.com/integrations/azure/)
194194
195195
---
196196
197197
## Configure Dynatrace
198198
199-
# [Windows](#tab/windows)
199+
# [Linux](#tab/linux)
200200
* Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
201201
202-
# [Linux](#tab/linux)
202+
# [Windows](#tab/windows)
203203
* Dynatrace provides an [Azure Native Dynatrace Service](https://www.dynatrace.com/monitoring/technologies/azure-monitoring/). To monitor Azure App Services using Dynatrace, see the official [Dynatrace for Azure documentation](https://docs.datadoghq.com/integrations/azure/)
204204
205205
---

articles/app-service/configure-language-java-data-sources.md

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,96 @@ Next, determine if the data source should be available to one application or to
9696

9797
### Shared server-level resources
9898

99+
# [Linux](#tab/linux)
100+
101+
Adding a shared, server-level data source requires you to edit Tomcat's server.xml. The most reliable way to do this is as follows:
102+
103+
1. Upload a [startup script](./faq-app-service-linux.yml) and set the path to the script in **Configuration** > **Startup Command**. You can upload the startup script using [FTP](deploy-ftp.md).
104+
105+
Your startup script makes an [xsl transform](https://www.w3schools.com/xml/xsl_intro.asp) to the server.xml file and output the resulting xml file to `/usr/local/tomcat/conf/server.xml`. The startup script should install libxslt via apk. Your xsl file and startup script can be uploaded via FTP. Below is an example startup script.
106+
107+
```sh
108+
# Install libxslt. Also copy the transform file to /home/tomcat/conf/
109+
apk add --update libxslt
110+
111+
# Usage: xsltproc --output output.xml style.xsl input.xml
112+
xsltproc --output /home/tomcat/conf/server.xml /home/tomcat/conf/transform.xsl /usr/local/tomcat/conf/server.xml
113+
```
114+
115+
The following example XSL file adds a new connector node to the Tomcat server.xml.
116+
117+
```xml
118+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
119+
<xsl:output method="xml" indent="yes"/>
120+
121+
<xsl:template match="@* | node()" name="Copy">
122+
<xsl:copy>
123+
<xsl:apply-templates select="@* | node()"/>
124+
</xsl:copy>
125+
</xsl:template>
126+
127+
<xsl:template match="@* | node()" mode="insertConnector">
128+
<xsl:call-template name="Copy" />
129+
</xsl:template>
130+
131+
<xsl:template match="comment()[not(../Connector[@scheme = 'https']) and
132+
contains(., '&lt;Connector') and
133+
(contains(., 'scheme=&quot;https&quot;') or
134+
contains(., &quot;scheme='https'&quot;))]">
135+
<xsl:value-of select="." disable-output-escaping="yes" />
136+
</xsl:template>
137+
138+
<xsl:template match="Service[not(Connector[@scheme = 'https'] or
139+
comment()[contains(., '&lt;Connector') and
140+
(contains(., 'scheme=&quot;https&quot;') or
141+
contains(., &quot;scheme='https'&quot;))]
142+
)]
143+
">
144+
<xsl:copy>
145+
<xsl:apply-templates select="@* | node()" mode="insertConnector" />
146+
</xsl:copy>
147+
</xsl:template>
148+
149+
<!-- Add the new connector after the last existing Connnector if there's one -->
150+
<xsl:template match="Connector[last()]" mode="insertConnector">
151+
<xsl:call-template name="Copy" />
152+
153+
<xsl:call-template name="AddConnector" />
154+
</xsl:template>
155+
156+
<!-- ... or before the first Engine if there's no existing Connector -->
157+
<xsl:template match="Engine[1][not(preceding-sibling::Connector)]"
158+
mode="insertConnector">
159+
<xsl:call-template name="AddConnector" />
160+
161+
<xsl:call-template name="Copy" />
162+
</xsl:template>
163+
164+
<xsl:template name="AddConnector">
165+
<!-- Add new line -->
166+
<xsl:text>&#xa;</xsl:text>
167+
<!-- This is the new connector -->
168+
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
169+
maxThreads="150" scheme="https" secure="true"
170+
keystoreFile="${{user.home}}/.keystore" keystorePass="changeit"
171+
clientAuth="false" sslProtocol="TLS" />
172+
</xsl:template>
173+
174+
</xsl:stylesheet>
175+
```
176+
177+
#### Finalize configuration
178+
179+
Finally, place the driver JARs in the Tomcat classpath and restart your App Service.
180+
181+
1. Ensure that the JDBC driver files are available to the Tomcat classloader by placing them in the */home/site/lib* directory. In the [Cloud Shell](https://shell.azure.com), run `az webapp deploy --type=lib` for each driver JAR:
182+
183+
```azurecli-interactive
184+
az webapp deploy --resource-group <group-name> --name <app-name> --src-path <jar-name>.jar --type=lib --path <jar-name>.jar
185+
```
186+
187+
If you created a server-level data source, restart the App Service Linux application. Tomcat resets `CATALINA_BASE` to `/home/tomcat` and uses the updated configuration.
188+
99189
# [Windows](#tab/windows)
100190

101191
You can't directly modify a Tomcat installation for server-wide configuration because the installation location is read-only. To make server-level configuration changes to your Windows Tomcat installation, the simplest way is to do the following on app start:
@@ -281,96 +371,6 @@ Finally, you place the driver JARs in the Tomcat classpath and restart your App
281371
az webapp deploy --resource-group <group-name> --name <app-name> --src-path <jar-name>.jar --type=lib --target-path <jar-name>.jar
282372
```
283373

284-
# [Linux](#tab/linux)
285-
286-
Adding a shared, server-level data source requires you to edit Tomcat's server.xml. The most reliable way to do this is as follows:
287-
288-
1. Upload a [startup script](./faq-app-service-linux.yml) and set the path to the script in **Configuration** > **Startup Command**. You can upload the startup script using [FTP](deploy-ftp.md).
289-
290-
Your startup script makes an [xsl transform](https://www.w3schools.com/xml/xsl_intro.asp) to the server.xml file and output the resulting xml file to `/usr/local/tomcat/conf/server.xml`. The startup script should install libxslt via apk. Your xsl file and startup script can be uploaded via FTP. Below is an example startup script.
291-
292-
```sh
293-
# Install libxslt. Also copy the transform file to /home/tomcat/conf/
294-
apk add --update libxslt
295-
296-
# Usage: xsltproc --output output.xml style.xsl input.xml
297-
xsltproc --output /home/tomcat/conf/server.xml /home/tomcat/conf/transform.xsl /usr/local/tomcat/conf/server.xml
298-
```
299-
300-
The following example XSL file adds a new connector node to the Tomcat server.xml.
301-
302-
```xml
303-
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
304-
<xsl:output method="xml" indent="yes"/>
305-
306-
<xsl:template match="@* | node()" name="Copy">
307-
<xsl:copy>
308-
<xsl:apply-templates select="@* | node()"/>
309-
</xsl:copy>
310-
</xsl:template>
311-
312-
<xsl:template match="@* | node()" mode="insertConnector">
313-
<xsl:call-template name="Copy" />
314-
</xsl:template>
315-
316-
<xsl:template match="comment()[not(../Connector[@scheme = 'https']) and
317-
contains(., '&lt;Connector') and
318-
(contains(., 'scheme=&quot;https&quot;') or
319-
contains(., &quot;scheme='https'&quot;))]">
320-
<xsl:value-of select="." disable-output-escaping="yes" />
321-
</xsl:template>
322-
323-
<xsl:template match="Service[not(Connector[@scheme = 'https'] or
324-
comment()[contains(., '&lt;Connector') and
325-
(contains(., 'scheme=&quot;https&quot;') or
326-
contains(., &quot;scheme='https'&quot;))]
327-
)]
328-
">
329-
<xsl:copy>
330-
<xsl:apply-templates select="@* | node()" mode="insertConnector" />
331-
</xsl:copy>
332-
</xsl:template>
333-
334-
<!-- Add the new connector after the last existing Connnector if there's one -->
335-
<xsl:template match="Connector[last()]" mode="insertConnector">
336-
<xsl:call-template name="Copy" />
337-
338-
<xsl:call-template name="AddConnector" />
339-
</xsl:template>
340-
341-
<!-- ... or before the first Engine if there's no existing Connector -->
342-
<xsl:template match="Engine[1][not(preceding-sibling::Connector)]"
343-
mode="insertConnector">
344-
<xsl:call-template name="AddConnector" />
345-
346-
<xsl:call-template name="Copy" />
347-
</xsl:template>
348-
349-
<xsl:template name="AddConnector">
350-
<!-- Add new line -->
351-
<xsl:text>&#xa;</xsl:text>
352-
<!-- This is the new connector -->
353-
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
354-
maxThreads="150" scheme="https" secure="true"
355-
keystoreFile="${{user.home}}/.keystore" keystorePass="changeit"
356-
clientAuth="false" sslProtocol="TLS" />
357-
</xsl:template>
358-
359-
</xsl:stylesheet>
360-
```
361-
362-
#### Finalize configuration
363-
364-
Finally, place the driver JARs in the Tomcat classpath and restart your App Service.
365-
366-
1. Ensure that the JDBC driver files are available to the Tomcat classloader by placing them in the */home/site/lib* directory. In the [Cloud Shell](https://shell.azure.com), run `az webapp deploy --type=lib` for each driver JAR:
367-
368-
```azurecli-interactive
369-
az webapp deploy --resource-group <group-name> --name <app-name> --src-path <jar-name>.jar --type=lib --path <jar-name>.jar
370-
```
371-
372-
If you created a server-level data source, restart the App Service Linux application. Tomcat resets `CATALINA_BASE` to `/home/tomcat` and uses the updated configuration.
373-
374374
---
375375

376376
::: zone-end

0 commit comments

Comments
 (0)