-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathglustervmsetup.json
More file actions
58 lines (58 loc) · 2.51 KB
/
glustervmsetup.json
File metadata and controls
58 lines (58 loc) · 2.51 KB
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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"moodleCommon": {
"metadata": {
"description": "Common Moodle values"
},
"type": "object"
},
"vmName": {
"metadata": {
"description": "Name of VM to process script - not actually used"
},
"type": "string"
},
"vmNumber": {
"metadata": {
"description": "Number of the VM in the pool"
},
"type": "int"
}
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2017-03-30",
"location": "[parameters('moodleCommon').location]",
"name": "[concat(parameters('vmName'),'/','install_gluster')]",
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"settings": {
"fileUris": [
"[variables('scriptUri')]"
]
},
"protectedSettings":{
"commandToExecute": "[variables('cmdExec')]"
},
"type": "CustomScript",
"typeHandlerVersion": "2.0"
},
"tags": {
"displayName": "GfsVmExtension"
}
}
],
"variables": {
"cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFilename, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').subnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').fileServerVmCount)]",
"documentation01": "This sub-template applies a specific post-deployment script to the gluster vms",
"documentation02": "It expects certain values in the 'common' datastructure.",
"documentation03": " scriptLocation - partial web URI (equivalent to folder)",
"documentation04": " glusterScriptFilename - name of script file",
"documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a vmNumber to get to the specific node",
"documentation07": " fileServerVmCount - number of gluster VMs",
"scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').glusterScriptFilename,parameters('moodleCommon').artifactsSasToken)]"
}
}