OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
|8 hours ago|
|api-ref||1 year ago|
|common||1 year ago|
|config-generator||2 months ago|
|contrib||1 year ago|
|devstack||1 week ago|
|doc||3 months ago|
|docker||1 day ago|
|docs||2 weeks ago|
|etc||10 months ago|
|java||7 months ago|
|monasca_api||1 week ago|
|perf||1 year ago|
|playbooks||1 month ago|
|releasenotes||1 week ago|
|tools||1 year ago|
|.coveragerc||2 years ago|
|.gitignore||1 year ago|
|.gitreview||8 hours ago|
|.stestr.conf||1 year ago|
|.testr.conf||2 years ago|
|.zuul.yaml||8 hours ago|
|LICENSE||5 years ago|
|README.rst||1 month ago|
|babel.cfg||4 years ago|
|bindep.txt||1 year ago|
|lower-constraints.txt||4 months ago|
|pom.xml||1 year ago|
|requirements.txt||5 months ago|
|run_maven.sh||3 years ago|
|setup.cfg||5 days ago|
|setup.py||2 years ago|
|test-requirements.txt||9 months ago|
|tox.ini||3 months ago|
monasca-api is a RESTful API server that is designed with a layered architecture.
The full API Specification can be found in docs/monasca-api-spec.md
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/api-config.ini /etc/monasca/monasca-api.conf /etc/monasca/api-logging.conf
Once the configuration files 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/api-config.ini Running the server as daemons $ gunicorn -k eventlet --worker-connections=2000 --backlog=1000 --paste /etc/monasca/api-config.ini -D
To check if the code follows python coding style, run the following command from the root directory of this project
$ tox -e pep8
To run all the unit test cases, run the following command from the root directory of this project
$ tox -e py27
To start the server using Apache: create a modwsgi file, create a modwsgi configuration file, and enable the wsgi module in Apache.
The modwsgi configuration file may look something like this, and the site will need to be enabled:
Listen 8070 <VirtualHost *:8070> WSGIDaemonProcess monasca-api processes=4 threads=1 socket-timeout=120 user=mon-api group=monasca python-path=/usr/local/lib/python2.7/site-packages WSGIProcessGroup monasca-api WSGIApplicationGroup monasca-api WSGIScriptAlias / /usr/local/lib/python2.7/site-packages/monasca_api/api/wsgi/monasca_api.py WSGIPassAuthorization On LogLevel info ErrorLog /var/log/monasca-api/wsgi.log CustomLog /var/log/monasca-api/wsgi-access.log combined <Directory /usr/local/lib/python2.7/site-packages/monasca_api> Require all granted </Directory> SetEnv no-gzip 1 </VirtualHost>
The wsgi file may look something like this:
Details on usage can be found here
WARNING: The Java implementation of Monasca API is DEPRECATED and will be removed in future release.
Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.