learningequality / ka-lite-installers

Various platform-specific installers and supporting scripts for KA Lite
MIT License
7 stars 10 forks source link

Ka-lite Installs on one path but loads on other #190

Closed alejacquet closed 8 years ago

alejacquet commented 9 years ago

Hey guys,

I've been working a lot with Ka-lite and Raspberry Pi's, I've noticed something, I'm able to install using apt-get install ka-lite-raspberry-pi, however, and this happens very often 2 things

  1. During the installation the default path to download the assessment.zip is in /tmp, in Raspberry PI usually this is a small partition, it would be interesting to have the option to select where to download
  2. After installing everything by default /var/kalite/.kalite; However after shutdown or even kalite stop; kalite start; the service is brought up in a new path /root/.kalite;

Have you guys seen this? I couldn't find anywhere or why this happens.

To run the command as the default user, run this instead:

sudo su ka-lite -s /bin/sh -c /usr/bin/kalite start --foreground

Do you wish to continue? [y/N] y Running 'kalite start' in foreground...

Stand by while the server loads its data...

INFO:kalite:Setting up KA Lite; this may take a few minutes; please wait!


| | / / / \ | | () |
| |/ / / /\ \ | | | |_ _
| \ | | | | | | **/ \
| |\ | | | | | || | || /
| /| |/
**/|____|

https://learningequality.org/ka-lite/

     version 0.14.0

WARNING:root:It's recommended that you install Python version 2.7.9. Your version is: 2.7.3


WARNING: Database file already exists!

Upgrading database to KA Lite version 0.14.0 Cleaning pyc files (if writable) from: /usr/share/kalite/dist-packages Cleaning pyc files (if writable) from: /usr/share/kalite/python-packages Syncing... Creating tables ... Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table auth_user_groups Creating table auth_user_user_permissions Creating table auth_user Creating table django_session Creating table django_admin_log Creating table django_content_type Creating table south_migrationhistory Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s)

Synced:

django.contrib.auth django.contrib.sessions django.contrib.messages django.contrib.admin django.contrib.staticfiles django.contrib.contenttypes compressor django_js_reverse south fle_utils.testing kalite.coachreports kalite.distributed kalite.topic_tools kalite.contentload kalite.dynamic_assets kalite.control_panel

Not synced (use migrations):

Synced:

django.contrib.auth django.contrib.sessions django.contrib.messages django.contrib.admin django.contrib.staticfiles django.contrib.contenttypes compressor django_js_reverse south fle_utils.testing kalite.coachreports kalite.distributed kalite.topic_tools kalite.contentload kalite.dynamic_assets kalite.control_panel

Not synced (use migrations):

CONGRATULATIONS! You've finished setting up the KA Lite server software. You can now start KA Lite with the following command:

kalite start

INFO:kalite:Running videoscan.

benjaoming commented 8 years ago

Hi @alejacquet !

Thanks for explaining all this, back then I was less attentive about this repo's activities. Anyhow, regarding the first item, choosing temporary location for the assessment items, it's been made configurable. We discussed it on email, so perhaps I don't need to go into details here.. but it's this debconf setting:

Template: ka-lite/download-assessment-items-tmp
Type: string
Default: /tmp
Description: Where to temporarily store downloaded file

Regarding the latter issue, it's because somehow the user to run KA Lite has been set to "root". This debconf is used during install:

Template: ka-lite/user
Type: string
Default: ka-lite
Description: Which user account should own the KA Lite server?
 By default, we can create a new user account with a home directory
 that owns all the files for KA Lite.
 .
 But you can also choose a different user, for instance your own
 desktop user, to have easier access to KA Lite data without having
 to change privileges.

...You can redefine it after in /etc/ka-lite/username

Please in the future feel free to open up issues here :)