Last active
August 29, 2015 14:12
-
-
Save tymofij/1cac43f6ecd54bc58773 to your computer and use it in GitHub Desktop.
edx-notes-api service at devstack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make port available for your main machine | |
vagrant halt | |
# edit Vagrantfile, to line 72 (near other port forwarding stuff) add: | |
` config.vm.network :forwarded_port, guest: 8120, host: 8120` | |
vagrant up | |
# installing and starting API service | |
sudo su edxapp | |
pip install virtualenvwrapper | |
source virtualenvwrapper.sh | |
cd | |
git clone https://github.com/edx/edx-notes-api.git | |
cd edx-notes-api | |
mkvirtualenv notes | |
workon notes | |
make requirements | |
./manage.py syncdb | |
make create-index | |
make run | |
# starting installed API service | |
sudo su edxapp | |
source virtualenvwrapper.sh | |
cd ~/edx-notes-api | |
workon notes | |
make run | |
# creating API Client in LMS, do it once (other ssh session) | |
sudo su edxapp | |
cd | |
source edxapp_env | |
cd edx-platform | |
./manage.py lms shell --settings=devstack | |
> from provider.oauth2.models import Client | |
> Client(name='edx-notes', client_type=1, client_id='edx-notes-id', client_secret='edx-notes-secret').save() | |
ctrl+D | |
# SANDBOX details: | |
* make sure that you are on MIT VPN | |
* edit ’lms/envs/common.py’, set EDXNOTES_INTERFACE = { | |
'url': 'http://YOURSANDBOX.m.sandbox.edx.org:8120/api/v1', | |
} | |
* it is useful to run `make run` in a screen, that way api server will keep running even when you disconnect | |
see http://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/ (ctrl+A D to detach, screen -x to reattach) | |
* also see https://github.com/edx/configuration/wiki/edX-Managing-the-Full-Stack | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment