Skip to content

Commit c64c0a2

Browse files
committed
improved workaround for artifact download
1 parent 9cade74 commit c64c0a2

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Currently the Enterprise Agreement [billing account type](https://docs.microsoft
1616

1717
# Architecture
1818

19-
The system consists of an Azure Data Explorer cluster, an Azure Data Factory instance, and a storage account. An admin using an Azure CLI extension or Azure Cost Management automatic export push usage data in to blob containers in the storage account. Azure Data Factory will automatically push new data in to Azure Data Explorer as it arrives in the blob containers.
19+
The system consists of an Azure Data Explorer cluster, an Azure Data Factory instance, and a storage account. An admin using a command line tool or Azure Cost Management automatic export push usage data in to blob containers in the storage account. Azure Data Factory will automatically push new data in to Azure Data Explorer as it arrives in the blob containers.
2020

2121
![img](docs/images/usage-pipeline.svg)
2222

@@ -53,6 +53,7 @@ kustoDatabaseName | Name for the azmeta database in your Kusto cluster.
5353
storageAccountName | Globally unique name for the storage account. Lowercase letters and numbers. 3-24 characters.
5454
dataFactoryName | Globally unique name for the data factory. Alphanumerics and hyphens. Start and end with alphanumeric. 3-63 characters.
5555
preProduction | Deploy for pre-production use. Uses development (no-SLA) SKU for Azure Data Explorer.
56+
updating | Set to true if redeploying the template. Data Factory trigger resources can not be redeployed while they are enabled.
5657
_artifactsLocation | The base URI where artifacts required by this template are located including a trailing '/'. This defaults to the latest release artifact location in GitHub. You may choose to mirror these artifacts for security/audit reasons. Use this parameter to provide your mirror.
5758

5859
### Azure CLI Tutorial

azuredeploy.json

+15-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,15 @@
3737
"description": "Deploy for pre-production use. Uses development SKU for Azure Data Explorer."
3838
}
3939
},
40+
"updating": {
41+
"type": "bool",
42+
"defaultValue": false,
43+
"metadata": {
44+
"description": "Set to true if redeploying the template. Data Factory trigger resources can not be redeployed while they are enabled."
45+
}
46+
},
4047
"_artifactsLocation": {
41-
"defaultValue": "https://github.com/wpbrown/azmeta-pipeline/releases/download/v2.0.0/",
48+
"defaultValue": "https://github.com/wpbrown/azmeta-pipeline/releases/latest/download/",
4249
"type": "string",
4350
"metadata": {
4451
"description": "The base URI where artifacts required by this template are located including a trailing '/'"
@@ -145,10 +152,13 @@
145152
{
146153
"name": "AZMETA_DATABASE",
147154
"value": "[parameters('kustoDatabaseName')]"
155+
},
156+
{
157+
"name": "AZMETA_DB_INIT_URL",
158+
"value": "[concat(parameters('_artifactsLocation'), 'db_init.pyz')]"
148159
}
149160
],
150-
"scriptContent": "python3 db_init.pyz \"${AZMETA_CLUSTER}\" \"${AZMETA_DATABASE}\"",
151-
"supportingScriptUris": [ "[concat(parameters('_artifactsLocation'), 'db_init.pyz')]" ],
161+
"scriptContent": "curl -LO --retry-connrefused --retry 5 \"${AZMETA_DB_INIT_URL}\"; python3 db_init.pyz \"${AZMETA_CLUSTER}\" \"${AZMETA_DATABASE}\"",
152162
"timeout": "PT30M",
153163
"cleanupPreference": "OnSuccess",
154164
"retentionInterval": "P1D"
@@ -649,6 +659,7 @@
649659
]
650660
},
651661
{
662+
"condition": "[not(parameters('updating'))]",
652663
"name": "[concat(parameters('dataFactoryName'), '/trigger_usage_final_amortized')]",
653664
"type": "Microsoft.DataFactory/factories/triggers",
654665
"apiVersion": "2018-06-01",
@@ -681,6 +692,7 @@
681692
]
682693
},
683694
{
695+
"condition": "[not(parameters('updating'))]",
684696
"name": "[concat(parameters('dataFactoryName'), '/trigger_usage_preliminary_amortized')]",
685697
"type": "Microsoft.DataFactory/factories/triggers",
686698
"apiVersion": "2018-06-01",

0 commit comments

Comments
 (0)