From e1e0f8ce537f33b4c4f6ef0fd7789e40974d6afb Mon Sep 17 00:00:00 2001 From: Arky Date: Sun, 23 Sep 2018 12:00:22 +0700 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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!