Skip to content

(DOCS-11502) - Adds new ARM deployment #30474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
225 changes: 225 additions & 0 deletions Azure-App-Service-Linux-Deploy-Template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appServiceName": {
"type": "string",
"metadata": {
"description": "Name of the Azure App Service"
},
"minLength": 2,
"maxLength": 60
},
"appServicePlanName": {
"type": "string",
"defaultValue": "[concat(parameters('appServiceName'), '-plan')]",
"metadata": {
"description": "Name of the App Service Plan"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources"
}
},
"sku": {
"type": "string",
"defaultValue": "B1",
"allowedValues": [
"B1",
"B2",
"B3",
"S1",
"S2",
"S3",
"P1",
"P2",
"P3"
],
"metadata": {
"description": "App Service Plan SKU"
}
},
"ddApiKey": {
"type": "securestring",
"metadata": {
"description": "Your Datadog API Key"
}
},
"ddSite": {
"type": "string",
"defaultValue": "datadoghq.com",
"allowedValues": [
"datadoghq.com",
"datadoghq.eu",
"us3.datadoghq.com",
"us5.datadoghq.com",
"ap1.datadoghq.com",
"ddog-gov.com"
],
"metadata": {
"description": "Your Datadog Site"
}
},
"ddService": {
"type": "string",
"defaultValue": "[parameters('appServiceName')]",
"metadata": {
"description": "Service name for Datadog APM"
}
},
"ddEnv": {
"type": "string",
"defaultValue": "production",
"metadata": {
"description": "Environment name for Datadog APM"
}
},
"ddVersion": {
"type": "string",
"defaultValue": "1.0.0",
"metadata": {
"description": "Version for Datadog APM"
}
},
"ddServerlessLogPath": {
"type": "string",
"defaultValue": "/home/LogFiles/*.log",
"metadata": {
"description": "Log path for Datadog sidecar log collection"
}
},
"runtime": {
"type": "string",
"defaultValue": "NODE|18-lts",
"allowedValues": [
"NODE|18-lts",
"NODE|20-lts",
"PYTHON|3.9",
"PYTHON|3.10",
"PYTHON|3.11",
"DOTNETCORE|6.0",
"DOTNETCORE|7.0",
"DOTNETCORE|8.0",
"JAVA|11",
"JAVA|17",
"JAVA|21",
"PHP|8.1",
"PHP|8.2"
],
"metadata": {
"description": "Runtime stack for the App Service"
}
}
},
"variables": {
"sidecarImageName": "datadog/serverless-init:latest"
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2022-09-01",
"name": "[parameters('appServicePlanName')]",
"location": "[parameters('location')]",
"kind": "linux",
"properties": {
"reserved": true
},
"sku": {
"name": "[parameters('sku')]"
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "[parameters('appServiceName')]",
"location": "[parameters('location')]",
"kind": "app,linux,container",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]",
"siteConfig": {
"linuxFxVersion": "[parameters('runtime')]",
"appSettings": [
{
"name": "DD_API_KEY",
"value": "[parameters('ddApiKey')]"
},
{
"name": "DD_SITE",
"value": "[parameters('ddSite')]"
},
{
"name": "DD_SERVICE",
"value": "[parameters('ddService')]"
},
{
"name": "DD_ENV",
"value": "[parameters('ddEnv')]"
},
{
"name": "DD_VERSION",
"value": "[parameters('ddVersion')]"
},
{
"name": "DD_SERVERLESS_LOG_PATH",
"value": "[parameters('ddServerlessLogPath')]"
},
{
"name": "DD_TRACE_ENABLED",
"value": "true"
},
{
"name": "DD_LOGS_INJECTION",
"value": "true"
},
{
"name": "DD_RUNTIME_METRICS_ENABLED",
"value": "true"
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "true"
},
{
"name": "WEBSITES_PORT",
"value": "8080"
}
]
}
}
},
{
"type": "Microsoft.Web/sites/siteextensions",
"apiVersion": "2022-09-01",
"name": "[concat(parameters('appServiceName'), '/DatadogAgentExtension')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appServiceName'))]"
],
"properties": {}
}
],
"outputs": {
"appServiceName": {
"type": "string",
"value": "[parameters('appServiceName')]"
},
"appServiceUrl": {
"type": "string",
"value": "[concat('https://', reference(resourceId('Microsoft.Web/sites', parameters('appServiceName'))).defaultHostName)]"
},
"datadogConfiguration": {
"type": "object",
"value": {
"service": "[parameters('ddService')]",
"environment": "[parameters('ddEnv')]",
"version": "[parameters('ddVersion')]",
"site": "[parameters('ddSite')]"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,27 @@
{{% tab "Manual" %}}

1. **Configure environment variables**.

### Quick Deploy Option

Check warning on line 125 in content/en/serverless/azure_app_services/azure_app_services_linux.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Quick Deploy Option' should use sentence-style capitalization.

To streamline the setup process, you can use the "Deploy to Azure" button below to automatically create an Azure App Service (Linux) with all required DataDog application settings pre-configured:

Check notice on line 127 in content/en/serverless/azure_app_services/azure_app_services_linux.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FDataDog%2Fdatadog-azure-templates%2Fmain%2Fapp-service-linux%2Fazuredeploy.json)

This template automatically configures:
- Azure App Service (Linux) with your chosen runtime
- All required DataDog environment variables (DD_API_KEY, DD_SITE, DD_SERVICE, etc.)
- Sidecar container configuration for DataDog monitoring
- Proper storage settings for log collection

After deployment, you can proceed directly to step 2 (Configure a sidecar container) or continue with the manual configuration below.

---

### Manual Configuration

Check warning on line 141 in content/en/serverless/azure_app_services/azure_app_services_linux.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Manual Configuration' should use sentence-style capitalization.

Alternatively, you can manually configure the environment variables:

In Azure, add the following key-value pairs in **Settings** > **Configuration** > **Application settings**:

| Name | Value | Description |
Expand Down
Loading