我正在配置DevOps,以便将我的Dev ADF部署到UAT ADF实例。
我遇到了部署不删除过时管道的标准问题,并试图使用";完整的";部署模式来解决此问题。
因此DevOps完全删除了UAT ADF实例!
进一步查看文档,如果工厂不在ARM模板中,这似乎是预期的行为。查看我的ARM模板(完全由ADF生成,使用[AFAIK]完全标准设置(,它确认工厂本身不在要创建的文档资源之列。
这似乎。。。古怪的
我错过了什么吗如何将工厂包含在ARM模板中?
或者,我如何使用";完整的";部署模式而不删除目标ADF实例?
注意,我不想要使用";定义一个单独的脚本来解决这个"问题";方法是,当";完整的";模式听起来应该做我想做的事:((如果不是因为这个奇怪的删除工厂(
你是对的。我以前遇到过这个问题。为了绕过它,我建议创建一个核心ARM模板,其中包含数据工厂和数据工厂单独使用的任何必要的链接服务。这将确保";基础设施/连接";在创建新实例时部署。
如果您正在遵循Azure数据工厂CI/CD,则在部署管道并引用应在单独存储库中的ARM模板之前,这将是一项额外的Azure资源组部署任务。
以下是数据工厂w/Log Analytics的模板,让您开始使用。我加入了日志分析,因为大多数人在需要之前都没有意识到日志保留。此外,这是一种最佳实践。只需更新系统名称,因为这将创建adf-systemName环境区域Abration的命名标准。区域缩写是基于对象的动态缩写,并将在资源组中查找。
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environment": {
"type": "string",
"metadata": "Name of the environment being deployed to"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"variables": {
"systemName": "DataFactoryBaseName",
"regionReference": {
"centralus": "cus",
"eastus": "eus",
"westus": "wus"
},
"dataFactoryName": "[toLower(concat('adf-', variables('systemName'),'-', parameters('environment'),'-',variables('regionDeployment')))]",
"logAnalyticsName": "[toLower(concat('law-', variables('systemName'),'-', parameters('environment'),'-',variables('regionDeployment')))]",
"regionDeployment": "[toLower(variables('regionReference')[parameters('location')])]"
},
"resources": [
{
"name": "[variables('dataFactoryName')]",
"type": "Microsoft.DataFactory/factories",
"apiVersion": "2018-06-01",
"location": "[parameters('location')]",
"tags": {
"displayName": "Data Factory",
"ProjectName": "[variables('systemName')]",
"Environment":"[parameters('environment')]"
},
"identity": {
"type": "SystemAssigned"
}
},
{
"type": "Microsoft.OperationalInsights/workspaces",
"name": "[variables('logAnalyticsName')]",
"tags": {
"displayName": "Log Analytics",
"ProjectName": "[variables('systemName')]",
"Environment":"[parameters('environment')]"
},
"apiVersion": "2020-03-01-preview",
"location": "[parameters('location')]"
},
{
"type": "microsoft.datafactory/factories/providers/diagnosticsettings",
"name": "[concat(variables('dataFactoryName'),'/Microsoft.Insights/diagnostics')]",
"location": "[parameters('location')]",
"apiVersion": "2017-05-01-preview",
"dependsOn": [
"[resourceID('Microsoft.OperationalInsights/workspaces',variables('logAnalyticsName'))]",
"[resourceID('Microsoft.DataFactory/factories',variables('dataFactoryName'))]"
],
"properties": {
"name": "diagnostics",
"workspaceId": "[resourceID('Microsoft.OperationalInsights/workspaces',variables('logAnalyticsName'))]",
"logAnalyticsDestinationType": "Dedicated",
"logs": [
{
"category": "PipelineRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
},
{
"category": "TriggerRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
},
{
"category": "ActivityRuns",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
],
"metrics": [
{
"category": "AllMetrics",
"timeGrain": "PT1M",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
]
}
}
]
}