-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Clemens Vasters <clemens@vasters.com>
- Loading branch information
Showing
6 changed files
with
575 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,258 @@ | ||
{ | ||
"parameters": { | ||
"logAnalyticsWorkspaceId": { | ||
"metadata": { | ||
"description": "The Id of the Log Analytics workspace. In the portal, you find this under Settings -> Agents -> Windows/Linux Servers -> Agent Instructions." | ||
}, | ||
"type": "string" | ||
}, | ||
"imageName": { | ||
"defaultValue": "ghcr.io/clemensv/real-time-sources-mode-s:latest", | ||
"metadata": { | ||
"description": "The name of the container image." | ||
}, | ||
"type": "string" | ||
}, | ||
"logAnalyticsWorkspaceKey": { | ||
"metadata": { | ||
"description": "The primary or secondary key of the Log Analytics workspace. In the portal, you find this under Settings -> Agents -> Windows/Linux Servers -> Agent Instructions." | ||
}, | ||
"type": "securestring" | ||
}, | ||
"connectionStringSecret": { | ||
"metadata": { | ||
"description": "The Microsoft Fabric Event Stream custom input endpoint or Azure Event Hubs connection string." | ||
}, | ||
"type": "securestring" | ||
}, | ||
"feedUrls": { | ||
"defaultValue": "", | ||
"metadata": { | ||
"description": "Comma-separated list of feed URLs (RSS or OPML)" | ||
}, | ||
"type": "string" | ||
}, | ||
"appName": { | ||
"defaultValue": "[if(empty(resourceGroup().name), 'mode-s', resourceGroup().name)]", | ||
"maxLength": 64, | ||
"metadata": { | ||
"description": "The name of the container instance." | ||
}, | ||
"type": "string" | ||
} | ||
}, | ||
"variables": { | ||
"fileShareName": "fileshare", | ||
"storageAccountName": "[concat(replace(parameters('appName'), '-', ''), 'stg')]" | ||
"storageAccountName": "[concat(replace(parameters('appName'), '-', ''), 'stg')]", | ||
"fileShareName": "fileshare" | ||
}, | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"sku": { | ||
"name": "Standard_LRS" | ||
}, | ||
"location": "[resourceGroup().location]", | ||
"type": "Microsoft.Storage/storageAccounts", | ||
"name": "[variables('storageAccountName')]", | ||
"kind": "StorageV2", | ||
"properties": { | ||
"accessTier": "Hot" | ||
}, | ||
"kind": "StorageV2", | ||
"apiVersion": "2021-04-01", | ||
"name": "[variables('storageAccountName')]", | ||
"sku": { | ||
"name": "Standard_LRS" | ||
} | ||
"type": "Microsoft.Storage/storageAccounts" | ||
}, | ||
{ | ||
"location": "[resourceGroup().location]", | ||
"type": "Microsoft.Storage/storageAccounts/fileServices", | ||
"name": "[concat(variables('storageAccountName'), '/default/')]", | ||
"properties": { | ||
"protocolSettings": { | ||
"smb": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"apiVersion": "2021-04-01", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" | ||
], | ||
"apiVersion": "2021-04-01", | ||
"name": "[concat(variables('storageAccountName'), '/default/')]" | ||
"type": "Microsoft.Storage/storageAccounts/fileServices" | ||
}, | ||
{ | ||
"location": "[resourceGroup().location]", | ||
"type": "Microsoft.Storage/storageAccounts/fileServices/shares", | ||
"name": "[concat(variables('storageAccountName'), '/default/', variables('fileShareName'))]", | ||
"properties": { | ||
"shareQuota": 5120 | ||
}, | ||
"apiVersion": "2021-04-01", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" | ||
], | ||
"apiVersion": "2021-04-01", | ||
"name": "[concat(variables('storageAccountName'), '/default/', variables('fileShareName'))]" | ||
"type": "Microsoft.Storage/storageAccounts/fileServices/shares" | ||
}, | ||
{ | ||
"name": "[parameters('appName')]", | ||
"apiVersion": "2021-09-01", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"volumes": [ | ||
{ | ||
"azureFile": { | ||
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value]", | ||
"shareName": "[variables('fileShareName')]", | ||
"storageAccountName": "[variables('storageAccountName')]" | ||
}, | ||
"name": "azurefilevolume" | ||
} | ||
], | ||
"restartPolicy": "Always", | ||
"osType": "Linux", | ||
"diagnostics": { | ||
"logAnalytics": { | ||
"workspaceId": "[parameters('logAnalyticsWorkspaceId')]", | ||
"workspaceKey": "[parameters('logAnalyticsWorkspaceKey')]" | ||
} | ||
}, | ||
"containers": [ | ||
{ | ||
"name": "[parameters('appName')]", | ||
"properties": { | ||
"image": "[parameters('imageName')]", | ||
"resources": { | ||
"requests": { | ||
"memoryInGB": 1, | ||
"cpu": 0.5 | ||
} | ||
}, | ||
"volumeMounts": [ | ||
{ | ||
"name": "azurefilevolume", | ||
"mountPath": "/mnt/fileshare" | ||
"mountPath": "/mnt/fileshare", | ||
"name": "azurefilevolume" | ||
} | ||
], | ||
"image": "[parameters('imageName')]", | ||
"environmentVariables": [ | ||
{ | ||
"name": "CONNECTION_STRING", | ||
"secureValue": "[parameters('connectionStringSecret')]" | ||
"value": "[parameters('dump1090Host')]", | ||
"name": "DUMP1090_HOST" | ||
}, | ||
{ | ||
"name": "LOG_LEVEL", | ||
"value": "INFO" | ||
"value": "[parameters('dump1090Port')]", | ||
"name": "DUMP1090_PORT" | ||
}, | ||
{ | ||
"name": "USGS_LAST_POLLED_FILE", | ||
"value": "/mnt/fileshare/usgs_last_polled.json" | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"memoryInGB": 1, | ||
"cpu": 0.5 | ||
"value": "[parameters('refLat')]", | ||
"name": "REF_LAT" | ||
}, | ||
{ | ||
"value": "[parameters('refLon')]", | ||
"name": "REF_LON" | ||
}, | ||
{ | ||
"value": "[parameters('stationId')]", | ||
"name": "STATIONID" | ||
}, | ||
{ | ||
"secureValue": "[parameters('connectionStringSecret')]", | ||
"name": "CONNECTION_STRING" | ||
}, | ||
{ | ||
"value": "[parameters('kafkaBootstrapServers')]", | ||
"name": "KAFKA_BOOTSTRAP_SERVERS" | ||
}, | ||
{ | ||
"value": "[parameters('kafkaTopic')]", | ||
"name": "KAFKA_TOPIC" | ||
}, | ||
{ | ||
"value": "[parameters('saslUsername')]", | ||
"name": "SASL_USERNAME" | ||
}, | ||
{ | ||
"secureValue": "[parameters('saslPassword')]", | ||
"name": "SASL_PASSWORD" | ||
}, | ||
{ | ||
"value": "[parameters('pollingInterval')]", | ||
"name": "POLLING_INTERVAL" | ||
}, | ||
{ | ||
"value": "[parameters('logLevel')]", | ||
"name": "LOG_LEVEL" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"restartPolicy": "Always", | ||
"diagnostics": { | ||
"logAnalytics": { | ||
"workspaceKey": "[parameters('logAnalyticsWorkspaceKey')]", | ||
"workspaceId": "[parameters('logAnalyticsWorkspaceId')]" | ||
] | ||
}, | ||
"name": "[parameters('appName')]" | ||
} | ||
}, | ||
"volumes": [ | ||
{ | ||
"name": "azurefilevolume", | ||
"azureFile": { | ||
"shareName": "[variables('fileShareName')]", | ||
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value]", | ||
"storageAccountName": "[variables('storageAccountName')]" | ||
} | ||
} | ||
], | ||
"osType": "Linux" | ||
] | ||
}, | ||
"type": "Microsoft.ContainerInstance/containerGroups", | ||
"apiVersion": "2021-09-01" | ||
"name": "[parameters('appName')]" | ||
} | ||
], | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"dump1090Port": { | ||
"metadata": { | ||
"description": "TCP port dump1090 listens on." | ||
}, | ||
"type": "string", | ||
"defaultValue": "30005" | ||
}, | ||
"stationId": { | ||
"metadata": { | ||
"description": "Station ID for event source attribution." | ||
}, | ||
"type": "string", | ||
"defaultValue": "station1" | ||
}, | ||
"dump1090Host": { | ||
"metadata": { | ||
"description": "Hostname or IP address of dump1090." | ||
}, | ||
"type": "string", | ||
"defaultValue": "localhost" | ||
}, | ||
"logAnalyticsWorkspaceId": { | ||
"metadata": { | ||
"description": "The Id of the Log Analytics workspace. In the portal, you find this under Settings -> Agents -> Windows/Linux Servers -> Agent Instructions." | ||
}, | ||
"type": "string" | ||
}, | ||
"saslPassword": { | ||
"metadata": { | ||
"description": "Password for SASL authentication." | ||
}, | ||
"type": "securestring" | ||
}, | ||
"connectionStringSecret": { | ||
"metadata": { | ||
"description": "The Microsoft Fabric Event Stream custom input endpoint or Azure Event Hubs connection string." | ||
}, | ||
"type": "securestring" | ||
}, | ||
"imageName": { | ||
"metadata": { | ||
"description": "The name of the container image." | ||
}, | ||
"type": "string", | ||
"defaultValue": "ghcr.io/clemensv/real-time-sources-mode-s:latest" | ||
}, | ||
"refLat": { | ||
"metadata": { | ||
"description": "Latitude of the receiving antenna." | ||
}, | ||
"type": "string", | ||
"defaultValue": "0" | ||
}, | ||
"refLon": { | ||
"metadata": { | ||
"description": "Longitude of the receiving antenna." | ||
}, | ||
"type": "string", | ||
"defaultValue": "0" | ||
}, | ||
"saslUsername": { | ||
"metadata": { | ||
"description": "Username for SASL authentication." | ||
}, | ||
"type": "string", | ||
"defaultValue": "" | ||
}, | ||
"logLevel": { | ||
"metadata": { | ||
"description": "Logging level." | ||
}, | ||
"type": "string", | ||
"defaultValue": "INFO" | ||
}, | ||
"logAnalyticsWorkspaceKey": { | ||
"metadata": { | ||
"description": "The primary or secondary key of the Log Analytics workspace. In the portal, you find this under Settings -> Agents -> Windows/Linux Servers -> Agent Instructions." | ||
}, | ||
"type": "securestring" | ||
}, | ||
"appName": { | ||
"metadata": { | ||
"description": "The name of the container instance." | ||
}, | ||
"maxLength": 64, | ||
"type": "string", | ||
"defaultValue": "[if(empty(resourceGroup().name), 'mode-s', resourceGroup().name)]" | ||
}, | ||
"pollingInterval": { | ||
"metadata": { | ||
"description": "Polling interval in seconds." | ||
}, | ||
"type": "string", | ||
"defaultValue": "60" | ||
}, | ||
"kafkaTopic": { | ||
"metadata": { | ||
"description": "Kafka topic to publish messages." | ||
}, | ||
"type": "string", | ||
"defaultValue": "" | ||
}, | ||
"kafkaBootstrapServers": { | ||
"metadata": { | ||
"description": "Kafka bootstrap servers." | ||
}, | ||
"type": "string", | ||
"defaultValue": "" | ||
} | ||
} | ||
} |
Oops, something went wrong.