monasca-log-api/monasca_log_api
Tomasz Trębski 33e9d7aaa3 Security update for monasca-log-api
Created middleware to authorize access
to log api. Only configured roles (i.e. default) can access
the api. Also middleware detect if the request would
come from monasca-log-agent.

Summary:
- middleware added (logic + tests)
- extended documentation

Additionaly:
- added better tox processing
- added minimum coverage

Change-Id: Ic848bfa3a8552887661f8223078efe3a4bca5c37
2015-12-17 11:27:12 +01:00
..
api Security update for monasca-log-api 2015-12-17 11:27:12 +01:00
middleware Security update for monasca-log-api 2015-12-17 11:27:12 +01:00
tests Security update for monasca-log-api 2015-12-17 11:27:12 +01:00
v2 Validating message size 2015-12-10 12:29:58 +01:00
.gitignore monasca-log-api python 2015-10-08 10:38:12 +02:00
README.md Documentation update 2015-12-08 11:37:23 +01:00
__init__.py monasca-log-api python 2015-10-08 10:38:12 +02:00
server.py Syncing API version 2015-12-04 06:42:58 +00:00

README.md

Monasca-log-api Python

Installation

To install the python api implementation, git clone the source and run the following command::

    sudo python setup.py install

If it installs successfully, you will need to make changes to the following two files to reflect your system settings, especially where kafka server is located::

    /etc/monasca/log-api-config.conf
    /etc/monasca/log-api-config.ini

Once the configurations are modified to match your environment, you can start up the server by following the following instructions.

To start the server, run the following command:

Running the server in foreground mode

    gunicorn -k eventlet --worker-connections=2000 --backlog=1000
             --paste /etc/monasca/log-api.ini

Running the server as daemons

    gunicorn -k eventlet --worker-connections=2000 --backlog=1000
             --paste /etc/monasca/log-api.ini -D

Testing

PEP8 guidelines

To check if the code follows python coding style, run the following command from the root directory of this project:

    tox -e pep8

Testing

To run all the unit test cases, run the following command from the root directory of this project:

    tox -e py27   (or -e py26, -e py33)

Coverage

To generate coverage results, run the following command from the root directory of this project:

    tox -e cover

Building

To build an installable package, run the following command from the root directory of this project:

  python setup.py sdist

Documentation

To generate documentation, run the following command from the root directory of this project:

make html

That will create documentation under build folder relative to root of the project.