Deployed the required resources in Azure Cloud to operate a scalable Moodle cluster.
- A resource group exist.
- You have the authorizations required to create resources in the resource group to use.
- A TLS Certificate for the Application Gateway must exist in a Key Vault.
- A User Managed Identity must exist.
- Proper access privileges to the Application Gateway TLS Certificate must be granted to the User Managed Identity.
- Create a new file named armTemplates/azureDeploy-part1.parameters.json based on the armTemplates/azureDeploy-part1.parameters.example.json file.
- Edit the new azureDeploy-part1.parameters.json file to your need.
- Adapt and run the following commands:
deploymentName="MyDeploymentPart1"
resourceGroupName="[Your resource Group name]"
templateFile="armTemplate/azureDeploy-part1.json"
parameterFile="armTemplates/azureDeploy-part1.parameters.json"
az deployment group create --name $deploymentName --resource-group $resourceGroupName --template-file $templateFile --parameter @$parameterFile --verbose
- Adapt and run the following commands:
scripts/create_vm_image.sh -applicationFqdn "[Use the application FQDN registered in DNS or the Application Gateway Public IP FQDN as output from part 1]" -applicationNetworkSecurityGroupName "[The application network security name]" -applicationSubnetName "[Use the corresponding value returned as output from part 1]" -databaseAdminPassword="[Use the corresponding value used as input for part 1]" -databaseAdminUsername "[Use the corresponding value used as input for part 1]" -databaseApplicationDatabaseName "[Use the corresponding value output from part 1]" -databaseMoodlePassword "[A secret password]" -databaseMoodleUsername "[A username]" -databaseFqdn "[Use the corresponding value returned as output from part 1]" -databaseName "[Use the corresponding value returned as output from part 1]" -fileRepositoryUri "[Use the corresponding value used as input from part 1]" -moodleAdminEmail "[An email address]" -moodleAdminPassword "[A secret password]" -moodleAdminUsername "[A username]" -moodleShareName "[Use the corresponding value returned as output from part 1]" -moodleStorageAccountFilePrimaryEndPoint "[Use the corresponding value returned as output from part 1]" -moodleStorageAccountKey "[Use the corresponding value returned as output from part 1]" -moodleStorageAccountName "[Use the corresponding value returned as output from part 1]" -moodleUpgradeKey "[A secret Moodle upgrade key] -redisHostName "[Use the corresponding value returned as output from part 1]" -redisName "[Use the corresponding value returned as output from part 1]" redisPrimaryKey "[Use the corresponding value returned as output from part 1]" -resourceGroupName "The same resource group name used in part 1" -virtualMachineTags "[key1=value1 key2=value2 ... keyN=valueN]" -virtualNetworkName "[Use the corresponding value returned as output from part 1]" -vmImageName "[something]-$(date +'%Y%m%dT%H%M%S%Z')-VM-Image" -vmName "[something]-$(date +'%Y%m%dT%H%M%S%Z')-VM" -webServerAdminPassword "[A password]" -webServerAdminUsername "[A username]"
- Create a new file named armTemplates/azureDeploy-part2.parameters.json based on the armTemplates/azureDeploy-part2.parameters.example.json file.
- Edit the new azureDeploy-part2.parameters.json file to your need.
- Adapt and Run the following commands:
deploymentName="MyDeploymentPart2"
resourceGroupName="[Your resource Group name]"
templateFile="armTemplate/azureDeploy-part2.json"
parameterFile="armTemplates/azureDeploy-part2.parameters.json"
az deployment group create --name MyDeployment-part2 --resource-group $myResourceGroup --template-file armTemplate/azuredeploy-part2.json --parameter armTemplate/azuredeploy-part2.parameters.json --verbose