Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This guide is written for Ubuntu 18.04 and python3.

NEO4J database

The official neo4j installation guide for version 3.x is the reference for this part.

...

You need to configure djangosaml2 to use local metadata, and you will have to add the meta-dataupdater to cron, preferably by creating a cron.d file as that runs it as the ni user. Once an hour is reasonable, once a day can be ok, once a week might be tiresome when a cert is rolled.

Upgrade from NI 3 to 3.3

There is not a lot that needs to be done when updating from 3 to 3.3, mostly you need to update your `.env` config. 

Customising look and feel

It is now possible to change some of the NI styling.

In .env you can set the following:

Code Block
# Displayed where it would normally say NORDUnet (e.g. on the front page)
BRAND=NORDUnet


# Displayed just above the NOCLook text in the logo
LOGO_SUBTEXT=DEV
# Change the logo color
LOGO_COLOR='#e67528'


# Change link colors
LINK_COLOR='#e67528'
LINK_HOVER='#71360a'

Upgrade from NI 3 to 3.3

There is not a lot that needs to be done when updating from 3 to 3.3, mostly you need to update your `.env` config. 

After updating .env follow the General Upgrade NI guide, only be After updating .env follow the General Upgrade NI guide, only be aware that you should nuke your `urls.py`. 

...

Code Block
# Neo4j settings
NEO4J_RESOURCE_URI=bolt://localhost:7687
NEO4J_MAX_DATA_AGE=24
NEO4J_MAX_POOL_SIZE=50
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=<%= $neo4j_password %>

# Report settings
REPORTS_TO=<%= $reports_to %>
# Optional CC and BCC and EXTRA_REPORT_TO
REPORTS_CC=<%= $reports_cc %>
REPORTS_BCC=<%= $reports_bcc %>
EXTRA_REPORT_TO=<%= $extra_reports_to %>


SECURITY_REPORTS_TO=<%= $security_reports_to %>

# Database settings
DB_ENGINE=django.db.backends.postgresql_psycopg2
DB_NAME=norduni
DB_USER=ni
DB_PASSWORD=<%= $postgres_password %>
DB_HOST=localhost
DB_PORT=5432

# Cache settings
CACHE_BACKEND=django.core.cache.backends.filebased.FileBasedCache
CACHE_LOCATION=/tmp/django_cache

# General settings
ALLOWED_HOSTS=<%= $server_name %> <%= $allowed_hosts %> localhost


# If using sentry
SENTRY_DSN=<%= $sentry_dsn %>

DEFAULT_FROM_EMAIL=django@<%= $server_name %>
EMAIL_HOST=localhost
#EMAIL_HOST_PASSWORD=
#EMAIL_HOST_USER=
#EMAIL_PORT=

# Secret key
SECRET_KEY=<%= $secret_key %>

# Google apis key
GOOGLE_MAPS_API_KEY=<%= $google_api_key %>

# Login
# if $saml_enabled:
LOGIN_URL=/saml2/login/?idp=https://idp.nordu.net/idp/shibboleth
SAML_ENABLED=true


# if $django_login_disabled
DJANGO_LOGIN_DISABLED=true


# Branding
BRAND=SUNET
LOGO_SUBTEXT=SUNET
LOGO_COLOR='#e67528'
LINK_COLOR='#e67528'
LINK_HOVER='#71360a'