- Basic version
- Python Server
- DB Migration commans
- Import / Export worker
- Seed
- Suggested Dev Setup
- Building docker image for use in oice/kubernetes
- Swagger UI with modmod.yaml
Oice-server(modmod) project consist of
- Python3.4+
- Assume Maria10.0 +
- Redis3.0+
- nodejs v0.12+
- pip 1.5.6+ (Other version specific at requirements.pip)
- Assuming
unzipandzipis avalible. (nots ubuntu is not installed by default)
How to run the python
cd <directory containing this file>$VENV/bin/python setup.py develop$VENV/bin/pserve development.ini
-
Create a migration:
alembic -c development.ini revision -m "new table" -
Running migrations:
alembic [-c development.ini] upgrade head -
Downgrade migration:
alembic [-c development.ini] downgrade -1
In Import/Export workflow, you will need to open the pubsub server to get notified with the long runing process.
-
Run the worker
rqworker -
Run Redis, refs: http://redis.io/download
redis-server -
Run Socket.io
Install the deps
(socket.io) npm installnode socket.io/server.js
- After running setup.py
- Add default tags to database
initialize_modmod_db - Add dummy projects and ks files
modmod_load_dummy
- Please refer to oice repository README.md
$ ./build.shpserve image will be tagged as modmod
socket.io image will be tagged as modmod-socket
The set up will copy swagger/yaml/modmod.yaml to docker image. Swagger UI is hosted on localhost:9876.
To create the docker image of Swagger UI, in swagger/, run:
./build.shTo start Swagger UI, in ./swagger/, run:
./start.shTo stop Swagger UI, in ./swagger/, run:
./stop.sh