From 5b155000123a536d9c1e3b8ebafaab130913d91c Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 10:40:01 -0400 Subject: [PATCH 01/33] Update main.yml --- roles/wordpress/defaults/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/wordpress/defaults/main.yml b/roles/wordpress/defaults/main.yml index 1a84d3164..8a088c1ed 100644 --- a/roles/wordpress/defaults/main.yml +++ b/roles/wordpress/defaults/main.yml @@ -1,3 +1,10 @@ +wordpress_install: True +wordpress_enabled: True + +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +wordpress_raise_php_limits: False + wordpress_download_base_url: https://wordpress.org wordpress_src: latest.tar.gz @@ -5,9 +12,6 @@ wp_db_name: iiab_wp wp_db_user: iiab_wp wp_db_user_password: changeme -wordpress_install: True -wordpress_enabled: True - wp_install_path: "{{ content_base }}" #wp_install_path: /library From 5664b555e809de1f78e4c23c419e3f4030477104 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 10:42:06 -0400 Subject: [PATCH 02/33] Update main.yml --- roles/wordpress/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/wordpress/tasks/main.yml b/roles/wordpress/tasks/main.yml index 664bd28d0..742089d18 100644 --- a/roles/wordpress/tasks/main.yml +++ b/roles/wordpress/tasks/main.yml @@ -1,5 +1,5 @@ # SEE "emergency" REINSTALL INSTRUCTIONS IN roles/wordpress/tasks/install.yml -- name: Include the install playbook +- name: Install WordPress if wordpress_install include_tasks: install.yml when: wordpress_install From b61a46944ca21029a903ba38a2127056e0ab3520 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:03:44 -0400 Subject: [PATCH 03/33] Update install.yml --- roles/wordpress/tasks/install.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index fa794dd3c..3b88d9972 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -7,9 +7,9 @@ # - "mv /library/wordpress /library/wordpress.old" # - back up WordPress's database then drop it # -# REASON: "keep_newer: yes" below tries to preserves WordPress's self-upgrades +# REASON: "keep_newer: yes" below tries to preserve WordPress's self-upgrades # and security enhancements using timestamps under /library/wordpress, as these -# can arise without warning when WordPress is online, since WordPress ~4.8. +# can arise without warning when WordPress is online, since WordPress ~4.8 - name: Download the latest WordPress software get_url: @@ -47,6 +47,21 @@ mode: 0664 keep_newer: yes +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +- name: Raise php.ini limits in schools that use WordPress intensively + lineinfile: + path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + when: wordpress_raise_php_limits + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize 64M ; default on RPi is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size 128M ; default on RPi is 8M' } + - { regexp: '^memory_limit', line: 'memory_limit 256M ; default on RPi is 128M' } + - { regexp: '^max_execution_time', line: 'max_execution_time 300 ; default on RPi is 30' } + - { regexp: '^max_input_time', line: 'max_input_time 300 ; default on RPi is 60' } + # - name: Rename /library/wordpress* to /library/wordpress # shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi @@ -104,7 +119,7 @@ priv: "{{ wp_db_name }}.*:ALL,GRANT" state: present -- name: Copy WordPress config file +- name: Copy wp-config.php template: src: wp-config.php.j2 dest: "{{ wp_abs_path }}/wp-config.php" @@ -112,25 +127,25 @@ group: "{{ apache_user }}" mode: 0660 -- name: Copy WordPress httpd conf file +- name: Copy wordpress.conf to permit http://box{{ wp_url }} template: src: wordpress.conf.j2 dest: "/etc/{{ apache_config_dir }}/wordpress.conf" -- name: Enable httpd conf file if we are disabled (debuntu) +- name: Enable wordpress.conf if wordpress_enabled (debuntu) file: src: /etc/apache2/sites-available/wordpress.conf dest: /etc/apache2/sites-enabled/wordpress.conf state: link when: wordpress_enabled and is_debuntu -- name: Remove httpd conf file if we are disabled (OS's other than debuntu) +- name: Remove wordpress.conf if not wordpress_enabled (debuntu) file: path: /etc/apache2/sites-enabled/wordpress.conf state: absent when: not wordpress_enabled and is_debuntu -- name: Restart Apache, so it picks up the new aliases +- name: Restart Apache to enable/disable http://box{{ wp_url }} service: name: "{{ apache_service }}" state: restarted From e3cddadbfb47e56021948f5d7a9ca90ace9225bd Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:06:28 -0400 Subject: [PATCH 04/33] Update default_vars.yml --- vars/default_vars.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index b0317638c..6cc6426ee 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -280,6 +280,9 @@ nextcloud_enabled: False # WordPress wordpress_install: True wordpress_enabled: False +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +wordpress_raise_php_limits: False # 7-EDU-APPS From e3db8b57f851b96b9d68ab50def3a0a67dc311b1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:06:32 -0400 Subject: [PATCH 05/33] Update local_vars_min.yml --- vars/local_vars_min.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 8c933ee93..0a7988953 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -154,6 +154,9 @@ nextcloud_enabled: False wordpress_install: False wordpress_enabled: False +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +wordpress_raise_php_limits: False # 7-EDU-APPS From 8e74dc9e2b887772230c669adab3fd4c6e9fb7e5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:06:36 -0400 Subject: [PATCH 06/33] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 24c1571b4..81ac82f95 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -154,6 +154,9 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +wordpress_raise_php_limits: False # 7-EDU-APPS From e226e1ed5bd0daf9bb60fd60983bd6110cf47408 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:06:40 -0400 Subject: [PATCH 07/33] Update local_vars_big.yml --- vars/local_vars_big.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index e6ab61b54..48416239f 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -154,6 +154,9 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True +# For schools that use WordPress intensively. WARNING: Enabling this (might) +# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 +wordpress_raise_php_limits: False # 7-EDU-APPS From 80dbbe9f61aefd32dd5bdb7c45777aeb329581f7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:16:49 -0400 Subject: [PATCH 08/33] php.ini defaults confirmed on multiple OS's --- roles/wordpress/tasks/install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index 3b88d9972..46651709b 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -56,11 +56,11 @@ line: "{{ item.line }}" when: wordpress_raise_php_limits with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize 64M ; default on RPi is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size 128M ; default on RPi is 8M' } - - { regexp: '^memory_limit', line: 'memory_limit 256M ; default on RPi is 128M' } - - { regexp: '^max_execution_time', line: 'max_execution_time 300 ; default on RPi is 30' } - - { regexp: '^max_input_time', line: 'max_input_time 300 ; default on RPi is 60' } + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize 64M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size 128M ; default is 8M' } + - { regexp: '^memory_limit', line: 'memory_limit 256M ; default is 128M' } + - { regexp: '^max_execution_time', line: 'max_execution_time 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time 300 ; default is 60' } # - name: Rename /library/wordpress* to /library/wordpress # shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi From 13e7784d6cb49efe79279f1e98d3982a1be7e00d Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 22 Sep 2018 11:21:16 -0400 Subject: [PATCH 09/33] Update install.yml --- roles/wordpress/tasks/install.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index 46651709b..57d36b244 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -56,11 +56,11 @@ line: "{{ item.line }}" when: wordpress_raise_php_limits with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize 64M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size 128M ; default is 8M' } - - { regexp: '^memory_limit', line: 'memory_limit 256M ; default is 128M' } - - { regexp: '^max_execution_time', line: 'max_execution_time 300 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time 300 ; default is 60' } + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' } + - { regexp: '^memory_limit', line: 'memory_limit = 256M ; default is 128M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } # - name: Rename /library/wordpress* to /library/wordpress # shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi From e1e0f8ce537f33b4c4f6ef0fd7789e40974d6afb Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 23 Sep 2018 12:00:22 +0700 Subject: [PATCH 10/33] Refactor: Task Layout --- roles/kolibri/tasks/main.yml | 47 ++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/roles/kolibri/tasks/main.yml b/roles/kolibri/tasks/main.yml index 40cdac2e4..b2526b4be 100644 --- a/roles/kolibri/tasks/main.yml +++ b/roles/kolibri/tasks/main.yml @@ -29,6 +29,32 @@ extra_args: --no-cache-dir when: internet_available +- name: Set kolibri default language + shell: export KOLIBRI_HOME="{{ kolibri_home }}" && "{{ kolibri_exec_path }}" language setdefault "{{ kolibri_language }}" + ignore_errors: yes + when: kolibri_provision + +- name: Set kolibri default language + shell: export KOLIBRI_HOME="{{ kolibri_home }}" && "{{ kolibri_exec_path }}" language setdefault "{{ kolibri_language }}" + ignore_errors: yes + when: kolibri_provision + +- name: Create kolibri default facility name, admin account and language + shell: > + export KOLIBRI_HOME="{{ kolibri_home }}" && + "{{ kolibri_exec_path }}" manage provisiondevice --facility "{{ kolibri_facility }}" + --superusername "{{ kolibri_admin_user }}" --superuserpassword "{{ kolibri_admin_password }}" + --preset "{{ kolibri_preset }}" --language_id "{{ kolibri_language }}" --verbosity 0 --noinput + ignore_errors: yes + when: kolibri_provision + +- name: Change /library/kolibri directory permissions + file: + path: "{{ kolibri_home }}" + owner: "{{ kolibri_user }}" + group: "{{ apache_user }}" + recurse: yes + - name: Create kolibri systemd service unit file template: src: "{{ item.src }}" @@ -54,27 +80,6 @@ state: stopped when: not kolibri_enabled -- name: Set kolibri default language - shell: export KOLIBRI_HOME="{{ kolibri_home }}" && "{{ kolibri_exec_path }}" language setdefault "{{ kolibri_language }}" - ignore_errors: yes - when: kolibri_provision - -- name: Create kolibri default facility name, admin account and language - shell: > - export KOLIBRI_HOME="{{ kolibri_home }}" && - "{{ kolibri_exec_path }}" manage provisiondevice --facility "{{ kolibri_facility }}" - --superusername "{{ kolibri_admin_user }}" --superuserpassword "{{ kolibri_admin_password }}" - --preset "{{ kolibri_preset }}" --language_id "{{ kolibri_language }}" --verbosity 0 --noinput - ignore_errors: yes - when: kolibri_provision - -- name: Change /library/kolibri directory permissions - file: - path: "{{ kolibri_home }}" - owner: "{{ kolibri_user }}" - group: "{{ apache_user }}" - recurse: yes - - name: Add 'kolibri' to list of services at /etc/iiab/iiab.ini ini_file: dest: "{{ service_filelist }}" From 33f3a85de09bc32bd317da0b2db61345962c9669 Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 23 Sep 2018 12:17:26 +0700 Subject: [PATCH 11/33] Refactor: Run kolibri migrations task Run kolibri migrations as part of the kolibri setup itself. This makes kolibri.service initial run faster on low-end Raspberry Pi devices. "Unable to start service kolibri: Job for kolibri.service failed because a timeout was exceeded." #1158 https://github.com/iiab/iiab/issues/1158 --- roles/kolibri/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kolibri/tasks/main.yml b/roles/kolibri/tasks/main.yml index b2526b4be..ab04f2832 100644 --- a/roles/kolibri/tasks/main.yml +++ b/roles/kolibri/tasks/main.yml @@ -29,8 +29,8 @@ extra_args: --no-cache-dir when: internet_available -- name: Set kolibri default language - shell: export KOLIBRI_HOME="{{ kolibri_home }}" && "{{ kolibri_exec_path }}" language setdefault "{{ kolibri_language }}" +- name: Run kolibri migrations + shell: export KOLIBRI_HOME="{{ kolibri_home }}" && "{{ kolibri_exec_path }}" manage migrate ignore_errors: yes when: kolibri_provision From fb0c39cdf09a037435f1a00153bb7e6889b4f679 Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 23 Sep 2018 12:29:52 +0700 Subject: [PATCH 12/33] Added known issues to kolibri README file. --- roles/kolibri/README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/kolibri/README.rst b/roles/kolibri/README.rst index 31c840e05..d3f5924fb 100644 --- a/roles/kolibri/README.rst +++ b/roles/kolibri/README.rst @@ -49,3 +49,10 @@ To return to using the systemd unit:: kolibri stop systemctl start kolibri + +Known Issues +------------- + +* Kolibri migrations can take a long time on a Raspberry Pi. These long running migrations could cause kolibri service timeouts. Try running migrations manually using 'kolibri manage migrate' command following the troubleshooting instructions above. Kolibri developers are trying to address this issue. (Refer https://github.com/learningequality/kolibri/issues/4310). + +* Loading channels can take a long time on a Raspberry Pi. When generating channel contents for Khan Academy, the step indicated as “Generating channel listing. This could take a few minutes…” could mean ~30 minutes. The device’s computation power is the bottleneck. You might get logged out while waiting, but this is harmless and the process will continue. Sit tight! From f0b3dc75748c2f666abf6e138476380681e8ca20 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 18:34:54 -0400 Subject: [PATCH 13/33] Create main.yml --- roles/httpd/defaults/main.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 roles/httpd/defaults/main.yml diff --git a/roles/httpd/defaults/main.yml b/roles/httpd/defaults/main.yml new file mode 100644 index 000000000..7cb58c931 --- /dev/null +++ b/roles/httpd/defaults/main.yml @@ -0,0 +1,3 @@ +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False From 70e96032a989c5575c1e495a0c94cabe85b23d8b Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 18:54:30 -0400 Subject: [PATCH 14/33] Update main.yml --- roles/wordpress/defaults/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/wordpress/defaults/main.yml b/roles/wordpress/defaults/main.yml index 8a088c1ed..3ea78d238 100644 --- a/roles/wordpress/defaults/main.yml +++ b/roles/wordpress/defaults/main.yml @@ -1,9 +1,13 @@ wordpress_install: True wordpress_enabled: True -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -wordpress_raise_php_limits: False +# If using WordPress intensively, consider setting apache_raise_php_limits in: +# /etc/iiab/local_vars.yml + +See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False +# roles/httpd/defaults/main.yml wordpress_download_base_url: https://wordpress.org wordpress_src: latest.tar.gz From 869fc76bd8e16a7d1ee0f70cf86b888e5c4d3183 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 18:56:34 -0400 Subject: [PATCH 15/33] Update main.yml --- roles/moodle/defaults/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/moodle/defaults/main.yml b/roles/moodle/defaults/main.yml index 045496194..fae2de673 100644 --- a/roles/moodle/defaults/main.yml +++ b/roles/moodle/defaults/main.yml @@ -1,9 +1,13 @@ +#moodle_install: True +#moodle_enabled: False + +# If using Moodle intensively, consider setting apache_raise_php_limits in: +# /etc/iiab/local_vars.yml + moodle_version: 35 #moodle_repo_url: "https://github.com/moodle/moodle.git" moodle_repo_url: "git://git.moodle.org/moodle.git" moodle_base: "{{ iiab_base }}/moodle" #moodle_user: moodle -#moodle_install: True -#moodle_enabled: False moodle_data: '{{ content_base }}/moodle' moodle_database_name: moodle From ef61d2e0f3b8357d63f1a167583f7ac4eda94837 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 18:59:57 -0400 Subject: [PATCH 16/33] Update main.yml --- roles/httpd/defaults/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/httpd/defaults/main.yml b/roles/httpd/defaults/main.yml index 7cb58c931..c11b7ec1f 100644 --- a/roles/httpd/defaults/main.yml +++ b/roles/httpd/defaults/main.yml @@ -1,3 +1,6 @@ +# Make this False to disable http://box/common/services/power_off.php button: +apache_allow_sudo: True + # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? apache_raise_php_limits: False From 0f6a9e4a65ecae7a0a37f8309871537633acee0b Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:00:56 -0400 Subject: [PATCH 17/33] Update default_vars.yml --- vars/default_vars.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 6cc6426ee..ff0ebb40e 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -160,10 +160,14 @@ wan_nameserver: # 3-BASE-SERVER -# Make this False to disable http://box/common/services/power_off.php button: -allow_apache_sudo: True +# roles/httpd (Apache configuration) runs here -# roles/httpd runs here +# Make this False to disable http://box/common/services/power_off.php button: +apache_allow_sudo: True + +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False # roles/iiab-admin runs here @@ -280,9 +284,7 @@ nextcloud_enabled: False # WordPress wordpress_install: True wordpress_enabled: False -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -wordpress_raise_php_limits: False +# If using Moodle intensively, consider setting apache_raise_php_limits above # 7-EDU-APPS @@ -312,6 +314,7 @@ iiab_zim_path: /library/zims # Moodle moodle_install: False moodle_enabled: False +# If using Moodle intensively, consider setting apache_raise_php_limits above # Sugarizer # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 From 34009a2309c26e871a93ca81fd73611063053c42 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:03:23 -0400 Subject: [PATCH 18/33] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index ff0ebb40e..47c80c776 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -284,7 +284,7 @@ nextcloud_enabled: False # WordPress wordpress_install: True wordpress_enabled: False -# If using Moodle intensively, consider setting apache_raise_php_limits above +# If using WordPress intensively, consider setting apache_raise_php_limits above # 7-EDU-APPS From cfe60f4f77168989586594eb4b4c088be4c2bf69 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:06:53 -0400 Subject: [PATCH 19/33] Update local_vars_min.yml --- vars/local_vars_min.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 0a7988953..cb186fbd8 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -77,7 +77,11 @@ dansguardian_enabled: False # 3-BASE-SERVER # Make this False to disable http://box/common/services/power_off.php button: -allow_apache_sudo: True +apache_allow_sudo: True + +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False # roles/mysql runs here (mandatory) @@ -154,9 +158,7 @@ nextcloud_enabled: False wordpress_install: False wordpress_enabled: False -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -wordpress_raise_php_limits: False +# If using WordPress intensively, consider setting apache_raise_php_limits above # 7-EDU-APPS @@ -176,6 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False +# If using Moodle intensively, consider setting apache_raise_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 3ff06682d55b8202cf20bafa6204f4407531c336 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:06:58 -0400 Subject: [PATCH 20/33] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 81ac82f95..016cbc854 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -77,7 +77,11 @@ dansguardian_enabled: False # 3-BASE-SERVER # Make this False to disable http://box/common/services/power_off.php button: -allow_apache_sudo: True +apache_allow_sudo: True + +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False # roles/mysql runs here (mandatory) @@ -154,9 +158,7 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -wordpress_raise_php_limits: False +# If using WordPress intensively, consider setting apache_raise_php_limits above # 7-EDU-APPS @@ -176,6 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False +# If using Moodle intensively, consider setting apache_raise_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From f7e51800ff2dfe41ae1a82b0bed9690a0a23e457 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:07:02 -0400 Subject: [PATCH 21/33] Update local_vars_big.yml --- vars/local_vars_big.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 48416239f..e0ac1aeae 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -77,7 +77,11 @@ dansguardian_enabled: True # 3-BASE-SERVER # Make this False to disable http://box/common/services/power_off.php button: -allow_apache_sudo: True +apache_allow_sudo: True + +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +apache_raise_php_limits: False # roles/mysql runs here (mandatory) @@ -154,9 +158,7 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -wordpress_raise_php_limits: False +# If using WordPress intensively, consider setting apache_raise_php_limits above # 7-EDU-APPS @@ -176,6 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: True moodle_enabled: True +# If using Moodle intensively, consider setting apache_raise_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 4e5ddb2c601c0d8748d6031fca515e6d19f74654 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:12:22 -0400 Subject: [PATCH 22/33] Update main.yml --- roles/httpd/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 2091165f1..da8503823 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -69,7 +69,7 @@ with_items: - { src: '010-iiab.conf.j2', dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' } - { src: 'proxy_ajp.conf.j2', dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' } - - { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' } + #- { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' } # @jvonau suggests removing this in https://github.com/iiab/iiab/issues/1147 # remove symlinks for mpm-event, replace with mpm-prefork - name: Remove mpm event links (debuntu) @@ -207,10 +207,10 @@ src: 020_apache_poweroff.j2 dest: /etc/sudoers.d/020_apache_poweroff mode: 0755 - when: allow_apache_sudo + when: apache_allow_sudo - name: Remove apache_user permission to poweroff file: dest: /etc/sudoers.d/020_apache_poweroff state: absent - when: not allow_apache_sudo + when: not apache_allow_sudo From 66309fa56a693725bcf3268030194fa9a9eabde1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:14:36 -0400 Subject: [PATCH 23/33] Update install.yml --- roles/wordpress/tasks/install.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/roles/wordpress/tasks/install.yml b/roles/wordpress/tasks/install.yml index 57d36b244..9a51aa587 100644 --- a/roles/wordpress/tasks/install.yml +++ b/roles/wordpress/tasks/install.yml @@ -47,21 +47,6 @@ mode: 0664 keep_newer: yes -# For schools that use WordPress intensively. WARNING: Enabling this (might) -# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147 -- name: Raise php.ini limits in schools that use WordPress intensively - lineinfile: - path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - when: wordpress_raise_php_limits - with_items: - - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' } - - { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' } - - { regexp: '^memory_limit', line: 'memory_limit = 256M ; default is 128M' } - - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } - - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } - # - name: Rename /library/wordpress* to /library/wordpress # shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi From 0555d7e4cc0ac6dd4363de950662ecdcb10ae8a6 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:25:45 -0400 Subject: [PATCH 24/33] Update main.yml --- roles/httpd/tasks/main.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index da8503823..2d199f952 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -21,16 +21,16 @@ name: "php{{ php_version }}-sqlite3" when: is_debian and ansible_distribution_major_version == "9" -- name: Install httpd required packages (ubuntu) - package: - name: "{{ item }}" - state: present - with_items: - - apache2 - - php - tags: - - download - when: is_ubuntu +- name: Install httpd required packages (ubuntu) + package: + name: "{{ item }}" + state: present + with_items: + - apache2 + - php + tags: + - download + when: is_ubuntu - name: SQLite3 no longer included in another package (ubuntu-18) package: @@ -71,6 +71,21 @@ - { src: 'proxy_ajp.conf.j2', dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' } #- { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' } # @jvonau suggests removing this in https://github.com/iiab/iiab/issues/1147 +# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 +# WARNING: Enabling this (might) cause excess use of RAM or other resources? +- name: Raise php.ini limits if using WordPress and/or Moodle intensively + lineinfile: + path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + when: apache_raise_php_limits + with_items: + - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' } + - { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' } + - { regexp: '^memory_limit', line: 'memory_limit = 256M ; default is 128M' } + - { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' } + - { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' } + # remove symlinks for mpm-event, replace with mpm-prefork - name: Remove mpm event links (debuntu) file: From 215f00a954c22d8e31e9cadb962430d0de27dcf3 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 23 Sep 2018 19:34:05 -0400 Subject: [PATCH 25/33] Update main.yml --- roles/wordpress/defaults/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/roles/wordpress/defaults/main.yml b/roles/wordpress/defaults/main.yml index 3ea78d238..09887e457 100644 --- a/roles/wordpress/defaults/main.yml +++ b/roles/wordpress/defaults/main.yml @@ -4,11 +4,6 @@ wordpress_enabled: True # If using WordPress intensively, consider setting apache_raise_php_limits in: # /etc/iiab/local_vars.yml -See iiab/iiab #1147 -# WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False -# roles/httpd/defaults/main.yml - wordpress_download_base_url: https://wordpress.org wordpress_src: latest.tar.gz From 648dafdc6b232aa938d9a07f07036fcd7f8c280f Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:31:03 -0400 Subject: [PATCH 26/33] Update main.yml --- roles/httpd/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/httpd/defaults/main.yml b/roles/httpd/defaults/main.yml index c11b7ec1f..306e715b6 100644 --- a/roles/httpd/defaults/main.yml +++ b/roles/httpd/defaults/main.yml @@ -3,4 +3,4 @@ apache_allow_sudo: True # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False +apache_high_php_limits: False From 91e660777e0c800b8ac079a21befb8726ae8243e Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:33:55 -0400 Subject: [PATCH 27/33] Update main.yml --- roles/httpd/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 2d199f952..91698ae62 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -73,12 +73,12 @@ # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -- name: Raise php.ini limits if using WordPress and/or Moodle intensively +- name: Enact high limits in /etc/php/{{ php_version }}/{{ apache_service }}/php.ini if using WordPress and/or Moodle intensively lineinfile: path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini" regexp: "{{ item.regexp }}" line: "{{ item.line }}" - when: apache_raise_php_limits + when: apache_high_php_limits with_items: - { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' } - { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' } From 2baa8a203da79a15a3abc7d1c71a39c847b0c512 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:34:15 -0400 Subject: [PATCH 28/33] Update main.yml --- roles/moodle/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/moodle/defaults/main.yml b/roles/moodle/defaults/main.yml index fae2de673..46cdb8c59 100644 --- a/roles/moodle/defaults/main.yml +++ b/roles/moodle/defaults/main.yml @@ -1,7 +1,7 @@ #moodle_install: True #moodle_enabled: False -# If using Moodle intensively, consider setting apache_raise_php_limits in: +# If using Moodle intensively, consider setting apache_high_php_limits in: # /etc/iiab/local_vars.yml moodle_version: 35 From 976d655781b4810706106ca631b4396512982072 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:34:32 -0400 Subject: [PATCH 29/33] Update main.yml --- roles/wordpress/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/wordpress/defaults/main.yml b/roles/wordpress/defaults/main.yml index 09887e457..fd8fbcfcb 100644 --- a/roles/wordpress/defaults/main.yml +++ b/roles/wordpress/defaults/main.yml @@ -1,7 +1,7 @@ wordpress_install: True wordpress_enabled: True -# If using WordPress intensively, consider setting apache_raise_php_limits in: +# If using WordPress intensively, consider setting apache_high_php_limits in: # /etc/iiab/local_vars.yml wordpress_download_base_url: https://wordpress.org From 2497ac2bd3b54b97686450034c2884f9352668fd Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:36:22 -0400 Subject: [PATCH 30/33] Update default_vars.yml --- vars/default_vars.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 47c80c776..df8815cd5 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -167,7 +167,7 @@ apache_allow_sudo: True # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False +apache_high_php_limits: False # roles/iiab-admin runs here @@ -284,7 +284,7 @@ nextcloud_enabled: False # WordPress wordpress_install: True wordpress_enabled: False -# If using WordPress intensively, consider setting apache_raise_php_limits above +# If using WordPress intensively, consider setting apache_high_php_limits above # 7-EDU-APPS @@ -314,7 +314,7 @@ iiab_zim_path: /library/zims # Moodle moodle_install: False moodle_enabled: False -# If using Moodle intensively, consider setting apache_raise_php_limits above +# If using Moodle intensively, consider setting apache_high_php_limits above # Sugarizer # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 From 74d3c37d7a1e735114aa39d991bc3b5b87af5ff7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:37:07 -0400 Subject: [PATCH 31/33] Update local_vars_min.yml --- vars/local_vars_min.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index cb186fbd8..1a71b91a5 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -81,7 +81,7 @@ apache_allow_sudo: True # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False +apache_high_php_limits: False # roles/mysql runs here (mandatory) @@ -158,7 +158,7 @@ nextcloud_enabled: False wordpress_install: False wordpress_enabled: False -# If using WordPress intensively, consider setting apache_raise_php_limits above +# If using WordPress intensively, consider setting apache_high_php_limits above # 7-EDU-APPS @@ -178,7 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False -# If using Moodle intensively, consider setting apache_raise_php_limits above +# If using Moodle intensively, consider setting apache_high_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 7c38d22f07175bdc4118f82082ccbd9740972364 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:38:15 -0400 Subject: [PATCH 32/33] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 016cbc854..a6c4aa0ff 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -81,7 +81,7 @@ apache_allow_sudo: True # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False +apache_high_php_limits: False # roles/mysql runs here (mandatory) @@ -158,7 +158,7 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True -# If using WordPress intensively, consider setting apache_raise_php_limits above +# If using WordPress intensively, consider setting apache_high_php_limits above # 7-EDU-APPS @@ -178,7 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False -# If using Moodle intensively, consider setting apache_raise_php_limits above +# If using Moodle intensively, consider setting apache_high_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 4f9c84967138f9f2383f26009ee1957527e9f9d5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 24 Sep 2018 12:39:03 -0400 Subject: [PATCH 33/33] Update local_vars_big.yml --- vars/local_vars_big.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index e0ac1aeae..dcf989fab 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -81,7 +81,7 @@ apache_allow_sudo: True # For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147 # WARNING: Enabling this (might) cause excess use of RAM or other resources? -apache_raise_php_limits: False +apache_high_php_limits: False # roles/mysql runs here (mandatory) @@ -158,7 +158,7 @@ nextcloud_enabled: True wordpress_install: True wordpress_enabled: True -# If using WordPress intensively, consider setting apache_raise_php_limits above +# If using WordPress intensively, consider setting apache_high_php_limits above # 7-EDU-APPS @@ -178,7 +178,7 @@ kiwix_enabled: True # Warning: Moodle is a serious LMS, that takes a while to install moodle_install: True moodle_enabled: True -# If using Moodle intensively, consider setting apache_raise_php_limits above +# If using Moodle intensively, consider setting apache_high_php_limits above # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957