зеркало из https://github.com/Azure/AzureDSVM.git
288 строки
11 KiB
JSON
288 строки
11 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"variables": {},
|
|
"parameters": {
|
|
"location": {
|
|
"defaultValue": null,
|
|
"type": "String"
|
|
},
|
|
"virtualMachineSize": {
|
|
"defaultValue": null,
|
|
"type": "String"
|
|
},
|
|
"adminUsername": {
|
|
"defaultValue": null,
|
|
"type": "String"
|
|
},
|
|
"virtualMachines_adminPassword": {
|
|
"defaultValue": null,
|
|
"type": "SecureString"
|
|
},
|
|
"virtualMachines_adminPublicKey": {
|
|
"defaultValue": null,
|
|
"type": "SecureString"
|
|
},
|
|
"virtualMachines_name": {
|
|
"defaultValue": "newdsvm",
|
|
"type": "String"
|
|
},
|
|
"networkInterfaces_name": {
|
|
"defaultValue": "newdsvm-ni",
|
|
"type": "String"
|
|
},
|
|
"networkSecurityGroups_nsg_name": {
|
|
"defaultValue": "newdsvm-nsg",
|
|
"type": "String"
|
|
},
|
|
"publicIPAddresses_ip_name": {
|
|
"defaultValue": "newdsvm-ip",
|
|
"type": "String"
|
|
},
|
|
"virtualNetworks_name": {
|
|
"defaultValue": "dsvm-vnet",
|
|
"type": "String"
|
|
},
|
|
"storageAccounts_name": {
|
|
"defaultValue": "dsvmdisks",
|
|
"type": "String"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.Compute/virtualMachines",
|
|
"name": "[parameters('virtualMachines_name')]",
|
|
"apiVersion": "2016-04-30-preview",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"hardwareProfile": {
|
|
"vmSize": "[parameters('virtualMachineSize')]"
|
|
},
|
|
"storageProfile": {
|
|
"imageReference": {
|
|
"publisher": "MicrosoftRServer",
|
|
"offer": "RServer-Ubuntu",
|
|
"sku": "Enterprise",
|
|
"version": "latest"
|
|
},
|
|
"osDisk": {
|
|
"name": "[parameters('virtualMachines_name')]",
|
|
"createOption": "FromImage",
|
|
"vhd": {
|
|
"uri": "[concat('https', '://', parameters('storageAccounts_name'), '.blob.core.windows.net', concat('/vhds/', parameters('virtualMachines_name'),'20168192442.vhd'))]"
|
|
},
|
|
"caching": "ReadWrite"
|
|
}
|
|
},
|
|
"osProfile": {
|
|
"computerName": "[parameters('virtualMachines_name')]",
|
|
"adminUsername": "[parameters('adminUsername')]",
|
|
"linuxConfiguration": {
|
|
"disablePasswordAuthentication": true,
|
|
"ssh": {
|
|
"publicKeys": [
|
|
{
|
|
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
|
|
"keyData": "[parameters('virtualMachines_adminPublicKey')]"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"adminPassword": "[parameters('virtualMachines_adminPassword')]"
|
|
},
|
|
"networkProfile": {
|
|
"networkInterfaces": [
|
|
{
|
|
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_name'))]"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"resources": [],
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]",
|
|
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_name'))]"
|
|
]
|
|
},
|
|
{
|
|
"type": "Microsoft.Network/networkInterfaces",
|
|
"name": "[parameters('networkInterfaces_name')]",
|
|
"apiVersion": "2016-03-30",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"ipConfigurations": [
|
|
{
|
|
"name": "ipconfig1",
|
|
"properties": {
|
|
"privateIPAddress": "10.0.0.4",
|
|
"privateIPAllocationMethod": "Dynamic",
|
|
"publicIPAddress": {
|
|
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_ip_name'))]"
|
|
},
|
|
"subnet": {
|
|
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_name')), '/subnets/default')]"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"dnsSettings": {
|
|
"dnsServers": []
|
|
},
|
|
"enableIPForwarding": false,
|
|
"networkSecurityGroup": {
|
|
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_name'))]"
|
|
}
|
|
},
|
|
"resources": [],
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_ip_name'))]",
|
|
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_name'))]",
|
|
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_nsg_name'))]"
|
|
]
|
|
},
|
|
{
|
|
"type": "Microsoft.Network/networkSecurityGroups",
|
|
"name": "[parameters('networkSecurityGroups_nsg_name')]",
|
|
"apiVersion": "2016-03-30",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"securityRules": [
|
|
{
|
|
"name": "Jupyter",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "9999",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1010,
|
|
"direction": "Inbound"
|
|
}
|
|
},
|
|
{
|
|
"name": "JupyterHub",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "8000",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1020,
|
|
"direction": "Inbound"
|
|
}
|
|
},
|
|
{
|
|
"name": "default-allow-ssh",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "22",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1030,
|
|
"direction": "Inbound"
|
|
}
|
|
},
|
|
{
|
|
"name": "parallel-node",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "11000-11999",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1040,
|
|
"direction": "Inbound"
|
|
}
|
|
},
|
|
{
|
|
"name": "Rstudio-server",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "8787",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1050,
|
|
"direction": "Inbound"
|
|
}
|
|
},
|
|
{
|
|
"name": "allowROp",
|
|
"properties": {
|
|
"protocol": "TCP",
|
|
"sourcePortRange": "*",
|
|
"destinationPortRange": "12800",
|
|
"sourceAddressPrefix": "*",
|
|
"destinationAddressPrefix": "*",
|
|
"access": "Allow",
|
|
"priority": 1060,
|
|
"direction": "Inbound"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"resources": [],
|
|
"dependsOn": []
|
|
},
|
|
{
|
|
"type": "Microsoft.Network/publicIPAddresses",
|
|
"name": "[parameters('publicIPAddresses_ip_name')]",
|
|
"apiVersion": "2016-03-30",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"publicIPAllocationMethod": "Dynamic",
|
|
"idleTimeoutInMinutes": 4,
|
|
"dnsSettings": {
|
|
"domainNameLabel": "<DNS_LABEL>"
|
|
}
|
|
},
|
|
"resources": [],
|
|
"dependsOn": []
|
|
},
|
|
{
|
|
"type": "Microsoft.Network/virtualNetworks",
|
|
"name": "[parameters('virtualNetworks_name')]",
|
|
"apiVersion": "2016-03-30",
|
|
"location": "[resourceGroup().location]",
|
|
"properties": {
|
|
"addressSpace": {
|
|
"addressPrefixes": [
|
|
"10.0.0.0/16"
|
|
]
|
|
},
|
|
"subnets": [
|
|
{
|
|
"name": "default",
|
|
"properties": {
|
|
"addressPrefix": "10.0.0.0/24"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"resources": [],
|
|
"dependsOn": []
|
|
},
|
|
{
|
|
"type": "Microsoft.Storage/storageAccounts",
|
|
"sku": {
|
|
"name": "Standard_LRS",
|
|
"tier": "Standard"
|
|
},
|
|
"kind": "Storage",
|
|
"name": "[parameters('storageAccounts_name')]",
|
|
"apiVersion": "2016-01-01",
|
|
"location": "[resourceGroup().location]",
|
|
"tags": {},
|
|
"properties": {},
|
|
"resources": [],
|
|
"dependsOn": []
|
|
}
|
|
]
|
|
}
|