Moodle/nested/glustervmconfig.json

59 строки
2.5 KiB
JSON

{
"$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": [
{
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().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"
},
"type": "Microsoft.Compute/virtualMachines/extensions"
}
],
"variables": {
"cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFilename, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').subnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').glusterVmCount)]",
"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": " glusterVmCount - database (mariadb) password",
"scriptUri": "[concat(parameters('moodleCommon').scriptLocation,parameters('moodleCommon').glusterScriptFilename,parameters('moodleCommon').artifactsSasToken)]"
}
}