-
Notifications
You must be signed in to change notification settings - Fork 0
/
azuredeploy.json
141 lines (140 loc) · 4.84 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subnetId": {
"type": "string"
},
"vmSize": {
"type": "string",
"allowedValues": [
"Standard_DS1_v2",
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_DS11_v2",
"Standard_DS12_v2",
"Standard_DS13_v2",
"Standard_DS14_v2",
"Standard_DS15_v2"
],
"defaultValue": "Standard_DS2_v2"
},
"adminUsername": {
"type": "string",
"defaultValue": "EnterpriseAdmin"
},
"adminPassword": {
"type": "securestring"
},
"vmName": {
"type": "string",
"defaultValue": "ase-build-agent"
},
"ImagePublisher": {
"type": "string",
"defaultValue": "MicrosoftVisualStudio"
},
"ImageOffer": {
"type": "string",
"defaultValue": "VisualStudio"
},
"ImageSku": {
"type": "string",
"defaultValue": "VS-2017-Ent-Latest-WS2016"
},
"TSServerUrl": {
"type": "string"
},
"AgentPool": {
"type": "string"
},
"PAToken": {
"type": "string"
},
"AseIp": {
"type": "string"
},
"AppDns": {
"type": "string"
}
},
"variables": {
"baseUri": "[deployment().properties.templateLink.uri]",
"windowsVmTemplateURL": "[uri(variables('baseUri'),'../primitives/windowsvm.json')]",
"AgentConfigureModuleURL": "[uri(variables('baseUri'), 'DSC/ConfigureASEBuildAgent.ps1.zip')]",
"AgentConfigureFunction": "ConfigureASEBuildAgent.ps1\\ConfigureASEBuildAgentDsc",
"agentDownloadUrl": "https://vstsagentpackage.azureedge.net/agent/2.127.0/vsts-agent-win-x64-2.127.0.zip",
},
"resources": [
{
"name": "AgentVM",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('windowsVmTemplateURL')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"vmName": {
"value": "[parameters('vmName')]"
},
"vmSize": {
"value": "[parameters('vmSize')]"
},
"subnetId": {
"value": "[parameters('subnetId')]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"assignPublicIP": {
"value": false
},
"imagePublisher": {
"value": "[parameters('ImagePublisher')]"
},
"imageOffer": {
"value": "[parameters('ImageOffer')]"
},
"imageSku": {
"value": "[parameters('ImageSku')]"
}
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'), '/configureagent')]",
"dependsOn": [
"[resourceId('Microsoft.Resources/deployments', 'AgentVM')]"
],
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.21",
"autoUpgradeMinorVersion": true,
"settings": {
"modulesURL": "[variables('AgentConfigureModuleURL')]",
"configurationFunction": "[variables('AgentConfigureFunction')]",
"properties": {
"TSUrl": "[parameters('TSServerUrl')]",
"VSTSAgentUrl": "[variables('agentDownloadUrl')]",
"AgentPool": "[parameters('AgentPool')]",
"PAToken": "[parameters('PAToken')]",
"AseIp": "[parameters('AseIp')]",
"AppDns": "[parameters('AppDns')]"
}
}
}
}
]
}