- 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
unzip
andzip
is 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 install
node 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.sh
pserve 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.sh
To start Swagger UI, in ./swagger/
, run:
./start.sh
To stop Swagger UI, in ./swagger/
, run:
./stop.sh