From cb88c5e2366fd7687bbe7261641ec5cbe62c80d0 Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Fri, 21 Aug 2020 02:17:47 +0000 Subject: [PATCH 1/9] Set osDisk to 256Gb --- nested/controller.json | 1 + nested/webvmss.json | 1 + 2 files changed, 2 insertions(+) diff --git a/nested/controller.json b/nested/controller.json index 28420c1c..cfaccc86 100644 --- a/nested/controller.json +++ b/nested/controller.json @@ -139,6 +139,7 @@ "imageReference": "[parameters('moodleCommon').osType]", "osDisk": { "createOption": "FromImage", + "diskSizeGB": 256, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" }, diff --git a/nested/webvmss.json b/nested/webvmss.json index 758506ce..db044dc9 100644 --- a/nested/webvmss.json +++ b/nested/webvmss.json @@ -112,6 +112,7 @@ "osDisk": { "caching": "ReadOnly", "createOption": "FromImage", + "diskSizeGB": 256, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" } From 482665eecbcac6ed7480e637ee68544c5620415e Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Fri, 21 Aug 2020 19:13:57 +0000 Subject: [PATCH 2/9] Set localcachedir --- scripts/install_moodle.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install_moodle.sh b/scripts/install_moodle.sh index 329c69d7..3514bd4f 100644 --- a/scripts/install_moodle.sh +++ b/scripts/install_moodle.sh @@ -831,6 +831,9 @@ EOF echo -e "\n\rDone! Installation completed!\n\r" + # use /tmp/localcache/ for localcache + sed -i "22 a \$CFG->localcachedir = '/tmp/localcache';" /moodle/html/moodle/config.php + if [ "$redisAuth" != "None" ]; then create_redis_configuration_in_moodledata_muc_config_php From 7605b7098e4f66b9d636cfcaee00c191585ee404 Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Tue, 25 Aug 2020 19:54:09 +0000 Subject: [PATCH 3/9] osDisk 256Gb -> 1024Gb --- nested/controller.json | 2 +- nested/webvmss.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nested/controller.json b/nested/controller.json index cfaccc86..58330e25 100644 --- a/nested/controller.json +++ b/nested/controller.json @@ -139,7 +139,7 @@ "imageReference": "[parameters('moodleCommon').osType]", "osDisk": { "createOption": "FromImage", - "diskSizeGB": 256, + "diskSizeGB": 1024, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" }, diff --git a/nested/webvmss.json b/nested/webvmss.json index db044dc9..d8c8a262 100644 --- a/nested/webvmss.json +++ b/nested/webvmss.json @@ -112,7 +112,7 @@ "osDisk": { "caching": "ReadOnly", "createOption": "FromImage", - "diskSizeGB": 256, + "diskSizeGB": 1024, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" } From edd6b084c08c06d0f1c60459807b0eb12de17a0a Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Thu, 27 Aug 2020 20:45:48 +0000 Subject: [PATCH 4/9] default to Standard Load Balancer + IP --- azuredeploy-large-ha.json | 47 ++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/azuredeploy-large-ha.json b/azuredeploy-large-ha.json index 70d25da8..2b669f7d 100644 --- a/azuredeploy-large-ha.json +++ b/azuredeploy-large-ha.json @@ -31,17 +31,42 @@ "properties": { "mode": "Incremental", "parameters": { - "_artifactsLocation": { "value": "[parameters('_artifactsLocation')]" }, - "_artifactsLocationSasToken": { "value": "[parameters('_artifactsLocationSasToken')]" }, - "redisDeploySwitch": { "value": true }, - "sshPublicKey": { "value": "[parameters('sshPublicKey')]" }, - "autoscaleVmCountMax": { "value": 20 }, - "autoscaleVmSku": { "value": "Standard_DS3_v2" }, - "mysqlPgresVcores": { "value": 16 }, - "mysqlPgresStgSizeGB": { "value": 512 }, - "fileServerType": { "value": "azurefiles" }, - "fileServerDiskSize": { "value": 1024 }, - "storageAccountType": { "value": "Premium_LRS" } + "_artifactsLocation": { + "value": "[parameters('_artifactsLocation')]" + }, + "_artifactsLocationSasToken": { + "value": "[parameters('_artifactsLocationSasToken')]" + }, + "loadBalancerSku": { + "value": "Standard" + }, + "redisDeploySwitch": { + "value": true + }, + "sshPublicKey": { + "value": "[parameters('sshPublicKey')]" + }, + "autoscaleVmCountMax": { + "value": 20 + }, + "autoscaleVmSku": { + "value": "Standard_DS3_v2" + }, + "mysqlPgresVcores": { + "value": 16 + }, + "mysqlPgresStgSizeGB": { + "value": 512 + }, + "fileServerType": { + "value": "azurefiles" + }, + "fileServerDiskSize": { + "value": 1024 + }, + "storageAccountType": { + "value": "Premium_LRS" + } }, "templateLink": { "uri": "[concat(parameters('_artifactsLocation'), 'azuredeploy.json', parameters('_artifactsLocationSasToken'))]" From 1476c0c1047c87bcaa22c9d01e38abd2c3012469 Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Mon, 14 Sep 2020 14:36:32 -0400 Subject: [PATCH 5/9] Set alternative_component_cache --- scripts/install_moodle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install_moodle.sh b/scripts/install_moodle.sh index 3514bd4f..570a9f63 100644 --- a/scripts/install_moodle.sh +++ b/scripts/install_moodle.sh @@ -833,6 +833,7 @@ EOF # use /tmp/localcache/ for localcache sed -i "22 a \$CFG->localcachedir = '/tmp/localcache';" /moodle/html/moodle/config.php + sed -i "22 a \$CFG->alternative_component_cache = '/tmp/localcachedir/core_component.php';" /moodle/html/moodle/config.php if [ "$redisAuth" != "None" ]; then create_redis_configuration_in_moodledata_muc_config_php From 29331a9e8ffa1a374d5b12a39339aec9d5f71f33 Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Tue, 29 Sep 2020 15:15:08 -0400 Subject: [PATCH 6/9] /tmp/localcache -> /tmp/localcachedir --- scripts/install_moodle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_moodle.sh b/scripts/install_moodle.sh index 570a9f63..a8183841 100644 --- a/scripts/install_moodle.sh +++ b/scripts/install_moodle.sh @@ -832,7 +832,7 @@ EOF echo -e "\n\rDone! Installation completed!\n\r" # use /tmp/localcache/ for localcache - sed -i "22 a \$CFG->localcachedir = '/tmp/localcache';" /moodle/html/moodle/config.php + sed -i "22 a \$CFG->localcachedir = '/tmp/localcachedir';" /moodle/html/moodle/config.php sed -i "22 a \$CFG->alternative_component_cache = '/tmp/localcachedir/core_component.php';" /moodle/html/moodle/config.php if [ "$redisAuth" != "None" ]; then From f3abaf7a89752d6ded673e2a89ec9267969a24bf Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Wed, 30 Sep 2020 04:49:18 +0000 Subject: [PATCH 7/9] move alternative_component_cache to /var/www/html/moodle/core_component.php --- scripts/install_moodle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_moodle.sh b/scripts/install_moodle.sh index d1a67f8a..dc589fad 100644 --- a/scripts/install_moodle.sh +++ b/scripts/install_moodle.sh @@ -833,7 +833,7 @@ EOF # use /tmp/localcache/ for localcache sed -i "22 a \$CFG->localcachedir = '/tmp/localcachedir';" /moodle/html/moodle/config.php - sed -i "22 a \$CFG->alternative_component_cache = '/tmp/localcachedir/core_component.php';" /moodle/html/moodle/config.php + sed -i "22 a \$CFG->alternative_component_cache = '/var/www/html/moodle/core_component.php';" /moodle/html/moodle/config.php if [ "$redisAuth" != "None" ]; then create_redis_configuration_in_moodledata_muc_config_php From 98db927b4c4fd01b0c5b04b4def9e2fccc831e52 Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Thu, 1 Oct 2020 00:07:05 +0000 Subject: [PATCH 8/9] Revert "osDisk 256Gb -> 1024Gb" This reverts commit 7605b7098e4f66b9d636cfcaee00c191585ee404. --- nested/controller.json | 2 +- nested/webvmss.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nested/controller.json b/nested/controller.json index 58330e25..cfaccc86 100644 --- a/nested/controller.json +++ b/nested/controller.json @@ -139,7 +139,7 @@ "imageReference": "[parameters('moodleCommon').osType]", "osDisk": { "createOption": "FromImage", - "diskSizeGB": 1024, + "diskSizeGB": 256, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" }, diff --git a/nested/webvmss.json b/nested/webvmss.json index d8c8a262..db044dc9 100644 --- a/nested/webvmss.json +++ b/nested/webvmss.json @@ -112,7 +112,7 @@ "osDisk": { "caching": "ReadOnly", "createOption": "FromImage", - "diskSizeGB": 1024, + "diskSizeGB": 256, "managedDisk": { "storageAccountType": "[parameters('moodleCommon').osDiskStorageType]" } From 530f151535e3d2eb4d571ffdc313761802ae694c Mon Sep 17 00:00:00 2001 From: Aaron Wislang Date: Tue, 13 Oct 2020 04:27:37 +0000 Subject: [PATCH 9/9] Ensure alternative_component_cache dir exists --- scripts/install_moodle.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install_moodle.sh b/scripts/install_moodle.sh index dc589fad..8888806d 100644 --- a/scripts/install_moodle.sh +++ b/scripts/install_moodle.sh @@ -830,8 +830,13 @@ EOF fi echo -e "\n\rDone! Installation completed!\n\r" - - # use /tmp/localcache/ for localcache + + # use /tmp/localcachedir/ for localcache and /var/www/html/moodle/ for core_component.php + dir="/var/www/html/moodle" + if [[ ! -d $dir ]]; then + mkdir -p $dir + chown -R www-data:www-data $dir + fi sed -i "22 a \$CFG->localcachedir = '/tmp/localcachedir';" /moodle/html/moodle/config.php sed -i "22 a \$CFG->alternative_component_cache = '/var/www/html/moodle/core_component.php';" /moodle/html/moodle/config.php