resource-management
resource management tooling & experiments
running locally
this is a quick setup version for running standalone on your local machine (will be merged into the full docs later)
database setup
- set the value of
sqlalchemy.url
inalembic.ini
to point to a writeable file, e.g.sqlalchemy.url = sqlite:////absolute/path/to/foo.db
- create the database by running the alembic
migration from the top-level directory
alembic upgrade head
running the app
- create a settings filename
(see
config-example.json
for an example) ... something like:{ "db": "sqlite:////tmp/test.db", "ssh": { "username": "ro-username", "private-key": "/absolute/path/to/private/key" } }
- run the app like this
(
app.py
starts the server on port 44444):SETTINGS_FILENAME=/absolute/path/to/config.json python -m resource_management.app
examples
- get the version
curl http://localhost:44444/api/version
- load interfaces from a router
curl -X POST http://localhost:44444/api/initialize-router/router.host.name
- view the docs by loading
http://localhost:44444/docs
in your browser (there are requests for reserving lags and physical lag interfaces)