- Requirements: any supported version of python and pip (optionally pipenv).
- Clone the repo.
- (OPTIONAL) If not using pipenv, set up a virtual environment using virtualenv.
pip install -r requirements.txt
ORpipenv install -r requirements.txt
.- Create a settings.py file inside the openwisp_monitor directory.
- Run migrations with
python manage.py migrate
. - Collect static files with
python manage.py collectstatic
. - Run the development server with
python manage.py runserver 0.0.0.0:8080
.
You can use example_settings.py
as a template to create your own settings file.
Here are some settings you will probably need to change:
- SECRET_KEY : You can use
generate_secret_key.py
to generate a secret key. - ALLOWED_HOSTS: See the relevant paragraph on the django docs [https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts].
- DATABASES: See the relevant paragraph on the django docs [https://docs.djangoproject.com/en/1.10/ref/settings/#databases].
- TIME_ZONE: If using collectd, make sure there is no timezone mismatch.
- NETJSONCONFIG_SHARED_SECRET: Choose a password arbitrarily. You will need to use this shared secret when attempting to register a new device with the server.
- CAS_SERVER_URL: A URL point to the CAS server you will be using.
- AFFILIATION_FIELD: The name of an attribute returned by the CAS server. This field will be used to determine wether two users belong to the same affiliation.
- COLLECTD_RRD_DIR: A path to the directory used by collectd to store RRD file. Ignore this if you are not using collectd.