Skip to content
Snippets Groups Projects
Commit e5436ef8 authored by JORGE SASIAIN's avatar JORGE SASIAIN
Browse files

Update README.md

parent 8804b6e1
No related branches found
No related tags found
No related merge requests found
...@@ -10,21 +10,9 @@ resource management tooling & experiments ...@@ -10,21 +10,9 @@ resource management tooling & experiments
standalone on your local machine (will be standalone on your local machine (will be
merged into the full docs later)* merged into the full docs later)*
### database setup * install dependencies: run ``pip install -e .`` and ``pip install -r requirements.txt``
* set the value of `sqlalchemy.url`
in `alembic.ini` to point to a writeable file, e.g.
```python
sqlalchemy.url = sqlite:////absolute/path/to/foo.db
```
* create the database by running the alembic
migration from the top-level directory
```bash
alembic upgrade head
```
### running the app
### configuration
* create a settings filename * create a settings filename
(see `config-example.json` for an example) ... something like: (see `config-example.json` for an example) ... something like:
...@@ -37,8 +25,25 @@ merged into the full docs later)* ...@@ -37,8 +25,25 @@ merged into the full docs later)*
} }
} }
``` ```
* In the config file, set the value of `db` to point to a writeable file, e.g. ``sqlite:////absolute/path/to/foo.db``
### database setup
* export `SETTINGS_FILENAME`, e.g.
```bash
SETTINGS_FILENAME=/absolute/path/to/config.json
```
* create the database by running the alembic
migration from the top-level directory
```bash
alembic upgrade head
```
### running the app
* run the app like this * run the app like this
(`app.py` starts the server on port 44444): (`app.py` starts the server on port 44445):
```bash ```bash
SETTINGS_FILENAME=/absolute/path/to/config.json python -m resource_management.app SETTINGS_FILENAME=/absolute/path/to/config.json python -m resource_management.app
``` ```
...@@ -47,11 +52,11 @@ merged into the full docs later)* ...@@ -47,11 +52,11 @@ merged into the full docs later)*
* get the version * get the version
```bash ```bash
curl http://localhost:44444/api/version curl http://localhost:44445/api/version
``` ```
* load interfaces from a router * load interfaces from a router
```bash ```bash
curl -X POST http://localhost:44444/api/initialize-router/router.host.name curl -X POST http://localhost:44445/api/initialize-router/router.host.name
``` ```
* view the docs by loading `http://localhost:44444/docs` * view the docs by loading `http://localhost:44444/docs`
in your browser (there are requests for reserving in your browser (there are requests for reserving
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment