You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Setting up NOCLook

NOCLook is the main GUI component, a django webapp that allows users to access the data stored in NI, it is also often what people refer to when they say NI.

Installing NOCLook

Before installing NOCLook you need to install the required system libraries

$ sudo apt-get install git python-pip libpq-dev
$ sudo pip install -U pip
$ sudo pip install virtualenv
$ sudo adduser --disabled-password --home /var/opt/norduni ni

 Now you are ready to install NOCLook, start by changing to the ni user.

$ sudo -u ni -i
$ pwd 
/var/opt/norduni
$ git clone git://git.nordu.net/norduni.git
# Create virtual env
$ virtualenv norduni_environment
# Activate virtual env
$ . norduni_environment/bin/activate
# Install python dependencies
$ pip install -r norduni/requirements/prod.txt

Configure NOCLook

$ cd norduni/src/niweb/
$ cp dotenv .env
$ vi .env

You need to setup the following settings:

NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=
REPORTS_TO=
DB_PASSWORD=
DEFAULT_FROM_EMAIL=
EMAIL_HOST=
SECRET_KEY=

The secret key should be at least 50 chars long consisting of the following characters: 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'

You can use the following snippit to gennerate such a string locally:

$ python -c "import random; print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789@#$%^&*(-_=+)') for i in range(50)]))"
  • No labels