Overseer requires Python 3.8. Pipenv is recommended for installing Overseer.
$ mkdir .venv
$ pipenv install
Overseer reads its configuration from environment variables.
See sample.env
for guidance.
You can set the variables freely, the only thing to keep in mind is that you will need the public key of Revolori that is created during its setup.
Create a .env
file according to the template sample.env
.
Copy the public key from Revolori setup to the location of $JWT_PUBLIC_KEY
set in .env
:
$ set -a && source .env
$ cp ../revolori-sso-provider/dev_keys/ecdsa_key.pub $JWT_PUBLIC_KEY
To start the services:
$ docker-compose up -d --build
To stop the services:
$ docker-compose down
Migrating the database:
$ ./migrate-db
Running the dev server:
$ ./dev-server
Creating new database migrations:
$ ./create-db-revision "Add X column to table Y"
- Migrations are auto generated from the live database.
- Optionally, delete the database and run the
migrate-db
script to make sure that the live schema hasn't been altered. The automatically generated migration script will be useless if the database schema has been altered since the last migration. - Migrations scripts cannot be automatically generated for all schema changes.
Make sure to set up the environmental variables. Then run:
$ python -m pytest ./overseer
These tests are designed to test a deployed system. Run:
$ pytest ./system_test [-P PROTOCOL] -E OVERSEER_ENDPOINT [-T TIMEOUT]
Parameters:
- OVERSEER_ENDPOINT: the server endpoint root of the to-be-tested Overseer
- PROTOCOL: the connection protocol (default:
https
) - TIMEOUT: how long to wait for a response from the server (default: 3)