Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smarnach/4aa752996339f04a4714 to your computer and use it in GitHub Desktop.
Save smarnach/4aa752996339f04a4714 to your computer and use it in GitHub Desktop.

As of: 2015-08-19

This is how to set up a combined devstack/insights virtualbox.

Run these commands on your host computer, in a new "combined-devstack" folder:

mkdir combined-devstack
cd combined-devstack
curl -L https://raw.githubusercontent.com/edx/configuration/master/vagrant/release/analyticstack/Vagrantfile > Vagrantfile
vagrant up
vagrant ssh
cd /edx/app/edx_ansible/edx_ansible/
sudo -u edx-ansible git pull
sudo -s
source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate
cd playbooks
ansible-playbook -i localhost, -c local vagrant-analytics.yml -e configuration_version=origin/master -e edx_platform_version=origin/master
usermod -s /bin/bash analytics_api
usermod -s /bin/bash insights

If you get "An error occurred while downloading the remote file." then edit the Vagrantfile and where it says config.vm.box = "analyticstack-beta", add a line immediately after that says config.vm.box_url = "http://files.edx.org/vagrant-images/cypress-devstack.box".

Meanwhile, in a seprate terminal window on your host, you can set up the pipeline:

cd analytics-devstack
git clone https://github.com/edx/edx-analytics-pipeline
cd edx-analytics-pipeline/
virtualenv venv
source venv/bin/activate
make bootstrap
# There are currently a couple of bugs - the following may be required to fix:
pip uninstall edx.analytics.tasks
python setup.py develop

Once both of these sets of setup commands have completed, follow the usage instructions at https://github.com/mulby/edx-documentation/blob/gabe/analytics-devstack/en_us/install_operations/source/devstack/analytics_devstack.rst#using-the-analytics-devstack

To get Insights login working:

  1. Go to http://localhost:8000/admin/oauth2/client/add/
  2. Name: Insights Dashboard
  3. URL: http://127.0.0.1:8110/
  4. Redirect URL: http://127.0.0.1:8110/complete/edx-oidc/
  5. Client type: Confidential
  6. Save
  7. vagrant ssh
  8. sudo nano /edx/etc/insights.yml
  9. Set SOCIAL_AUTH_EDX_OIDC_KEY to the "Client ID" value
  10. Set SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY and SOCIAL_AUTH_EDX_OIDC_SECRET to the "Client Secret" value.
  11. Save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment