Skip to content

Commit

Permalink
Merge pull request #212 from asift91/1804
Browse files Browse the repository at this point in the history
Defaulted Ubuntu to 18.04 and supporting Moodle 3.8 and 3.9
  • Loading branch information
UmakanthOS authored Sep 15, 2020
2 parents ba343ec + 7ae0848 commit 6bf0712
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 38 deletions.
14 changes: 2 additions & 12 deletions azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,7 @@
"moodleVersion": {
"allowedValues": [
"MOODLE_39_STABLE",
"MOODLE_38_STABLE",
"MOODLE_35_STABLE",
"MOODLE_34_STABLE",
"v3.4.3",
"v3.4.2",
"v3.4.1",
"MOODLE_33_STABLE",
"MOODLE_32_STABLE",
"MOODLE_31_STABLE",
"MOODLE_30_STABLE",
"MOODLE_29_STABLE"
"MOODLE_38_STABLE"
],
"defaultValue": "MOODLE_38_STABLE",
"metadata": {
Expand Down Expand Up @@ -655,7 +645,7 @@
"16.04-LTS",
"18.04-LTS"
],
"defaultValue": "16.04-LTS"
"defaultValue": "18.04-LTS"
},
"location": {
"type": "string",
Expand Down
7 changes: 4 additions & 3 deletions scripts/helper_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ function get_setup_params_from_configs_json
{
local configs_json_path=${1} # E.g., /var/lib/cloud/instance/moodle_on_azure_configs.json

(dpkg -l jq &> /dev/null) || (apt -y update; apt -y install jq)
# apt -y update
# apt -y install jq
# (dpkg -l jq &> /dev/null) || (apt -y update; apt -y install jq)
sudo add-apt-repository universe
sudo apt-get -y update
sudo apt-get -y install jq

# Wait for the cloud-init write-files user data file to be generated (just in case)
local wait_time_sec=0
Expand Down
6 changes: 3 additions & 3 deletions scripts/install_moodle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ set -ex
# install pre-requisites
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt-get -y update > /dev/null 2>&1
sudo apt-get install -y --fix-missing python-software-properties unzip
#sudo apt-get install software-properties-common
#sudo apt-get install unzip
# sudo apt-get install -y --fix-missing python-software-properties unzip
sudo apt-get -y install software-properties-common
sudo apt-get -y install unzip


# install the entire stack
Expand Down
41 changes: 21 additions & 20 deletions scripts/setup_webserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ check_fileServerType_param $fileServerType
sudo apt-get -y install unattended-upgrades

# install pre-requisites
sudo apt-get -y install python-software-properties unzip rsyslog
#sudo apt-get install software-properties-common
#sudo apt-get install unzip
#sudo apt-get install rsyslog
# sudo apt-get -y install python-software-properties unzip rsyslog
sudo apt-get -y install software-properties-common
sudo apt-get -y install unzip
sudo apt-get -y install rsyslog
sudo apt-get -y install postgresql-client mysql-client git

if [ $fileServerType = "gluster" ]; then
Expand All @@ -77,14 +77,14 @@ check_fileServerType_param $fileServerType
sudo apt-get -y install varnish php$phpVersion php$phpVersion-cli php$phpVersion-curl php$phpVersion-zip php-pear php$phpVersion-mbstring php$phpVersion-dev mcrypt

# if webservertype is nginx then apache2 will be masked.
service=apache2
if [ "$webServerType" = "nginx" ]; then
if [ $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ]; then
echo “Stop the $service!!!
sudo systemctl stop $service
sudo systemctl mask $service
fi
fi
# service=apache2
# if [ "$webServerType" = "nginx" ]; then
# if [ $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ]; then
# echo “Stop the $service!!!”
# sudo systemctl stop $service
# sudo systemctl mask $service
# fi
# fi

if [ "$webServerType" = "nginx" -o "$httpsTermination" = "VMSS" ]; then
sudo apt-get -y install nginx
Expand Down Expand Up @@ -669,14 +669,15 @@ sub vcl_synth {
}
EOF

# service=apache2
# if [ "$webServerType" = "nginx" ]; then
# if [ $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ]; then
# echo “Stop the $service!!!”
# sudo systemctl stop $service
# sudo systemctl mask $service
# fi
# fi
# This code is stop apache2 which is installing in 18.04
service=apache2
if [ "$webServerType" = "nginx" ]; then
if [ $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ]; then
echo “Stop the $service!!!
sudo systemctl stop $service
sudo systemctl mask $service
fi
fi
# Restart Varnish
systemctl daemon-reload
service varnish restart
Expand Down

0 comments on commit 6bf0712

Please sign in to comment.