diff --git a/README.md b/README.md index 26a5c06..aa2fbe2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ If you just want to deploy the Moodle stack follow these steps. You can read the 1) If you plan to use TLS, you must create or import your certificate into Amazon Certificate Manager before launching Moodle. 2) Deploy the 00-master.yaml stack. **Do not enable session caching in ElastiCache and leave both the Min and Max Auto Scaling Group (ASG) size set to one.** The installation wizard will not complete if you have session caching configured. -3) After the stack deployment completes, navigate to the web site to complete the Moodle installation. *NOTE: You may encounter a 504 Gateway Timeout or CloudFront error on the final step of the installation wizard (after setting admin password). You can simply refresh the page to complete the installation.* +3) After the stack deployment completes, navigate to the web site to complete the Moodle installation. *NOTE: You may encounter a 504 Gateway Timeout or CloudFront error on the final step of the installation wizard (after setting admin password). You can simply refresh the page to complete the installation.* You may also see "Installation must be finished from the original IP address, sorry." to solve this you will need to update your database and set the lastip field of the mdl_user table to the internal ip address of your ALB (you can find this by looking at the Network Interfaces from the EC2 page in the AWS Console). From the webserver you can run: +psql -h -U +update mdl_user set lastip=''; 4) Configure Application caching in Moodle Site Configuration (see below for details). 5) Now you can update the stack that you just deployed to enable session caching and set the Min and Max Auto Scaling Group size values as desired. diff --git a/templates/04-web.yaml b/templates/04-web.yaml index 034610a..4bf3533 100644 --- a/templates/04-web.yaml +++ b/templates/04-web.yaml @@ -466,7 +466,7 @@ Resources: /tmp/create_site_conf.sh: content: !Sub | #!/bin/bash -xe - amazon-linux-extras install -y php7.4 postgresql9.6 + amazon-linux-extras install -y php7.3 postgresql9.6 yum install -y awslogs httpd php-pgsql php-gd php-soap php-intl php-mbstring php-xmlrpc php-zip sed -i 's/memory_limit =.*/memory_limit = 2048M/' /etc/php.ini if [ ! -f /etc/httpd/conf.d/moodle.conf ]; then @@ -651,13 +651,13 @@ Resources: sudo yum install -y php-pecl-memcached sudo yum remove -y php-pecl-memcached - wget -P /tmp/ https://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-7.0/latest-64bit + wget -P /tmp/ https://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-7.3/latest-64bit tar -xf '/tmp/latest-64bit' - cp '/tmp/artifact/amazon-elasticache-cluster-client.so' /usr/lib64/php/modules/ + cp '/tmp/amazon-elasticache-cluster-client.so' /usr/lib64/php/modules/ if [ ! -f /etc/php.d/50-memcached.ini ]; then touch /etc/php.d/50-memcached.ini fi - echo 'extension=/usr/lib64/php/7.1/modules/amazon-elasticache-cluster-client.so;' >> /etc/php.d/50-memcached.ini + echo 'extension=/usr/lib64/php/modules/amazon-elasticache-cluster-client.so;' >> /etc/php.d/50-memcached.ini echo 'extension=igbinary.so;' >> /etc/php.d/50-memcached.ini #update Moodle source to use DYNAMIC_CLIENT_MODE so Moodle can detect changes to the elasticache cluster membership