зеркало из https://github.com/Azure/Moodle.git
Initial deployment - Scalabe Moodle Cluster
This commit is contained in:
Родитель
8b25fc7c7c
Коммит
1c0ca49598
26
README.md
26
README.md
|
@ -3,16 +3,27 @@ Moodle deployment using Azure Resource Manager Template
|
|||
|
||||
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fpateixei%2FMoodleAzure%2Fv2%2Fazuredeploy.json) [![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.png)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2Fpateixei%2FMoodleAzure%2Fv2%2Fazuredeploy.json)
|
||||
|
||||
This Azure Resource Manager template creates a clustered, multi-layered moodle environment.
|
||||
With this template we have three main components being deployed:
|
||||
a) a web application layer with VMSS and auto-scale enabled
|
||||
b) a database layer composed of a MariaDb Galera cluster
|
||||
c) a shared filesystem layer, for the "moodledata" content.
|
||||
|
||||
This Azure Resource Manager template creates a clustered moodle environment.
|
||||
Main differences from other existing Moodle templates:
|
||||
a) web layer uses a VMScale Set with auto-scale configured, allowing better usage of resources (02 to 10 web nodes possible)
|
||||
b) database layer was built using MariaDb Galera Cluster, in a high-available setup, providing 99.95% SLA
|
||||
c) filesystem layer (MoodleData) was built on top of VMs with Premium Disks, supporting very intensive IO scenarios; also built on top of GlusterFS, a high scalable storage solution from RedHat (see www.glusterfs.org for details), in a High Available setup (data replication accross cluster nodes, also providing a 99.95% SLA).
|
||||
d) Customer can define the size (small, medium, large) for database and filesystem layers
|
||||
e) Azure Redis Cache is deployed in the solution, to be used as Moodle Session Cache backend (manual setup required in moodle)
|
||||
f) it was built for Moodle 3.x deployments
|
||||
|
||||
The following resources will be created:
|
||||
Summarizing, the following resources will be created during this process:
|
||||
|
||||
- a Virtual Machine Scale Set (up to 10 instances) for the web tier, with auto-scale configured
|
||||
- 02 nodes Gluster Cluster (2 Premium disks attached, raid0, a gluster brick in each virtual machine)
|
||||
- 02 nodes MariaDb 10 Active-Active Cluster (Galera Cluster)
|
||||
- an Internal Load Balancer in front of the MariaDb clustered
|
||||
- an public Load Balancer in front of the Virtual Machine Scale Set (web tier)
|
||||
- 02 nodes Gluster Cluster (2 Premium disks attached, raid0, a gluster brick in each virtual machine), data replicated accross nodes in a HA setup for the filesystem layer
|
||||
- 02 nodes MariaDb 10 Active-Active Cluster (Galera Cluster), in a HA setup scenario for the database layer
|
||||
- an Internal Load Balancer in front of the MariaDb cluster
|
||||
- an public Load Balancer in front of the Virtual Machine Scale Set (web layer)
|
||||
- a virtual machine used as a JumpBox for the environment, acessible via SSH and http
|
||||
- a redis cache to be used for Moodle Session Cache (manual setup required in Moodle)
|
||||
- a lot of underlying resources need for the environment (virtual network, storage accounts, etc)
|
||||
|
@ -35,7 +46,10 @@ MariaDb t-shirt sizes:
|
|||
Medium | Standard_DS3_v2 | 2 | 512 Gb | 1 Tb
|
||||
Large | Standard_DS4_v2 | 2 | 1023 Gb | 2 Tb
|
||||
|
||||
This template is aimed to have constant updates, and would include other improvements in the future.
|
||||
|
||||
Hope it helps.
|
||||
|
||||
Feedbacks are welcome.
|
||||
|
||||
|
||||
|
|
|
@ -6,38 +6,38 @@
|
|||
"resourcesPrefix": { "type": "string", "defaultValue": "abcmoodle", "metadata": {"description": "Prefix of storage account name, network, virtual machines, and so on"} },
|
||||
"vNetAddressSpace": { "type": "string", "defaultValue": "172.30.0.0", "metadata": {"description": "Address range for the Moodle virtual network - presumed /16 - further subneting during vnet creation"} },
|
||||
"moodleVersion": { "type": "string", "defaultValue": "MOODLE_32_STABLE", "metadata": {"description": "The Moodle version you want to install."}, "allowedValues": ["MOODLE_32_STABLE","MOODLE_31_STABLE","MOODLE_30_STABLE","MOODLE_29_STABLE"] },
|
||||
"GlusterTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the gluster nodes"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"MariadbTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the mariadb nodes"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"CntrlerTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the single controller node"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"glusterTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the gluster nodes"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"mariaDbTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the mariadb nodes"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"controlerTshirtSize": { "type": "string", "defaultValue": "Small", "metadata": {"description": "VM size for the single controller node"}, "allowedValues": ["Small","Medium","Large"] },
|
||||
"adminUsername": { "type": "string", "defaultValue": "azureadmin", "metadata": {"description": "ssh user name"}},
|
||||
"adminPassword": { "type": "securestring", "metadata": {"description": "ssh password"}},
|
||||
"mySQLuserPassword": { "type": "securestring", "metadata": {"description": "my sql regular user password"}},
|
||||
"mySQLrootPassword": { "type": "securestring", "metadata": {"description": "my sql root user password"}},
|
||||
"mySqlUserPassword": { "type": "securestring", "metadata": {"description": "my sql regular user password"}},
|
||||
"mySqlRootPassword": { "type": "securestring", "metadata": {"description": "my sql root user password"}},
|
||||
"applyScriptsSwitch": { "type": "int", "defaultValue": 0, "metadata": {"description": "Switch to process or bypass all scripts/extensions"}, "allowedValues": [ 0,1 ] },
|
||||
"azureBackupSwitch": { "type": "int", "defaultValue": 0, "metadata": {"description": "Switch to configure AzureBackup and enlist VM's"}, "allowedValues": [ 0,1 ] }
|
||||
},
|
||||
|
||||
"variables": {
|
||||
|
||||
"Documentation01": "This main-template calls multiple sub-templates to create the moodle system",
|
||||
"Documentation02": " recoveryservices0 - dummy template (see next statement)",
|
||||
"Documentation03": " recoveryservices1 - creates a recovery vault that will be subsequently used by the VM Backup - a paramter swtich controls whethe is is called or bypassed",
|
||||
"Documentation04": " redis - creates a redis cache",
|
||||
"Documentation05": " vnet - creates a virtual network with three subnets",
|
||||
"Documentation06": " gluster - creates a gluster file system on a vm farm",
|
||||
"Documentation07": " mariadbb - creates a mariadb (nosql) on a vm farm",
|
||||
"Documentation08": " webvmss - creates a vm scale set",
|
||||
"Documentation09": " controller - creates a jumpbox and deploys code",
|
||||
"documentation01": "This main-template calls multiple sub-templates to create the moodle system",
|
||||
"documentation02": " recoveryservices0 - dummy template (see next statement)",
|
||||
"documentation03": " recoveryservices1 - creates a recovery vault that will be subsequently used by the VM Backup - a paramter swtich controls whethe is is called or bypassed",
|
||||
"documentation04": " redis - creates a redis cache",
|
||||
"documentation05": " vnet - creates a virtual network with three subnets",
|
||||
"documentation06": " gluster - creates a gluster file system on a vm farm",
|
||||
"documentation07": " mariadbb - creates a mariadb (nosql) on a vm farm",
|
||||
"documentation08": " webvmss - creates a vm scale set",
|
||||
"documentation09": " controller - creates a jumpbox and deploys code",
|
||||
|
||||
"Documentation10": "Three sizing parameters are provided, one each for the gluster system, the mariadb system and one for the jumpbox",
|
||||
"Documentation11": " 1 - 50 users - use Small, Small, Small",
|
||||
"Documentation12": " 51 - 150 users - use Small, Medium, Small",
|
||||
"Documentation13": " 151 - 250 users - use Medium, Medium, Small",
|
||||
"Documentation14": " > 250 users - use Large, Large, Small",
|
||||
"Documentation15": " ",
|
||||
"Documentation16": " ",
|
||||
"Documentation17": " ",
|
||||
"Documentation18": " ",
|
||||
"documentation10": "Three sizing parameters are provided, one each for the gluster system, the mariadb system and one for the jumpbox",
|
||||
"documentation11": " 1 - 50 users - use Small, Small, Small",
|
||||
"documentation12": " 51 - 150 users - use Small, Medium, Small",
|
||||
"documentation13": " 151 - 250 users - use Medium, Medium, Small",
|
||||
"documentation14": " > 250 users - use Large, Large, Small",
|
||||
"documentation15": " ",
|
||||
"documentation16": " ",
|
||||
"documentation17": " ",
|
||||
"documentation18": " ",
|
||||
|
||||
|
||||
|
||||
|
@ -49,36 +49,36 @@
|
|||
"baseTemplateUrl": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/moodle-scalable-cluster-ubuntu/nested/",
|
||||
"scriptLocation": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/moodle-scalable-cluster-ubuntu/scripts/",
|
||||
|
||||
"api4Compute": "2016-04-30-preview",
|
||||
"computeApi": "2016-04-30-preview",
|
||||
|
||||
"mariadbScriptFileName" : "install_mariadb.sh", "mariadbVmCount": 2,
|
||||
"glusterScriptFileName" : "install_gluster.sh", "glusterVmCount": 2,
|
||||
"moodleInstallScriptFileName": "install_moodle.sh",
|
||||
"moodleSetupScriptFileName" : "setup_moodle.sh",
|
||||
"mariaDbScriptFilename" : "install_mariadb.sh", "mariadbVmCount": 2,
|
||||
"glusterScriptFilename" : "install_gluster.sh", "glusterVmCount": 2,
|
||||
"moodleInstallScriptFilename": "install_moodle.sh",
|
||||
"moodleSetupScriptFilename" : "setup_moodle.sh",
|
||||
|
||||
"osType": { "publisher": "Canonical", "offer": "UbuntuServer", "sku": "14.04.4-LTS", "version": "latest" },
|
||||
|
||||
"resourcesPrefix": "[ variables('rpfx')]",
|
||||
"vNetAddressSpace": "[parameters('vNetAddressSpace')]",
|
||||
"SubnetWebRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)), '.0/24' ) ]", "SubnetWebPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0))) ]",
|
||||
"SubnetSanRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)), '.0/24' ) ]", "SubnetSanPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1))) ]",
|
||||
"SubnetMdbRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)), '.0/24' ) ]", "SubnetMdbPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2))) ]", "StaticIpMariaDb": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)),'.250') ]",
|
||||
"subnetWebRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0)), '.0/24' ) ]", "subnetWebPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),0))) ]",
|
||||
"subnetSanRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1)), '.0/24' ) ]", "subnetSanPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),1))) ]",
|
||||
"subnetDbRange": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)), '.0/24' ) ]", "subnetDbPrefix": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2))) ]", "StaticIpMariaDb": "[concat( variables('octets')[0], '.', variables('octets')[1], '.', string(add(int(variables('octets')[2]),2)),'.250') ]",
|
||||
|
||||
"moodleVersion": "[parameters('moodleVersion')]",
|
||||
"GlusterTshirtSize": "[parameters('GlusterTshirtSize')]",
|
||||
"MariadbTshirtSize": "[parameters('MariadbTshirtSize')]",
|
||||
"CntrlerTshirtSize": "[parameters('CntrlerTshirtSize')]",
|
||||
"glusterTshirtSize": "[parameters('glusterTshirtSize')]",
|
||||
"mariaDbTshirtSize": "[parameters('mariaDbTshirtSize')]",
|
||||
"controlerTshirtSize": "[parameters('controlerTshirtSize')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]",
|
||||
"mySQLuserPassword": "[parameters('mySQLuserPassword')]",
|
||||
"mySQLrootPassword": "[parameters('mySQLrootPassword')]",
|
||||
"mySqlUserPassword": "[parameters('mySqlUserPassword')]",
|
||||
"mySqlRootPassword": "[parameters('mySqlRootPassword')]",
|
||||
"applyScriptsSwitch": "[parameters('applyScriptsSwitch')]",
|
||||
"azureBackupSwitch": "[parameters( 'azureBackupSwitch')]",
|
||||
"azureBackupSwitch": "[parameters( 'azureBackupSwitch')]",
|
||||
|
||||
"vnetName": "[concat( variables('rpfx'),'-vnet') ]",
|
||||
"SubnetWeb": "[concat( 'web-',variables('rpfx'),'-subnet')]",
|
||||
"SubnetSan": "[concat( 'san-',variables('rpfx'),'-subnet')]",
|
||||
"SubnetMdb": "[concat('data-',variables('rpfx'),'-subnet')]",
|
||||
"subnetWeb": "[concat( 'web-',variables('rpfx'),'-subnet')]",
|
||||
"subnetSan": "[concat( 'san-',variables('rpfx'),'-subnet')]",
|
||||
"subnetDb": "[concat('data-',variables('rpfx'),'-subnet')]",
|
||||
|
||||
"lbName": "[concat( 'lb-',variables('rpfx'))]",
|
||||
"extFeName": "[concat( 'lb-',variables('rpfx'),'-FE')]",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"parameters": {
|
||||
"moodleVersion": { "value": "MOODLE_32_STABLE" },
|
||||
"adminPassword": { "value": "Sw!mmingP00l" },
|
||||
"mySQLuserPassword": { "value": "Sw!mmingP00l" },
|
||||
"mySQLrootPassword": { "value": "Sw!mmingP00l" },
|
||||
"mySqlUserPassword": { "value": "Sw!mmingP00l" },
|
||||
"mySqlRootPassword": { "value": "Sw!mmingP00l" },
|
||||
"applyScriptsSwitch": { "value": 1 },
|
||||
"azureBackupSwitch": { "value": 0 }
|
||||
}
|
||||
|
|
|
@ -5,23 +5,23 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation01": "This sub-template drives the controller/jump-box which is used as the access-point for other moodle VM's ",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " vnetName - name of virtual network",
|
||||
"Documentation04": " Subnetweb - name of subnet for controller (and vm scale set)",
|
||||
"Documentation05": " api4Compute - the 'managed' resources need to all use this value",
|
||||
"Documentation06": " jboxPipName - name of Public IP address for the jumpbox (note that none of the other VM's get a PIP - just the jumpbox",
|
||||
"Documentation07": " jboxNicName - name of the network interface (all VM's must hae a nic) to crate, tied to the public IP address",
|
||||
"Documentation08": " jboxNsgName - name of the network security group, regulating access to/from the jumpbox",
|
||||
"documentation01": "This sub-template drives the controller/jump-box which is used as the access-point for other moodle VM's ",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " vnetName - name of virtual network",
|
||||
"documentation04": " subnetWeb - name of subnet for controller (and vm scale set)",
|
||||
"documentation05": " computeApi - the 'managed' resources need to all use this value",
|
||||
"documentation06": " jboxPipName - name of Public IP address for the jumpbox (note that none of the other VM's get a PIP - just the jumpbox",
|
||||
"documentation07": " jboxNicName - name of the network interface (all VM's must hae a nic) to crate, tied to the public IP address",
|
||||
"documentation08": " jboxNsgName - name of the network security group, regulating access to/from the jumpbox",
|
||||
|
||||
"Documentation09": "This sub-template calls other sub-templates",
|
||||
"Documentation10": " controllerconfig - conditionally applies post-deployment script on the VM",
|
||||
"Documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
"documentation09": "This sub-template calls other sub-templates",
|
||||
"documentation10": " controllerconfig - conditionally applies post-deployment script on the VM",
|
||||
"documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
|
||||
"SubnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName), '/subnets/',parameters('moodleCommon').SubnetWeb)]",
|
||||
"PipRef": "[ resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName)]",
|
||||
"NicRef": "[ resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').jboxNicName)]",
|
||||
"NsgRef": "[ resourceId('Microsoft.Network/networkSecurityGroups', parameters('moodleCommon').jboxNsgName)]"
|
||||
"subnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName), '/subnets/',parameters('moodleCommon').subnetWeb)]",
|
||||
"pipRef": "[ resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').jboxPipName)]",
|
||||
"nicRef": "[ resourceId('Microsoft.Network/networkInterfaces', parameters('moodleCommon').jboxNicName)]",
|
||||
"nsgRef": "[ resourceId('Microsoft.Network/networkSecurityGroups', parameters('moodleCommon').jboxNsgName)]"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
@ -67,8 +67,8 @@
|
|||
"ipConfigurations": [
|
||||
{
|
||||
"name": "ipcfgjbox",
|
||||
"properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('SubnetWebRef')]" }, "publicIPAddress": { "id":"[variables('PipRef')]" } },
|
||||
"networkSecurityGroup": { "id": "[variables('NsgRef')]" }
|
||||
"properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('subnetWebRef')]" }, "publicIPAddress": { "id":"[variables('pipRef')]" } },
|
||||
"networkSecurityGroup": { "id": "[variables('nsgRef')]" }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[parameters('moodleCommon').jboxVmName]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
"dependsOn": [ "[concat('Microsoft.Network/networkInterfaces/', parameters('moodleCommon').jboxNicName)]" ],
|
||||
|
||||
"properties": {
|
||||
"networkProfile": { "networkInterfaces": [ { "id": "[variables('NicRef')]" } ] },
|
||||
"networkProfile": { "networkInterfaces": [ { "id": "[variables('nicRef')]" } ] },
|
||||
"hardwareProfile": { "vmSize": "Standard_D1" },
|
||||
"osProfile": { "computerName": "[parameters('moodleCommon').jboxVmName]", "adminUsername": "[parameters('moodleCommon').adminUsername]", "adminPassword": "[parameters('moodleCommon').adminPassword]" },
|
||||
"storageProfile": { "imageReference": "[parameters('moodleCommon').osType]",
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"Documentation2": "",
|
||||
"Documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
"documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"documentation2": "",
|
||||
"documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
},
|
||||
|
||||
"resources": []
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation01": "This sub-template applies a specific post-deployment script to the controller vm",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " ScriptLocation - partial web URI (equivalent to folder)(",
|
||||
"Documentation04": " moodleInstallScriptFileName - name of script file",
|
||||
"Documentation05": " lbDnsName - name of the dns entry for the vmscalse set",
|
||||
"Documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a 0 to get to the first node",
|
||||
"Documentation07": " mySQLuserPassword - database (mariadb) password",
|
||||
"Documentation08": " jboxVmName - name of the controller/jumpb ox VM",
|
||||
"documentation01": "This sub-template applies a specific post-deployment script to the controller vm",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " ScriptLocation - partial web URI (equivalent to folder)(",
|
||||
"documentation04": " moodleInstallScriptFilename - name of script file",
|
||||
"documentation05": " lbDnsName - name of the dns entry for the vmscalse set",
|
||||
"documentation06": " gfsNameRoot - nameroot of gluster farm - note that the code applies a 0 to get to the first node",
|
||||
"documentation07": " mySqlUserPassword - database (mariadb) password",
|
||||
"documentation08": " jboxVmName - name of the controller/jumpb ox VM",
|
||||
|
||||
|
||||
"dns": "[concat(parameters('moodleCommon').lbDnsName,'.',resourceGroup().location,'.cloudapp.azure.com')]",
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').moodleInstallScriptFileName)]",
|
||||
"cmdExec": "[concat('sh ', parameters('moodleCommon').moodleInstallScriptFileName, ' ', parameters('moodleCommon').moodleVersion, ' ', concat(parameters('moodleCommon').gfsNameRoot, '0'), ' ', 'data', ' ', variables('dns'), ' ', parameters('moodleCommon').StaticIpMariaDb, ' ', 'moodle', ' ', 'moodledba', ' ', parameters('moodleCommon').mySQLuserPassword,' ', parameters('moodleCommon').adminPassword)]"
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').moodleInstallScriptFilename)]",
|
||||
"cmdExec": "[concat('sh ', parameters('moodleCommon').moodleInstallScriptFilename, ' ', parameters('moodleCommon').moodleVersion, ' ', concat(parameters('moodleCommon').gfsNameRoot, '0'), ' ', 'data', ' ', variables('dns'), ' ', parameters('moodleCommon').StaticIpMariaDb, ' ', 'moodle', ' ', 'moodledba', ' ', parameters('moodleCommon').mySqlUserPassword,' ', parameters('moodleCommon').adminPassword)]"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
"variables": {
|
||||
|
||||
"Documentation01": "This sub-template provides a way to return a flexible number of drive configurations",
|
||||
"Documentation02": " vmName - used as apart of the naming of the disk(s)",
|
||||
"Documentation03": " vmDiskCount - used to limit the nubmer of configuraitons returned (via the TAKE function) ",
|
||||
"documentation01": "This sub-template provides a way to return a flexible number of drive configurations",
|
||||
"documentation02": " vmName - used as apart of the naming of the disk(s)",
|
||||
"documentation03": " vmDiskCount - used to limit the nubmer of configuraitons returned (via the TAKE function) ",
|
||||
|
||||
"diskArray": [
|
||||
{ "lun": 0, "managedDisk": { "id": "[resourceId('Microsoft.Compute/disks', concat(parameters('vmName'),'-datadisk1'))]" },"caching": "None", "createOption": "Attach" },
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template drives the gluster (scale-out network-attached storage file system) creation process.",
|
||||
"Documentation2": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation3": " api4Compute - the 'managed' resources need to all use this value",
|
||||
"Documentation4": " gfxAvailabilitySetName - name of availability set for the gluster farm",
|
||||
"Documentation5": " glusterVmCount - number of nodes to create",
|
||||
"documentation1": "This sub-template drives the gluster (scale-out network-attached storage file system) creation process.",
|
||||
"documentation2": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation3": " computeApi - the 'managed' resources need to all use this value",
|
||||
"documentation4": " gfxAvailabilitySetName - name of availability set for the gluster farm",
|
||||
"documentation5": " glusterVmCount - number of nodes to create",
|
||||
|
||||
"Documentation6": "This sub-template calls other sub-templates",
|
||||
"Documentation7": " glustervm - number of nodes in the gluster farm"
|
||||
"documentation6": "This sub-template calls other sub-templates",
|
||||
"documentation7": " glustervm - number of nodes in the gluster farm"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[parameters('moodleCommon').gfxAvailabilitySetName]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation01": "This sub-template create the nodes of the gluster farm",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " api4Compute - the 'managed' resources need to all use this value",
|
||||
"Documentation04": " gfxAvailabilitySetName - name of availability set for the gluster farm",
|
||||
"Documentation05": " vnetName - name of virtual network",
|
||||
"Documentation06": " SubnetSan - name of subnet for gluster",
|
||||
"Documentation07": " gfsNameRoot - nameroot for the gluster nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme",
|
||||
"Documentation08": " GlusterTshirtSize - supports flexible sizing - translates to a CPU/MEM/DISK details",
|
||||
"Documentation09": " adminUsername - OS accountusername",
|
||||
"Documentation10": " adminPassword - OS account password",
|
||||
"Documentation11": " osType - an array of value that specifies the type of VM",
|
||||
"documentation01": "This sub-template create the nodes of the gluster farm",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " computeApi - the 'managed' resources need to all use this value",
|
||||
"documentation04": " gfxAvailabilitySetName - name of availability set for the gluster farm",
|
||||
"documentation05": " vnetName - name of virtual network",
|
||||
"documentation06": " subnetSan - name of subnet for gluster",
|
||||
"documentation07": " gfsNameRoot - nameroot for the gluster nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme",
|
||||
"documentation08": " glusterTshirtSize - supports flexible sizing - translates to a CPU/MEM/DISK details",
|
||||
"documentation09": " adminUsername - OS accountusername",
|
||||
"documentation10": " adminPassword - OS account password",
|
||||
"documentation11": " osType - an array of value that specifies the type of VM",
|
||||
|
||||
"Documentation15": "This sub-template calls other sub-templates",
|
||||
"Documentation16": " diskSelection - returns an arry of disk names - for flexible sizing",
|
||||
"Documentation17": " glustervmconfig - conditionally applies post-deployment script on the VM",
|
||||
"Documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
"documentation15": "This sub-template calls other sub-templates",
|
||||
"documentation16": " diskSelection - returns an arry of disk names - for flexible sizing",
|
||||
"documentation17": " glustervmconfig - conditionally applies post-deployment script on the VM",
|
||||
"documentation18": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
|
||||
"SubnetSanRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName), '/subnets/',parameters('moodleCommon').SubnetSan)]",
|
||||
"subnetSanRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName), '/subnets/',parameters('moodleCommon').subnetSan)]",
|
||||
"asRef": "[ resourceId('Microsoft.Compute/availabilitySets', parameters('moodleCommon').gfxAvailabilitySetName)]",
|
||||
"nicRef": "[ resourceId('Microsoft.Network/networkInterfaces', variables('nicName') )]",
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
"GlusterSizeMedium": { "vmSku": "Standard_DS3_v2", "diskCount": 2, "diskSize": 512 },
|
||||
"GlusterSizeLarge": { "vmSku": "Standard_DS4_v2", "diskCount": 2, "diskSize": 1023 },
|
||||
|
||||
"GlusterTshirt" : "[variables(concat('GlusterSize', parameters('moodleCommon').GlusterTshirtSize))]"
|
||||
"GlusterTshirt" : "[variables(concat('GlusterSize', parameters('moodleCommon').glusterTshirtSize))]"
|
||||
},
|
||||
|
||||
|
||||
|
@ -49,13 +49,13 @@
|
|||
"location": "[resourceGroup().location]",
|
||||
|
||||
"tags": { "displayName": "Gluster VM NIC" },
|
||||
"properties": { "ipConfigurations": [ { "name": "ipcfggfs", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('SubnetSanRef')]" } } } ] }
|
||||
"properties": { "ipConfigurations": [ { "name": "ipcfggfs", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('subnetSanRef')]" } } } ] }
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[concat(variables('vmName'),'-datadisk',copyIndex(1))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
|||
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"Documentation2": "",
|
||||
"Documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
"documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"documentation2": "",
|
||||
"documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
},
|
||||
|
||||
"resources": []
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"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",
|
||||
"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)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFileName, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').SubnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').glusterVmCount)]"
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').glusterScriptFilename)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').glusterScriptFilename, ' ', parameters('moodleCommon').gfsNameRoot, ' ', parameters('moodleCommon').subnetSanPrefix, ' data ', parameters('vmNumber'), ' ', parameters('moodleCommon').glusterVmCount)]"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation01": "This sub-template drives the mariadb (similar to NoSQL) creation process.",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " api4Compute - the 'managed' resources need to all use this value",
|
||||
"Documentation04": " dbAvailabilitySetName - name of availability set for the mariadb farm",
|
||||
"Documentation05": " dbLoadBalancerName - name of load-balnacer for the mariadb farm - drives the naming of several LB components",
|
||||
"Documentation06": " vnetName - name of virtual network",
|
||||
"Documentation07": " SubnetMdb - name of subnet for mariadb",
|
||||
"Documentation08": " dbAvailabilitySetName - name of availability set for the gluster farm",
|
||||
"documentation01": "This sub-template drives the mariadb (similar to NoSQL) creation process.",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " computeApi - the 'managed' resources need to all use this value",
|
||||
"documentation04": " dbAvailabilitySetName - name of availability set for the mariadb farm",
|
||||
"documentation05": " dbLoadBalancerName - name of load-balnacer for the mariadb farm - drives the naming of several LB components",
|
||||
"documentation06": " vnetName - name of virtual network",
|
||||
"documentation07": " subnetDb - name of subnet for mariadb",
|
||||
"documentation08": " dbAvailabilitySetName - name of availability set for the gluster farm",
|
||||
|
||||
"Documentation9": "This sub-template calls other sub-templates",
|
||||
"Documentation10": " mariadbvm - creates each node (in a loop based on VM Count)",
|
||||
"documentation9": "This sub-template calls other sub-templates",
|
||||
"documentation10": " mariadbvm - creates each node (in a loop based on VM Count)",
|
||||
|
||||
"SubnetMdbRef": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').SubnetMdb)]",
|
||||
"subnetDbRef": "[concat(resourceId('Microsoft.Network/virtualNetworks',parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').subnetDb)]",
|
||||
|
||||
"feID": "[concat(resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').dbLoadBalancerName),'/frontendIPConfigurations/', parameters('moodleCommon').dbFeName)]",
|
||||
"beID": "[concat(resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').dbLoadBalancerName),'/backendAddressPools/', parameters('moodleCommon').dbBeName)]",
|
||||
|
@ -27,7 +27,7 @@
|
|||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Compute/availabilitySets",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[parameters('moodleCommon').dbAvailabilitySetName]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
"tags": { "displayName": "MariaDb Internal Load Balancer" },
|
||||
|
||||
"properties": {
|
||||
"frontendIPConfigurations": [ { "name": "[parameters('moodleCommon').dbFeName]", "properties": {"privateIPAllocationMethod": "Static", "privateIPAddress": "[parameters('moodleCommon').StaticIpMariaDb]", "subnet": { "id": "[variables('subnetMdbRef')]" } } } ],
|
||||
"frontendIPConfigurations": [ { "name": "[parameters('moodleCommon').dbFeName]", "properties": {"privateIPAllocationMethod": "Static", "privateIPAddress": "[parameters('moodleCommon').StaticIpMariaDb]", "subnet": { "id": "[variables('subnetDbRef')]" } } } ],
|
||||
"backendAddressPools": [ { "name": "[parameters('moodleCommon').dbBeName]" } ],
|
||||
"loadBalancingRules": [ { "name": "MariaDbListener", "properties": { "backendAddressPool": { "id": "[variables('beID')]" }, "frontendIPConfiguration": { "id": "[variables('feID')]" }, "probe": { "id": "[variables('prID')]" }, "protocol": "tcp", "frontendPort": 3306, "backendPort": 3306, "enableFloatingIP": false } } ],
|
||||
"probes": [ { "name": "[parameters('moodleCommon').dbProbe]", "properties": { "protocol": "tcp", "port": 3306, "intervalInSeconds": "5", "numberOfProbes": "6" } } ]
|
||||
|
|
|
@ -9,26 +9,26 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation01": "This sub-template create the nodes of the mariadb farm",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " api4Compute - the 'managed' resources need to all use this value",
|
||||
"Documentation04": " dbAvailabilitySetName - name of availability set for the db farm",
|
||||
"Documentation05": " vnetName - name of virtual network",
|
||||
"Documentation06": " SubnetMdb - name of subnet for mariadb",
|
||||
"Documentation07": " dbNameRoot - nameroot for the mariadb nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme",
|
||||
"Documentation08": " MariadbTshirtSize - supports flexible sizing - translates to a CPU/MEM/DISK details",
|
||||
"Documentation09": " adminUsername - OS accountusername",
|
||||
"Documentation10": " adminPassword - OS account password",
|
||||
"Documentation11": " osType - an array of value that specifies the type of VM",
|
||||
"documentation01": "This sub-template create the nodes of the mariadb farm",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " computeApi - the 'managed' resources need to all use this value",
|
||||
"documentation04": " dbAvailabilitySetName - name of availability set for the db farm",
|
||||
"documentation05": " vnetName - name of virtual network",
|
||||
"documentation06": " subnetDb - name of subnet for mariadb",
|
||||
"documentation07": " dbNameRoot - nameroot for the mariadb nodes - combined with counter to get actual name of each node - disk and nic follow the naming scheme",
|
||||
"documentation08": " mariaDbTshirtSize - supports flexible sizing - translates to a CPU/MEM/DISK details",
|
||||
"documentation09": " adminUsername - OS accountusername",
|
||||
"documentation10": " adminPassword - OS account password",
|
||||
"documentation11": " osType - an array of value that specifies the type of VM",
|
||||
|
||||
"Documentation15": "This sub-template calls other sub-templates",
|
||||
"Documentation16": " mariadbvmconfig - conditionally applies post-deployment script on the VM",
|
||||
"Documentation17": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
"documentation15": "This sub-template calls other sub-templates",
|
||||
"documentation16": " mariadbvmconfig - conditionally applies post-deployment script on the VM",
|
||||
"documentation17": " recoveryservicesEnlist - conditionally enlists the VM into the backup regimen",
|
||||
|
||||
|
||||
|
||||
|
||||
"SubnetMdbRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').SubnetMdb)]",
|
||||
"subnetDbRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').subnetDb)]",
|
||||
"asRef": "[ resourceId('Microsoft.Compute/availabilitySets', parameters('moodleCommon').dbAvailabilitySetName)]",
|
||||
"nicRef": "[ resourceId('Microsoft.Network/networkInterfaces', variables('nicName') )]",
|
||||
"feID": "[concat(resourceId('Microsoft.Network/loadBalancers',parameters('moodleCommon').dbLoadBalancerName),'/frontendIPConfigurations/', parameters('moodleCommon').dbFeName)]",
|
||||
|
@ -43,7 +43,7 @@
|
|||
"MariadbSizeMedium": { "vmSku": "Standard_DS3_v2", "diskCount": 2, "diskSize": "512" },
|
||||
"MariadbSizeLarge": { "vmSku": "Standard_DS4_v2", "diskCount": 2, "diskSize": "1023" },
|
||||
|
||||
"MariadbTshirt" : "[variables(concat('MariadbSize', parameters('moodleCommon').MariadbTshirtSize))]"
|
||||
"MariadbTshirt" : "[variables(concat('MariadbSize', parameters('moodleCommon').mariaDbTshirtSize))]"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
@ -55,13 +55,13 @@
|
|||
|
||||
"tags": { "displayName": "MariaDb VM NIC" },
|
||||
|
||||
"properties": { "ipConfigurations": [ { "name": "ipcfgdb", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('SubnetMdbRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('beID')]" } ] } } ] }
|
||||
"properties": { "ipConfigurations": [ { "name": "ipcfgdb", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('subnetDbRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('beID')]" } ] } } ] }
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"type": "Microsoft.Compute/disks",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[concat(variables('vmName'),'-datadisk',copyIndex(1))]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
|
||||
{
|
||||
"type": "Microsoft.Compute/virtualMachines",
|
||||
"apiVersion": "[parameters('moodleCommon').api4Compute]",
|
||||
"apiVersion": "[parameters('moodleCommon').computeApi]",
|
||||
"name": "[variables('vmName')]",
|
||||
"location": "[resourceGroup().location]",
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"Documentation2": "",
|
||||
"Documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
"documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"documentation2": "",
|
||||
"documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
},
|
||||
|
||||
"resources": []
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').mariadbScriptFileName)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').mariadbScriptFileName,' ', parameters('vmNumber'), ' ', parameters('moodleCommon').mariadbVmCount, ' ', parameters('vmNameList'), ' ', parameters('moodleCommon').mySQLuserPassword )]"
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').mariaDbScriptFilename)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').mariaDbScriptFilename,' ', parameters('vmNumber'), ' ', parameters('moodleCommon').mariadbVmCount, ' ', parameters('vmNameList'), ' ', parameters('moodleCommon').mySqlUserPassword )]"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
|
|
@ -6,18 +6,18 @@
|
|||
|
||||
"variables": {
|
||||
|
||||
"Documentation01": "This sub-template creates a virtual network with three subnets and then creates the moodle load-balancer with public IP/dns",
|
||||
"Documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"Documentation03": " vnetName - name of virtual network",
|
||||
"Documentation04": " vNetAddressSpace - base of address of 16 bit address range",
|
||||
"Documentation05": " SubnetWeb - name of subnet inside virtual network - will be assigned the .0.0/24 range",
|
||||
"Documentation06": " SubnetSan - name of subnet inside virtual network - will be assigned the .1.0/24 range",
|
||||
"Documentation07": " SubnetMdb - name of subnet inside virtual network - will be assigned the .2.0/24 range",
|
||||
"Documentation08": " lbPipName - name of public IP",
|
||||
"Documentation09": " lbDnsName - DNS entry for public consumption",
|
||||
"Documentation10": " lbName - name of Moodl load balancer",
|
||||
"documentation01": "This sub-template creates a virtual network with three subnets and then creates the moodle load-balancer with public IP/dns",
|
||||
"documentation02": "It expects certain values in the 'common' datastructure.",
|
||||
"documentation03": " vnetName - name of virtual network",
|
||||
"documentation04": " vNetAddressSpace - base of address of 16 bit address range",
|
||||
"documentation05": " subnetWeb - name of subnet inside virtual network - will be assigned the .0.0/24 range",
|
||||
"documentation06": " subnetSan - name of subnet inside virtual network - will be assigned the .1.0/24 range",
|
||||
"documentation07": " subnetDb - name of subnet inside virtual network - will be assigned the .2.0/24 range",
|
||||
"documentation08": " lbPipName - name of public IP",
|
||||
"documentation09": " lbDnsName - DNS entry for public consumption",
|
||||
"documentation10": " lbName - name of Moodl load balancer",
|
||||
|
||||
"pipID": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').lbPipName)]",
|
||||
"pipID": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').lbPipName)]",
|
||||
"extLbID": "[resourceId('Microsoft.Network/loadBalancers', parameters('moodleCommon').lbName)]",
|
||||
|
||||
"extFeID": "[concat(variables('extLbID'),'/frontendIPConfigurations/', parameters('moodleCommon').extFeName )]",
|
||||
|
@ -36,9 +36,9 @@
|
|||
"properties": {
|
||||
"addressSpace": { "addressPrefixes": [ "[concat(parameters('moodleCommon').vNetAddressSpace,'/16')]" ] },
|
||||
"subnets": [
|
||||
{ "name": "[parameters('moodleCommon').SubnetWeb]", "properties": { "addressPrefix": "[parameters('moodleCommon').SubnetWebRange]" } },
|
||||
{ "name": "[parameters('moodleCommon').SubnetSan]", "properties": { "addressPrefix": "[parameters('moodleCommon').SubnetSanRange]" } },
|
||||
{ "name": "[parameters('moodleCommon').SubnetMdb]", "properties": { "addressPrefix": "[parameters('moodleCommon').SubnetMdbRange]" } } ]
|
||||
{ "name": "[parameters('moodleCommon').subnetWeb]", "properties": { "addressPrefix": "[parameters('moodleCommon').subnetWebRange]" } },
|
||||
{ "name": "[parameters('moodleCommon').subnetSan]", "properties": { "addressPrefix": "[parameters('moodleCommon').subnetSanRange]" } },
|
||||
{ "name": "[parameters('moodleCommon').subnetDb]", "properties": { "addressPrefix": "[parameters('moodleCommon').subnetDbRange]" } } ]
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"Documentation2": "",
|
||||
"Documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
"documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"documentation2": "",
|
||||
"documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
},
|
||||
|
||||
"resources": []
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template creates a recovery services vault. It expects certain values in the 'common' datastructure.",
|
||||
"Documentation2": " vaultName - name of virtual network",
|
||||
"Documentation3": " policyName - name of backup policy inside vault",
|
||||
"Documentation4": "",
|
||||
"Documentation5": "The policy will create a daily backup with the following retentions",
|
||||
"Documentation6": " Daily - keep last 7 daily",
|
||||
"Documentation7": " Weekly - keep last 4 Sundays",
|
||||
"Documentation8": " Monthly - keep last 6 1st-of-the-month",
|
||||
"documentation1": "This sub-template creates a recovery services vault. It expects certain values in the 'common' datastructure.",
|
||||
"documentation2": " vaultName - name of virtual network",
|
||||
"documentation3": " policyName - name of backup policy inside vault",
|
||||
"documentation4": "",
|
||||
"documentation5": "The policy will create a daily backup with the following retentions",
|
||||
"documentation6": " Daily - keep last 7 daily",
|
||||
"documentation7": " Weekly - keep last 4 Sundays",
|
||||
"documentation8": " Monthly - keep last 6 1st-of-the-month",
|
||||
|
||||
"scheduleRunTimes": [ "2017-01-01T22:30:00Z" ],
|
||||
"dailyRetentionDurationCount": 7,
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"Documentation2": "",
|
||||
"Documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
"documentation1": "This sub-template intentionally blank - a blank template allows for an optional exectuion strategy",
|
||||
"documentation2": "",
|
||||
"documentation3": "You should look for a template of the same name, but with a 1 instead of a 0 (at the end)"
|
||||
},
|
||||
|
||||
"resources": []
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
},
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template adds a VM to the recovery services vault. It expects certain values in the 'common' datastructure.",
|
||||
"Documentation2": " vaultName - name of virtual network",
|
||||
"Documentation3": " policyName - name of backup policy inside vault",
|
||||
"Documentation4": "",
|
||||
"documentation1": "This sub-template adds a VM to the recovery services vault. It expects certain values in the 'common' datastructure.",
|
||||
"documentation2": " vaultName - name of virtual network",
|
||||
"documentation3": " policyName - name of backup policy inside vault",
|
||||
"documentation4": "",
|
||||
|
||||
"backupFabric": "Azure",
|
||||
"v2VmType": "Microsoft.Compute/virtualMachines",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"Documentation1": "This sub-template creates a redis cache. It expects certain values in the 'common' datastructure.",
|
||||
"Documentation2": " redisCacheName - name of cache"
|
||||
"documentation1": "This sub-template creates a redis cache. It expects certain values in the 'common' datastructure.",
|
||||
"documentation2": " redisCacheName - name of cache"
|
||||
},
|
||||
|
||||
"resources": [
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
"variables": {
|
||||
|
||||
"Documentation01": "This sub-template provides a way to return a flexible number of vmNames",
|
||||
"Documentation02": " vmNameRoot - used as apart of the naming of the VM(s)",
|
||||
"Documentation03": " vmCount - used to limit the nubmer of names returned (via the TAKE function) ",
|
||||
"documentation01": "This sub-template provides a way to return a flexible number of vmNames",
|
||||
"documentation02": " vmNameRoot - used as apart of the naming of the VM(s)",
|
||||
"documentation03": " vmCount - used to limit the nubmer of names returned (via the TAKE function) ",
|
||||
|
||||
"diskArray": [
|
||||
"[concat(parameters('vmNameRoot'),'0')]", "[concat(parameters('vmNameRoot'),'1')]", "[concat(parameters('vmNameRoot'),'2')]", "[concat(parameters('vmNameRoot'),'3')]",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"parameters": { "moodleCommon": { "type": "object", "metadata": { "description": "Common Moodle values" } } },
|
||||
|
||||
"variables": {
|
||||
"SubnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').SubnetWeb)]",
|
||||
"subnetWebRef": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('moodleCommon').vnetName),'/subnets/',parameters('moodleCommon').subnetWeb)]",
|
||||
"vmssID": "[ resourceId('Microsoft.Compute/virtualMachineScaleSets',parameters('moodleCommon').vmssName)]",
|
||||
"dstorID": "[ resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').vmssdStorageAccounttName)]",
|
||||
"pipID": "[ resourceId('Microsoft.Network/publicIPAddresses', parameters('moodleCommon').lbPipName)]",
|
||||
|
@ -18,13 +18,13 @@
|
|||
|
||||
"storageApiVersion": "2015-06-15",
|
||||
|
||||
"wadlogs": "<WadCfg><DiagnosticMonitorConfiguration>",
|
||||
"wadperfcounter": "<PerformanceCounters scheduledTransferPeriod=\"PT1M\"><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentProcessorTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU percentage guest OS\" locale=\"en-us\"/></PerformanceCounterConfiguration></PerformanceCounters>",
|
||||
"wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounter'),'<Metrics resourceId=\"')]",
|
||||
"wadcfgxend": "[concat('\"><MetricAggregation scheduledTransferPeriod=\"PT1H\"/><MetricAggregation scheduledTransferPeriod=\"PT1M\"/></Metrics></DiagnosticMonitorConfiguration></WadCfg>')]",
|
||||
"wadLogs": "<WadCfg><DiagnosticMonitorConfiguration>",
|
||||
"wadPerfCounter": "<PerformanceCounters scheduledTransferPeriod=\"PT1M\"><PerformanceCounterConfiguration counterSpecifier=\"\\Processor\\PercentProcessorTime\" sampleRate=\"PT15S\" unit=\"Percent\"><annotation displayName=\"CPU percentage guest OS\" locale=\"en-us\"/></PerformanceCounterConfiguration></PerformanceCounters>",
|
||||
"wadCfgxStart": "[concat(variables('wadLogs'),variables('wadPerfCounter'),'<Metrics resourceId=\"')]",
|
||||
"wadCfgxEnd": "[concat('\"><MetricAggregation scheduledTransferPeriod=\"PT1H\"/><MetricAggregation scheduledTransferPeriod=\"PT1M\"/></Metrics></DiagnosticMonitorConfiguration></WadCfg>')]",
|
||||
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').moodleSetupScriptFileName)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').moodleSetupScriptFileName,' ',parameters('moodleCommon').gfsNameRoot,'0', ' ','data' )]"
|
||||
"scriptUri": "[concat(parameters('moodleCommon').ScriptLocation,parameters('moodleCommon').moodleSetupScriptFilename)]",
|
||||
"cmdExec": "[concat('bash ', parameters('moodleCommon').moodleSetupScriptFilename,' ',parameters('moodleCommon').gfsNameRoot,'0', ' ','data' )]"
|
||||
|
||||
},
|
||||
|
||||
|
@ -55,12 +55,12 @@
|
|||
"virtualMachineProfile": {
|
||||
"storageProfile": { "osDisk": { "caching": "ReadOnly", "createOption": "FromImage", "managedDisk": { "storageAccountType": "Standard_LRS" } }, "imageReference": "[parameters('moodleCommon').osType]" },
|
||||
"osProfile": { "computerNamePrefix": "[parameters('moodleCommon').vmssName]", "adminUsername": "[parameters('moodleCommon').adminUsername]", "adminPassword": "[parameters('moodleCommon').adminPassword]" },
|
||||
"networkProfile": { "networkInterfaceConfigurations": [ { "name": "vmssnic", "properties": { "ipConfigurations": [ { "name": "ipcfg_lb", "properties": { "subnet": { "id": "[variables('SubnetWebRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('extBeID')]" } ], "loadBalancerInboundNatPools": [ { "id": "[variables('extNatPoolID')]" } ] } } ], "primary": "true" } } ] },
|
||||
"networkProfile": { "networkInterfaceConfigurations": [ { "name": "vmssnic", "properties": { "ipConfigurations": [ { "name": "ipcfg_lb", "properties": { "subnet": { "id": "[variables('subnetWebRef')]" }, "loadBalancerBackendAddressPools": [ { "id": "[variables('extBeID')]" } ], "loadBalancerInboundNatPools": [ { "id": "[variables('extNatPoolID')]" } ] } } ], "primary": "true" } } ] },
|
||||
"extensionProfile": {
|
||||
"extensions": [
|
||||
{ "name": "LinuxDiagnostic",
|
||||
"properties": { "publisher": "Microsoft.OSTCExtensions", "type": "LinuxDiagnostic", "typeHandlerVersion": "2.3", "autoUpgradeMinorVersion": true,
|
||||
"settings": { "xmlCfg": "[base64(concat(variables('wadcfgxstart'), variables('vmssID'), variables('wadcfgxend')))]", "storageAccount": "[parameters('moodleCommon').vmssdStorageAccounttName]" },
|
||||
"settings": { "xmlCfg": "[base64(concat(variables('wadCfgxStart'), variables('vmssID'), variables('wadCfgxEnd')))]", "storageAccount": "[parameters('moodleCommon').vmssdStorageAccounttName]" },
|
||||
"protectedSettings": { "storageAccountName": "[parameters('moodleCommon').vmssdStorageAccounttName]", "storageAccountKey": "[listkeys(variables('dstorID'), variables('storageApiVersion')).key1]", "storageAccountEndPoint": "https://core.windows.net"} }
|
||||
},
|
||||
{ "name": "setup_moodle",
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
NODEINDEX=${1}
|
||||
NODECOUNT=${2}
|
||||
NODELIST=${3}
|
||||
MYSQLUSERPASSWORD=${4}
|
||||
mySqlUserPassword=${4}
|
||||
DEBPASSWORD=${5:-`date +%D%A%B | md5sum| sha256sum | base64| fold -w16| head -n1`}
|
||||
CNAME=${6:-"GaleraCluster"}
|
||||
|
||||
echo $NODEINDEX >> /tmp/vars.txt
|
||||
echo $NODECOUNT >> /tmp/vars.txt
|
||||
echo $NODELIST >> /tmp/vars.txt
|
||||
echo $MYSQLUSERPASSWORD >> /tmp/vars.txt
|
||||
echo $mySqlUserPassword >> /tmp/vars.txt
|
||||
echo $DEBPASSWORD >> /tmp/vars.txt
|
||||
echo $CNAME >> /tmp/vars.txt
|
||||
|
||||
|
@ -89,12 +89,12 @@ mv ~/debian.cnf /etc/mysql/
|
|||
mysql -u root <<EOF
|
||||
CREATE DATABASE moodle;
|
||||
GRANT ALL PRIVILEGES ON moodle.* TO 'moodledba'@'%'
|
||||
IDENTIFIED BY '$MYSQLUSERPASSWORD';
|
||||
IDENTIFIED BY '$mySqlUserPassword';
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
GRANT ALL PRIVILEGES on *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '$DEBPASSWORD' WITH GRANT OPTION;
|
||||
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$MYSQLUSERPASSWORD');
|
||||
CREATE USER 'root'@'%' IDENTIFIED BY '$MYSQLUSERPASSWORD';
|
||||
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$mySqlUserPassword');
|
||||
CREATE USER 'root'@'%' IDENTIFIED BY '$mySqlUserPassword';
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
|
||||
FLUSH PRIVILEGES;
|
||||
EOF
|
||||
|
|
Загрузка…
Ссылка в новой задаче