1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #143 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2018-08-31 05:27:01 -04:00 committed by GitHub
commit 8cf3d6d457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 152 additions and 141 deletions

View file

@ -3,6 +3,12 @@
- name: ...IS BEGINNING ======================================
command: echo
- name: TRANSMISSION
include_role:
name: transmission
when: transmission_install
tags: transmission
- name: AWSTATS
include_role:
name: awstats

View file

@ -15,12 +15,6 @@
when: calibreweb_install
tags: calibre-web
- name: TRANSMISSION
include_role:
name: transmission
when: transmission_install
tags: transmission
- name: Recording STAGE 9 HAS COMPLETED ====================
lineinfile:
dest: /etc/iiab/iiab.env

View file

@ -86,7 +86,8 @@
state: restarted
when: calibreweb_enabled
- name: Enable http://box/calibre-web with Apache
# Default: http://box/books
- name: Enable http://box{{ calibreweb_url }} with Apache
command: a2ensite calibre-web.conf
when: calibreweb_enabled

View file

@ -2,48 +2,50 @@
KA Lite README
==============
This role installs KA Lite, an offline version of the Khan Academy (https://www.khanacademy.org/),
written by Learning Equality (https://learningequality.org/ka-lite/).
This role installs KA Lite, an offline version of Khan Academy (https://www.khanacademy.org) created by Learning Equality
(https://learningequality.org/ka-lite/).
KA Lite has two servers, a light httpd server that serves Khan Academy videos, and a cron server
that sets up cron jobs to download language packs and KA videos from the internet. There are
separate flags to enable these two servers.
KA Lite downloads Khan Academy videos to your Internet-in-a-Box for offline use, with exercises and accounts if students want to track their own progress.
Access
------
[Originally KA Lite had two servers, a light httpd server that serves Khan Academy videos, and a cron server that sets up cron jobs to download language packs and KA videos from the internet. There were separate flags to enable these two servers.]
If enabled and with the default settings KA Lite should be accessible at http://schoolserver:8008/
Using It
--------
To login to kalite enter
If enabled with the default settings, KA Lite should be accessible at http://box:8008 or http://box.lan:8008
User Name: Admin
Password: changme
After your Internet-in-a-Box (IIAB) is completely installed, log in to KA Lite to explore and configure::
Bulk Loading Videos
-------------------
Username: Admin
Password: changeme
Videos and their corresponding png images can be copied into /library/ka-lite/content and will
be recognized the next time kalite is started. The kalite website has instructions on getting
videos with bitsync. These videos are also smaller than the ones downloaded with the kalite
admin interface.
Bulk Downloading Videos
-----------------------
Videos and their corresponding PNG thumbnail images can be copied into /library/ka-lite/content and will be recognized the next time KA Lite is started.
Please see http://FAQ.IIAB.IO ("KA Lite Administration: What tips & tricks exist?") to use BitTorrent to download compressed KA Lite videos, that are much smaller than the ones downloaded via KA Lite's administrative interface.
As of August 2018, please also consider the `"Transmission" BitTorrent tool <https://github.com/iiab/iiab/tree/master/roles/transmission#transmission-readme>`_ that will automatically download thousands of KA Lite videos to your Internet-in-a-Box (IIAB) — if you install and enable "transmission" within /etc/iiab/local_vars.yml — carefully choosing the language(s) you want as downloading these videos can take many hours if not days!
Configuration Parameters
------------------------
Please look in defaults/main.yml for the default values of the various install parameters. Everything
in this readme assumes the default values.
Look at `role/kalite/defaults/main.yml <https://github.com/iiab/iiab/blob/master/roles/kalite/defaults/main.yml>`_ for the default values of the various install parameters.
Trouble Shooting
----------------
Troubleshooting
---------------
Starting with kalite 0.15 you can run the server manually with the following commands:
Starting with KA Lite 0.15 (October 2015) you can run the server manually with the following commands:
* systemctl stop kalite-serve (make sure the systemd service is not running)
* export KALITE_HOME=/library/ka-lite (point kalite to the right environment)
* kalite start (start the server; can take more than 10 minutes in some environment)
* kalite start (start the server; can take more than 10 minutes in some environments)
To return to using the systemd unit:
* export KALITE_HOME=/library/ka-lite (point kalite to the right environment)
* kalite stop
* systemctl start kalite-serve
*In late 2017, Internet-in-a-Box added a virtual environment (/usr/local/kalite/venv/) to keep KA Lite's Python package/dependency risks under control. As such the command* `/usr/bin/kalite <https://github.com/iiab/iiab/blob/master/roles/kalite/templates/kalite.sh.j2>`_ *is a wrapper to this virtualenv.*

View file

@ -2,12 +2,12 @@
# Assume all XOs are F18 and nothing else is
- name: Calc KA Lite db file name (Fedora 18)
- name: Set KA Lite's SQLite filename (Fedora 18)
set_fact:
kalite_db_name: "{{ kalite_root }}/kalite/database/data.sqlite"
when: is_F18
- name: Calc KA Lite db file name (OS's other than Fedora 18)
- name: Set KA Lite's SQLite filename (OS's other than Fedora 18)
set_fact:
kalite_db_name: "{{ kalite_root }}/database/data.sqlite"
when: not is_F18
@ -46,7 +46,7 @@
- option: name
value: "KA Lite"
- option: description
value: '"KA Lite is a server to present Khan Academy videos offline and to download them."'
value: '"KA Lite downloads Khan Academy videos for offline use, with exercises and accounts if students want to track their own progress."'
- option: path
value: "{{ kalite_root }}"
- option: port

View file

@ -1,4 +1,11 @@
RewriteEngine on
RewriteRule ^{{ kiwix_alias_url }}$ {{ kiwix_url }} [R]
# 2018-08-31: FAILS to enable http://box/kiwix
#RewriteEngine on
#RewriteRule ^{{ kiwix_alias_url }}$ {{ kiwix_url }} [R]
# 2018-08-31: SUCCEEDS in enabling http://box/kiwix
RedirectMatch ^{{ kiwix_alias_url }}$ {{ kiwix_url }}
# 2018-08-31: SUCCEEDS in enabling http://box/kiwix/ & http://box/kiwix/zim & http://box/kiwix/zim/
#ProxyPreserveHost On
ProxyPass {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }}
#ProxyPassReverse {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }}

View file

@ -17,7 +17,7 @@ Caveat emptor! (That's Latin for "Buyer Beware")
Using It
--------
Install Transmission by setting 'transmission_install' and 'transmission_enabled' to True in /etc/iiab/local_vars.yml and then running::
Install Transmission by setting 'transmission_install' and 'transmission_enabled' to True in `/etc/iiab/local_vars.yml <http://wiki.iiab.io/local_vars.yml>`_ — carefully choosing language(s) for KA Lite videos you want to download — and then run::
cd /opt/iiab/iiab
./runrole transmission
@ -59,7 +59,7 @@ Adding Torrents
Transmission can facilitate provisioning content onto your IIAB, e.g. by adding thousands of KA Lite videos from places like: http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
Please read the lettered instructions (A, B, C, D) in /etc/iiab/local_vars.yml and 'KA Lite Administration: What tips & tricks exist?' at http://FAQ.IIAB.IO outlining how to use Transmission to download and then install KA Lite content.
Please read the lettered instructions (A, B, C, D) in `/etc/iiab/local_vars.yml <http://wiki.iiab.io/local_vars.yml>`_ and 'KA Lite Administration: What tips & tricks exist?' at http://FAQ.IIAB.IO outlining how to use Transmission to download and then install KA Lite content.
You can also download other torrents using Transmission's web interface, or by typing 'transmission-remote' at the command-line::
@ -68,7 +68,7 @@ You can also download other torrents using Transmission's web interface, or by t
Known Issues
------------
* Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537). You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — both might need to be set to 'debian-transmission' — if so 'systemctl daemon-reload' then 'systemctl restart transmission-daemon').
* Default Transmission user/group may need fixing (https://github.com/transmission/transmission/issues/537) in some circumstances. You can set Ansible variables 'transmission_user' and 'transmission_group' e.g. in /opt/iiab/iiab/roles/transmission/defaults/main.yml (you might need 'User=' and 'Group=' in systemd unit file /lib/systemd/system/transmission-daemon.service — e.g. both might need to be set to 'debian-transmission' — if so then run 'systemctl daemon-reload' and 'systemctl restart transmission-daemon').
* Random Ports: Currently it is not possible to use random ports in the range 49152-65535. It is difficult to open multiple ports in IIAB's iptables-based firewall.

View file

@ -36,9 +36,10 @@
state: restarted
when: transmission_enabled
- name: Add KA Lite torrent(s) to transmission-daemon's queue
- name: Add PAUSED KA Lite torrent(s) to transmission-daemon's queue
shell: >
/usr/bin/transmission-remote
--start-paused
-n {{ transmission_username }}:{{ transmission_password }}
-a http://pantry.learningequality.org/downloads/ka-lite/{{ transmission_kalite_version }}/content/ka-lite-0.17-resized-videos-{{ item }}.torrent
with_items: "{{ transmission_kalite_languages }}"

View file

@ -327,6 +327,45 @@ sugarizer_port: 8089
# 8-MGMT-TOOLS
# Transmission is a BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# Transmission download directory & general owner/group
transmission_download_dir: "{{ content_base }}/transmission/" # /library/transmission/
transmission_user: debian-transmission
transmission_group: root
# Monitor downloads at http://box:9091 or http://box:9091/transmission using Admin/changeme
transmission_http_port: 9091
transmission_url : "/transmission/"
transmission_peer_port: 51413
# Provision Transmission with torrent(s) from http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_provision: True
transmission_kalite_version: 0.17
# A. Uncomment language(s) in /etc/iiab/local_vars.yml to download KA Lite videos to /library/transmission
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours if not days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
# Transmission administrative account
transmission_username: Admin
transmission_password: changeme
# AWStats - summarizes http access logs
awstats_install: True
awstats_enabled: False
@ -380,45 +419,6 @@ calibreweb_port: 8083
calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# Transmission is a BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# Transmission download directory & general owner/group
transmission_download_dir: "{{ content_base }}/transmission/" # /library/transmission/
transmission_user: debian-transmission
transmission_group: root
# Monitor downloads at http://box:9091 or http://box:9091/transmission using Admin/changeme
transmission_http_port: 9091
transmission_url : "/transmission/"
transmission_peer_port: 51413
# Provision Transmission with torrent(s) from http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_provision: True
transmission_kalite_version: 0.17
# A. Uncomment language(s) in /etc/iiab/local_vars.yml to download KA Lite videos to /library/transmission
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours or days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
# Transmission administrative account
transmission_username: Admin
transmission_password: changeme
# TeamViewer - unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False

View file

@ -186,6 +186,27 @@ sugarizer_enabled: True
# 8-MGMT-TOOLS
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours if not days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
awstats_install: True
awstats_enabled: True
@ -229,27 +250,6 @@ calibreweb_port: 8083
calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours or days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False

View file

@ -186,6 +186,27 @@ sugarizer_enabled: True
# 8-MGMT-TOOLS
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours if not days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
awstats_install: True
awstats_enabled: True
@ -229,27 +250,6 @@ calibreweb_port: 8083
calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours or days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False

View file

@ -186,6 +186,27 @@ sugarizer_enabled: False
# 8-MGMT-TOOLS
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours if not days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
awstats_install: True
awstats_enabled: True
@ -229,27 +250,6 @@ calibreweb_port: 8083
calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# BitTorrent downloader for large Content Packs etc
transmission_install: False
transmission_enabled: False
# A. Uncomment language(s) to download KA Lite videos to /library/transmission
# using http://pantry.learningequality.org/downloads/ka-lite/0.17/content/
transmission_kalite_languages:
- english
#- french
#- hindi
#- portugal-portuguese
#- brazilian-portuguese
#- spanish
#- swahili
# B. Monitor BitTorrent downloads at http://box:9091 using Admin/changeme
# until the download is confirmed complete (can take hours or days!)
# C. Carefully move all videos/thumbnails into /library/ka-lite/content
# (DO NOT OVERWRITE SUBFOLDERS assessment, locale, srt !)
# D. Log in to KA Lite at http://box:8008/updates/videos/ using Admin/changeme
# then click "Scan content folder for videos" (can take many minutes!)
# E. READ "KA Lite Administration: What tips & tricks exist?" AT http://FAQ.IIAB.IO
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False