Add relay support, add ql support

This commit is contained in:
Audrius Butkevicius
2015-07-21 23:56:27 +01:00
parent 860fbe48dd
commit 4d9ca822a7
7 changed files with 366 additions and 139 deletions

View File

@@ -12,17 +12,29 @@ from the build server.
Usage
-----
The discovery server requires a postgresql backend server. You will need
to create a database and a user with permissions to create tables in it.
Set the database URL in the environment variable `DISCOSRV_DB` before
starting discosrv.
The discovery server supports `ql` and `postgres` backends.
Specify the backend via `-db-backend` and the database DSN via `-db-dsn`.
By default it will use in-memory `ql` backend. If you wish to persist the
information on disk between restarts in `ql`, specify a file DSN:
```bash
$ export DISCOSRV_DB="postgres://user:password@localhost/databasename"
$ discosrv
$ discosrv -db-dsn="file://var/run/discosrv.db"
```
The appropriate tables and indexes will be created at first startup. If
it doesn't exit with an error, you're fine.
For `postgres`, you will need to create a database and a user with permissions
to create tables in it, then start the discosrv as follows:
```bash
$ export DISCOSRV_DB_DSN="postgres://user:password@localhost/databasename"
$ discosrv -db-backend="postgres"
```
You can pass the DSN as command line option, but the value what you pass in will
be visible in most process managers, potentially exposing the database password
to other users.
In all cases, the appropriate tables and indexes will be created at first
startup. If it doesn't exit with an error, you're fine.
See `discosrv -help` for other options.