Installation Guide

System:

  • Ubuntu 20.04
  • Postgres 12.5
  • Rabbitmq-server
  • Celery 4.2.1
  • Testing in a virtual environment first can help determine the right set of packages.

  • Install/check installation of python3-venv, use python3 -m venvname venvfoldername to create a v-env
  • Start venv with source venvname/bin/activate

  • Setup:

    With sudo -i -u postgres, create a new database called “helios”

    Move to the git repo and install the required dependencies with pip3 install -r requirements.txt

    Run py3 manage.py makemigrations, py3 manage.py migrate to configure the database.

    Start rabbitmq with servicectl rabbitmq-server start

    Start celery with celery -A helios worker -l info

    Edit:

    In a new window, go to settings.py and edit the allowed hosts to [‘*’] (this means all), set the URL to localhost or the production url, set the timezone, secret key, … and add google/facebook/social media credentials.

    Go to the google developer console and create a new web app with authorized JS origin = http://127.0.0.1:8000 as well as your site name, if you have one. Set redirect URL as http://localhost:8000/auth/after/ and also similar with your site name if available. Enable the Google+ and Google People APIs

    Add nonsensitive scopes:

  • People API > .../auth/userinfo.email
  • People API > .../auth/userinfo.profile
  • Openid
  • Run:

    Run py3 manage.py runserver with optional arg 0.0.0.0:8000 to run for production.

    Server:

    No web server is necessary if you use “screen” to run celery and Helios in the background. “bg” will not work long-term.

    Apache and nginx are both compatible with Helios. We used nginx and gunicorn for one of our website versions

    Notes:

    As of early 2021, the installation instructions for Helios are missing the celery command above. The steps above are what we use to set up our helios testing servers.