3.3 KiB
3.3 KiB
Welcome to Portas, the Keero REST API Service!
Portas is a project that provides access to engine via API.
This document describes Portas for contributors of the project, and assumes that you are already familiar with Portas from an end-user perspective.
This documentation is generated by the Sphinx toolkit and lives in the source tree.
Installation Guide
Install
Check out sources to some directory (<home>/keero):
user@work:~/$ git clone ssh://<user>@gerrit.mirantis.com:29418/keero/keero.git
Install Portas:
user@work:~/$ cd keero/portas && sudo python setup.py install
Configure
Open first configuration file for editing:
user@work:~/$ cd keero/portas/etc && nano portas-api.conf
Configure according to you environment (please note rabbitmq section):
[DEFAULT] # Show more verbose log output (sets INFO log level output) verbose = True # Show debugging output in logs (sets DEBUG log level output) debug = True # Address to bind the server to bind_host = 0.0.0.0 # Port the bind the server to bind_port = 8082 # Log to this file. Make sure the user running skeleton-api has # permissions to write to this file! log_file = /tmp/portas-api.log #A valid SQLAlchemy connection string for the metadata database sql_connection = sqlite:///portas.sqlite [reports] results_exchange = task-results results_queue = task-results reports_exchange = task-reports reports_queue = task-reports [rabbitmq] host = localhost port = 5672 virtual_host = keero login = keero password = keero
Open second configuration file for editing:
smelikyan@work:~/cd keero/portas/etc && nano portas-api.conf
Configure according to you environment (please note filter:authtoken section):
[pipeline:portas-api] pipeline = authtoken context apiv1app [app:apiv1app] paste.app_factory = portas.api.v1.router:API.factory [filter:context] paste.filter_factory = portas.api.middleware.context:ContextMiddleware.factory [filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory auth_host = localhost auth_port = 35357 auth_protocol = http admin_tenant_name = admin admin_user = admin admin_password = password signing_dir = /tmp/keystone-signing-portas
Run
Run Portas and supply valid configuration file:
user@work:~/$ portas-api --config-file=./keero/portas/etc/portas-api.conf
Man Pages
man/portasapi