...
Code Block |
---|
# In norduni directory as the NI user $ sudo -u ni -i $ cd norduni $ git stash $ git pull origin master $ git stash apply $ rm -r src/niweb/norduniclient # Delete old virtualenv and create a new $ cd .. $ rm -r norduni_environment $ virtualenv norduni_environment $ . norduni_environment/bin/activate $ pip install -U pip $ pip install -U -r norduni/requirements/prod.txt # If running python 2.7 also run $ pip install -r norduni/requirements/py2.txt # update norduni/src/niweb/.env to have: NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your_awesome_password NEO4J_RESOURCE_URI=bolt://localhost:7687_password NEO4J_RESOURCE_URI=bolt://localhost:7687 # If you have saml enabled you need to add the following to norduni/src/niweb/apps/saml2auth/config.py 'encryption_keypairs': [{ 'key_file': path.join(BASEDIR, 'sp-key.pem'), # private part 'cert_file': path.join(BASEDIR, 'sp-cert.pem'), # public part }], # finally run migrate and collect statics $ python norduni/src/niweb/manage.py migrate --settings=niweb.settings.prod $ python norduni/src/niweb/manage.py collectstatic --settings=niweb.settings.prod |
Then you can restart uwsgi.
...
- `AttributeError: 'NoneType' object has no attribute 'session'` is caused by wrong credentials (or missing configuration there of)
- `ImportError: cannot import name contextmanager` or `ImportError: cannot import name IntegrityError` - you need to delete `src/niweb/norduniclient`
- `ImportError: No module named django.core.exceptions` (you need to source your virtual environment)
- `ImportError: No module named neo4j.v1.exceptions` - Problems with virtualenv installed dependencies, delete your virtualenv and install again
- `neo4j.exceptions.AuthError: The client is unauthorized due to authentication failure.` - your password contains some characters that got mangled, e.g. # or @, remove