forked from dremio/dremio-cloud-tools
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azuredeploy.json
187 lines (186 loc) · 8.08 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"clusterName": {
"type": "string",
"defaultValue": "mydremio",
"metadata": {
"description": "Dremio cluster name in Azure."
}
},
"clusterSize": {
"type": "string",
"allowedValues": ["X-Small (1 executor)", "Small (5 executors)", "Medium (10 executors)", "Large (25 executors)", "X-Large (50 executors)"],
"metadata": {
"description": "The type and number of machines are chosen based on the size selected."
}
},
"SSHUsername": {
"type": "string",
"defaultValue": "azuser",
"metadata": {
"description": "SSH username for the virtual machines. (Can be used to SSH into machines for changing configuration, reviewing logs, etc.)"
}
},
"authenticationType": {
"type": "string",
"defaultValue": "password",
"allowedValues": [
"password",
"SSHPublicKey"
],
"metadata": {
"description": "Type of authentication to use for SSH."
}
},
"PasswordOrSSHPublicKey": {
"type": "securestring",
"metadata": {
"description": "Password or ssh public key for the virtual machines. If password, password must be minimum 8 characters with at least 1 upper case letter, 1 lower case letter and 1 number."
}
},
"useExistingSubnet": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Optional - resource id of existing subnet to deploy to; the subnet needs to be in the same region as the cluster. If empty, a new virtual network and subnet will be created."
}
},
"usePrivateIP": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Select true if you are using existing subnet and you want to use an internal ip from the subnet to access Dremio."
}
},
"dremioBinary": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Optional - publicly accessible URL to a Dremio installation rpm"
}
}
},
"variables": {
"baseURI": "https://raw.githubusercontent.com/dremio/dremio-cloud-tools/master/azure/arm-templates/nested/",
"apiVersion": "2018-05-01",
"shortName": "[take(resourceGroup().name, 40)]",
"rgName": "[resourceGroup().name]",
"location": "[resourceGroup().location]",
"stateRgName": "[resourceGroup().name]",
"dataDiskName": "[concat(parameters('clusterName'), '-master-data-disk')]",
"dataDiskId": "[concat(subscription().id, '/resourceGroups/', variables('stateRgName'), '/providers/Microsoft.Compute/disks/', variables('dataDiskName'))]",
"clusterSizes": {
"X-Small (1 executor)": {
"coordinatorVmSize": "Standard_D4_v3",
"coordinatorCount": 0,
"executorVmSize": "Standard_E16s_v3",
"executorCount": 1,
"metadataDiskSize": 10
},
"Small (5 executors)": {
"coordinatorVmSize": "Standard_D4_v3",
"coordinatorCount": 0,
"executorVmSize": "Standard_E16s_v3",
"executorCount": 5,
"metadataDiskSize": 50
},
"Medium (10 executors)": {
"coordinatorVmSize": "Standard_D8_v3",
"coordinatorCount": 0,
"executorVmSize": "Standard_E16s_v3",
"executorCount": 10,
"metadataDiskSize": 100
},
"Large (25 executors)": {
"coordinatorVmSize": "Standard_D8_v3",
"coordinatorCount": 0,
"executorVmSize": "Standard_E16s_v3",
"executorCount": 25,
"metadataDiskSize": 100
},
"X-Large (50 executors)": {
"coordinatorVmSize": "Standard_D8_v3",
"coordinatorCount": 0,
"executorVmSize": "Standard_E16s_v3",
"executorCount": 50,
"metadataDiskSize": 100
}
}
},
"resources": [
{
"apiVersion": "2018-02-01",
"name": "pid-1f30d282-b6d2-5dc6-9630-85533cc11b98",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersion')]",
"name": "[concat(variables('shortName'), '-state-deployment')]",
"resourceGroup": "[variables('stateRgName')]",
"dependsOn": [
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('baseURI'), 'dremioState.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"dremioClusterName": {"value": "[parameters('clusterName')]"},
"dataDiskName": {"value": "[variables('dataDiskName')]"},
"dataDiskSize": {"value": "[variables('clusterSizes')[parameters('clusterSize')].metadataDiskSize]"},
"virtualNetworkNewOrExisting": {"value": "[if(equals(trim(parameters('useExistingSubnet')), ''), 'new', 'existing')]"},
"existingSubnet": {"value": "[parameters('useExistingSubnet')]"}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersion')]",
"name": "[concat(variables('shortName'), '-compute-deployment')]",
"resourceGroup": "[variables('rgName')]",
"dependsOn": [
"[concat(variables('shortName'), '-state-deployment')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('baseURI'), 'dremioCluster.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"dremioClusterName": {"value": "[parameters('clusterName')]"},
"executorCount": {"value": "[variables('clusterSizes')[parameters('clusterSize')].executorCount]"},
"executorVmSize": {"value": "[variables('clusterSizes')[parameters('clusterSize')].executorVmSize]"},
"coordinatorCount": {"value": "[variables('clusterSizes')[parameters('clusterSize')].coordinatorCount]"},
"coordinatorVmSize": {"value": "[variables('clusterSizes')[parameters('clusterSize')].coordinatorVmSize]"},
"dremioDownloadURL": {"value": "[parameters('dremioBinary')]"},
"dataDiskId": {"value": "[reference(concat(variables('shortName'), '-state-deployment')).outputs.dataDiskId.value]"},
"sshUsername": {"value": "[parameters('SSHUsername')]"},
"sshPasswordOrKey": {"value": "[parameters('PasswordOrSSHPublicKey')]"},
"subnetId": {"value": "[reference(concat(variables('shortName'), '-state-deployment')).outputs.subnetId.value]"},
"loadBalancerId": {"value": "[reference(concat(variables('shortName'), '-state-deployment')).outputs.loadBalancerId.value]"},
"nsgId": {"value": "[reference(concat(variables('shortName'), '-state-deployment')).outputs.nsgId.value]"},
"usePrivateIP": {"value": "[parameters('usePrivateIP')]"}
}
}
}
],
"outputs": {
"dremioUi": {
"type": "string",
"value": "[concat('http://', reference(concat(variables('shortName'), '-compute-deployment')).outputs.dremioHost.value, ':9047')]"
}
}
}