Skip to content

Commit fb25ad7

Browse files
Adding arm template and setup script for PredictiveMaintenanceModelingGuide
1 parent 4bae7a4 commit fb25ad7

File tree

5 files changed

+636
-1
lines changed

5 files changed

+636
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"contentVersion": "1.0.0.0",
3+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
4+
"parameters": {
5+
"adminUsername": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "Username for the Virtual Machine."
9+
}
10+
},
11+
"adminPassword": {
12+
"type": "securestring",
13+
"metadata": {
14+
"description": "Password for the Virtual Machine."
15+
}
16+
},
17+
"vmName": {
18+
"type": "string",
19+
"metadata": {
20+
"description": "Name for the Virtual Machine."
21+
}
22+
}
23+
},
24+
"variables": {
25+
"location": "[resourceGroup().location]"
26+
},
27+
"resources": [
28+
{
29+
"type": "Microsoft.Compute/virtualMachines/extensions",
30+
"name": "[concat(parameters('vmName'),'/PredictiveMaintenanceModelingGuideSetup')]",
31+
"apiVersion": "2015-05-01-preview",
32+
"location": "[variables('location')]",
33+
"properties": {
34+
"publisher": "Microsoft.Compute",
35+
"type": "CustomScriptExtension",
36+
"typeHandlerVersion": "1.7",
37+
"autoUpgradeMinorVersion": false,
38+
"settings": {
39+
"fileUris": [
40+
"https://raw.githubusercontent.com/Microsoft/SQL-Server-R-Services-Samples/master/PredictiveMaintenance/SQLR/PredictiveMaintenanceModelingGuideSetup.ps1"
41+
],
42+
"commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File PredictiveMaintenanceModelingGuideSetup.ps1 -serverName ', parameters('vmName') ,' -username ',parameters('adminUsername'),' -password ',parameters('adminPassword'))]"
43+
}
44+
}
45+
}
46+
],
47+
"outputs": {
48+
}
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
{
2+
"contentVersion": "1.0.0.0",
3+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
4+
"parameters": {
5+
"adminUsername": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "Username for the Virtual Machine"
9+
}
10+
},
11+
"adminPassword": {
12+
"type": "securestring",
13+
"metadata": {
14+
"description": "Password for the Virtual Machine"
15+
}
16+
},
17+
"vmName": {
18+
"type": "string",
19+
"metadata": {
20+
"description": "Name for the Virtual Machine"
21+
}
22+
},
23+
"vmSize": {
24+
"type": "string",
25+
"metadata": {
26+
"description": "Size for the Virtual Machine"
27+
}
28+
}
29+
},
30+
"variables": {
31+
"apiVersion": "2015-10-01",
32+
"location": "[resourceGroup().location]",
33+
"imagePublisher": "microsoft-ads",
34+
"imageOffer": "windows-data-science-vm",
35+
"sku": "windows2016",
36+
"version": "18.02.00",
37+
"OSDiskName": "osdiskforwindowssimple",
38+
"nicName": "[parameters('vmName')]",
39+
"addressPrefix": "10.0.0.0/16",
40+
"subnetName": "Subnet",
41+
"subnetPrefix": "10.0.0.0/24",
42+
"storageAccountType": "Standard_LRS",
43+
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'windsvm')]",
44+
"publicIPAddressType": "Dynamic",
45+
"publicIPAddressName": "[tolower(concat('co',parameters('vmName'),uniquestring(resourceGroup().id)))]",
46+
"vmStorageAccountContainerName": "vhds",
47+
"vmName": "[parameters('vmName')]",
48+
"vmSize": "[parameters('vmSize')]",
49+
"virtualNetworkName": "[parameters('vmName')]",
50+
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
51+
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
52+
},
53+
"resources": [
54+
{
55+
"type": "Microsoft.Storage/storageAccounts",
56+
"name": "[variables('storageAccountName')]",
57+
"apiVersion": "2015-05-01-preview",
58+
"location": "[variables('location')]",
59+
"properties": {
60+
"accountType": "[variables('storageAccountType')]"
61+
}
62+
},
63+
{
64+
"apiVersion": "2015-05-01-preview",
65+
"type": "Microsoft.Network/publicIPAddresses",
66+
"name": "[variables('publicIPAddressName')]",
67+
"location": "[variables('location')]",
68+
"properties": {
69+
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
70+
"dnsSettings": {
71+
"domainNameLabel": "[variables('publicIPAddressName')]"
72+
}
73+
}
74+
},
75+
{
76+
"apiVersion": "2015-05-01-preview",
77+
"type": "Microsoft.Network/virtualNetworks",
78+
"name": "[variables('virtualNetworkName')]",
79+
"location": "[variables('location')]",
80+
"properties": {
81+
"addressSpace": {
82+
"addressPrefixes": [
83+
"[variables('addressPrefix')]"
84+
]
85+
},
86+
"subnets": [
87+
{
88+
"name": "[variables('subnetName')]",
89+
"properties": {
90+
"addressPrefix": "[variables('subnetPrefix')]"
91+
}
92+
}
93+
]
94+
}
95+
},
96+
{
97+
"apiVersion": "2015-05-01-preview",
98+
"type": "Microsoft.Network/networkInterfaces",
99+
"name": "[variables('nicName')]",
100+
"location": "[variables('location')]",
101+
"dependsOn": [
102+
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
103+
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
104+
],
105+
"properties": {
106+
"ipConfigurations": [
107+
{
108+
"name": "ipconfig1",
109+
"properties": {
110+
"privateIPAllocationMethod": "Dynamic",
111+
"publicIPAddress": {
112+
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
113+
},
114+
"subnet": {
115+
"id": "[variables('subnetRef')]"
116+
}
117+
}
118+
}
119+
]
120+
}
121+
},
122+
{
123+
"apiVersion": "2015-06-15",
124+
"type": "Microsoft.Compute/virtualMachines",
125+
"name": "[parameters('vmName')]",
126+
"location": "[variables('location')]",
127+
"plan": {
128+
"name": "[variables('sku')]",
129+
"publisher": "[variables('imagePublisher')]",
130+
"product": "[variables('imageOffer')]"
131+
},
132+
"tags": {
133+
"Application": "DataScience"
134+
},
135+
"dependsOn": [
136+
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
137+
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
138+
],
139+
"properties": {
140+
"hardwareProfile": {
141+
"vmSize": "[variables('vmSize')]"
142+
},
143+
"osProfile": {
144+
"computerName": "[parameters('vmName')]",
145+
"adminUsername": "[parameters('adminUsername')]",
146+
"adminPassword": "[parameters('adminPassword')]"
147+
},
148+
"storageProfile": {
149+
"imageReference": {
150+
"publisher": "[variables('imagePublisher')]",
151+
"offer": "[variables('imageOffer')]",
152+
"sku": "[variables('sku')]",
153+
"version": "[variables('version')]"
154+
},
155+
"osDisk": {
156+
"name": "osdisk",
157+
"vhd": {
158+
"uri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'), parameters('vmName'), '.vhd')]"
159+
},
160+
"caching": "ReadWrite",
161+
"createOption": "FromImage"
162+
}
163+
},
164+
"networkProfile": {
165+
"networkInterfaces": [
166+
{
167+
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
168+
}
169+
]
170+
},
171+
"diagnosticsProfile": {
172+
"bootDiagnostics": {
173+
"enabled": "true",
174+
"storageUri": "[concat('http://',variables('storageAccountName'),'.blob.core.windows.net')]"
175+
}
176+
}
177+
}
178+
}
179+
],
180+
"outputs": {
181+
"vmUrl": {
182+
"value": "[concat('https://ms.portal.azure.com/#resource/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Compute/virtualMachines/', parameters('vmName'))]",
183+
"type": "string"
184+
},
185+
"vmFqdn": {
186+
"value": "[reference( variables('publicIPAddressName')).dnsSettings.fqdn]",
187+
"type": "string"
188+
},
189+
"vmAdminUsername": {
190+
"value": "[parameters('adminUsername')]",
191+
"type": "string"
192+
},
193+
"vmAdminPassword": {
194+
"value": "[parameters('adminPassword')]",
195+
"type": "string"
196+
},
197+
"sqlServerName": {
198+
"value": "[parameters('vmName')]",
199+
"type": "string"
200+
}
201+
}
202+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"contentVersion": "1.0.0.0",
3+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
4+
"parameters": {
5+
"adminUsername": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "Username for the Virtual Machine."
9+
}
10+
},
11+
"adminPassword": {
12+
"type": "securestring",
13+
"metadata": {
14+
"description": "Password for the Virtual Machine. The password must be 8 or more characters long. It must contain 1+ uppercase character(s), 1+ lowercase character(s), 1+ number(s), and 1+ special character(s) from ~!@#$%^&()-_+=|<>\/;:,."
15+
}
16+
},
17+
"vmSize": {
18+
"type": "string",
19+
"defaultValue": "Standard_DS4_v2",
20+
"allowedValues": [ "Basic_A0", "Basic_A1", "Basic_A2", "Basic_A3",
21+
"Basic_A4", "Standard_A0", "Standard_A1", "Standard_A2",
22+
"Standard_A3", "Standard_A4", "Standard_A5", "Standard_A6",
23+
"Standard_A7", "Standard_A8", "Standard_A9", "Standard_A10",
24+
"Standard_A11", "Standard_A1_v2", "Standard_A2_v2", "Standard_A4_v2",
25+
"Standard_A8_v2", "Standard_A2m_v2", "Standard_A4m_v2", "Standard_A8m_v2",
26+
"Standard_B1s", "Standard_B1ms", "Standard_B2s", "Standard_B2ms", "Standard_B4ms",
27+
"Standard_B8ms", "Standard_D1", "Standard_D2", "Standard_D3", "Standard_D4", "Standard_D11",
28+
"Standard_D12", "Standard_D13", "Standard_D14", "Standard_D1_v2", "Standard_D2_v2",
29+
"Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D2_v3", "Standard_D4_v3",
30+
"Standard_D8_v3", "Standard_D16_v3", "Standard_D32_v3", "Standard_D64_v3", "Standard_D2s_v3",
31+
"Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_D64s_v3",
32+
"Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_D15_v2",
33+
"Standard_DS1", "Standard_DS2", "Standard_DS3", "Standard_DS4", "Standard_DS11", "Standard_DS12",
34+
"Standard_DS13", "Standard_DS14", "Standard_DS1_v2", "Standard_DS2_v2", "Standard_DS3_v2",
35+
"Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2",
36+
"Standard_DS14_v2", "Standard_DS15_v2", "Standard_DS13-4_v2", "Standard_DS13-2_v2", "Standard_DS14-8_v2",
37+
"Standard_DS14-4_v2", "Standard_E2_v3", "Standard_E4_v3", "Standard_E8_v3", "Standard_E16_v3", "Standard_E32_v3",
38+
"Standard_E64_v3", "Standard_E2s_v3", "Standard_E4s_v3", "Standard_E8s_v3", "Standard_E16s_v3", "Standard_E32s_v3",
39+
"Standard_E64s_v3", "Standard_E32-16_v3", "Standard_E32-8s_v3", "Standard_E64-32s_v3", "Standard_E64-16s_v3",
40+
"Standard_F1", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_F1s", "Standard_F2s",
41+
"Standard_F4s", "Standard_F8s", "Standard_F16s", "Standard_F2s_v2", "Standard_F4s_v2", "Standard_F8s_v2",
42+
"Standard_F16s_v2", "Standard_F32s_v2", "Standard_F64s_v2", "Standard_F72s_v2", "Standard_G1", "Standard_G2",
43+
"Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", "Standard_GS3", "Standard_GS4",
44+
"Standard_GS5", "Standard_GS4-8", "Standard_GS4-4", "Standard_GS5-16", "Standard_GS5-8", "Standard_H8", "Standard_H16",
45+
"Standard_H8m", "Standard_H16m", "Standard_H16r", "Standard_H16mr", "Standard_L4s", "Standard_L8s", "Standard_L16s",
46+
"Standard_L32s", "Standard_M64s", "Standard_M64ms", "Standard_M128s", "Standard_M128ms", "Standard_M64-32ms",
47+
"Standard_M64-16ms", "Standard_M128-64ms", "Standard_M128-32ms", "Standard_NC6", "Standard_NC12", "Standard_NC24",
48+
"Standard_NC24r", "Standard_NC6s_v2", "Standard_NC12s_v2", "Standard_NC24s_v2", "Standard_NC24rs_v2", "Standard_NC6s_v3",
49+
"Standard_NC12s_v3", "Standard_NC24s_v3", "Standard_NC24rs_v3", "Standard_ND6s", "Standard_ND12s", "Standard_ND24s", "Standard_ND24rs",
50+
"Standard_NV6", "Standard_NV12", "Standard_NV24" ],
51+
"metadata": {
52+
"description": "Select a SKU for the virtual machine. Recommended SKU is 'Standard_DS4_v2'"
53+
}
54+
}
55+
},
56+
"variables": {
57+
"location": "[resourceGroup().location]",
58+
"vmName": "[toLower(concat('co', uniqueString(resourceGroup().id)))]"
59+
},
60+
"resources": [
61+
{
62+
"apiVersion": "2017-05-10",
63+
"name": "dsvmTemplate",
64+
"type": "Microsoft.Resources/deployments",
65+
"properties": {
66+
"mode": "incremental",
67+
"templateLink": {
68+
"uri":"https://raw.githubusercontent.com/Microsoft/SQL-Server-R-Services-Samples/master/PredictiveMaintenanceModelingGuide/ArmTemplates/dsvm_arm.json",
69+
"contentVersion":"1.0.0.0"
70+
},
71+
"parameters": {
72+
"adminUsername": { "value": "[parameters('adminUsername')]" },
73+
"adminPassword": { "value": "[parameters('adminPassword')]" },
74+
"vmName": { "value": "[variables('vmName')]" },
75+
"vmSize": { "value": "[parameters('vmSize')]" }
76+
}
77+
}
78+
},
79+
{
80+
"apiVersion": "2017-05-10",
81+
"name": "configureTemplate",
82+
"type": "Microsoft.Resources/deployments",
83+
"dependsOn": [
84+
"dsvmTemplate"
85+
],
86+
"properties": {
87+
"mode": "incremental",
88+
"templateLink": {
89+
"uri":"https://raw.githubusercontent.com/Microsoft/SQL-Server-R-Services-Samples/master/PredictiveMaintenanceModelingGuide/ArmTemplates/configure_arm.json",
90+
"contentVersion":"1.0.0.0"
91+
},
92+
"parameters": {
93+
"adminUsername": { "value": "[parameters('adminUsername')]" },
94+
"adminPassword": { "value": "[parameters('adminPassword')]" },
95+
"vmName": { "value": "[variables('vmName')]" }
96+
}
97+
}
98+
}
99+
]
100+
}

0 commit comments

Comments
 (0)