adlnet / ADL_LRS

ADL's Open Source Learning Record Store (LRS) is used to store learning data collected with the Experience API.
https://lrs.adlnet.gov
Apache License 2.0
308 stars 146 forks source link

installation instructions could be clearer #248

Closed garemoko closed 10 years ago

garemoko commented 10 years ago

This is now a note for me (or anybody) to add a reminder before the setup environment instructions that the user should still be in the ADL_LRS folder. (In case they moved folder when editing settings.py).

Updated 23/11/13 (which is why comments below no longer make sense)

fugu13 commented 10 years ago

? Django is included in the requirements installed by fab/pip, not missed

creighton commented 10 years ago

Hi Andrew,

We have the django install in the requirements.txt. When you run `fab setup_env' it'll run pip install -r requirements.txt... https://github.com/adlnet/ADL_LRS/blob/master/fabfile.py#L6

garemoko commented 10 years ago

I had to install it separately but it's still not working so maybe I did something else wrong! Will try again tomorrow.

fugu13 notifications@github.com wrote:

? Django is included in the requirements installed by fab/pip, not missed


Reply to this email directly or view it on GitHub: https://github.com/adlnet/ADL_LRS/issues/248#issuecomment-29118543

fugu13 commented 10 years ago

Are you trying to do stuff within the virtualenv?

garemoko commented 10 years ago

I'm not sure. I've installed virtualbox, put the latest ubuntu server on it and then followed the install instructions for adl LRS. It errors before it gets to ask me to set up a django admin. Can't find this file or that file.

garemoko commented 10 years ago

Cracked it. I had gone one level deeper to edit settings.py and so source "../env/bin/activate" was going to the wrong place.

I'll maybe add something to the bit of the instructions where I went wrong in case somebody else has the same problem.

DRichter4764 commented 10 years ago

I was able to get everything running just fine. However, when I rebooted my ubuntu server, it looks like all the necessary processes did not automatically start to bring the record store back up and accessible. I receive a 'Bad Gateway' error when trying to get to the site. Am I missing a step in the install to make the instance 'permanent'?

ljwolford commented 10 years ago

What you can do is create an upstart script. For example, if you're running the LRS using uwsgi, you can create a file called 'lrs.conf' inside of /etc/init Example of lrs.conf:

description "lrs"

start on runlevel [2345] stop on runlevel [!2345]

respawn

exec /home/path/to/virtualenv/uwsgi --emperor /path/to/uwsgi/vassals

DRichter4764 commented 10 years ago

Thanks for the advice on the script. I think my issue has to do with not fully understanding how the initial Django project works. After a reboot, to get everything to work correctly, I end up having to use the set_lrs command and then issue the supervisord command to start the web server. I am using uwsgi/nginx so perhaps I am taking the wrong steps to bypass having to use the Django server.

ljwolford commented 10 years ago

If you're using uWSGI, then you don't have to use supervisor, in fact you can uninstall it if you wish. We were using supervisor when we were using gunicorn (I still use this for dev but not production) but moved away from it when we started using uWSGI since it didn't kill all uWSGI processes cleanly. We have some setup notes about uWSGI with Nginx here if you need it. https://github.com/adlnet/ADL_LRS/wiki/Using-Nginx-for-Production