update pipeline configuration

Change-Id: I841c8c011935d2ad64aadceb8f0fd0c7184e7dbc
This commit is contained in:
Alvaro Lopez Garcia 2015-11-24 12:46:45 +01:00
parent 586326b6af
commit 2281be1123
6 changed files with 66 additions and 34 deletions

View File

@ -1,25 +1,53 @@
Configuration
=============
ooi configuration
*****************
ooi needs to be enabled in the OpenStack Compute configuration file. Append
``ooi`` to your ``enabled_apis`` option::
enabled_apis=ec2,osapi_compute,metadata,ooi
Moreover, the following options are available:
* ``ooi_listen``: IP address where ooi will listen. Defaults to ``0.0.0.0``
* ``ooi_listen_port``: Port ooi will bind to. Defaults to ``8787``.
* ``ooi_workers``: Number of workers to spawn, by default it is set to the
number of CPUs in the node.
Paste Configuration
*******************
TL;DR.
------
Add the corresponding Paste configuration according to your OpenStack version
from :ref:`pipeline-examples` into your Paste configuration file
(usually ``/etc/nova/api-paste.ini``).
Detailed instructions
---------------------
Once installed it is needed to add it to your OpenStack installation. Edit your
``/etc/nova/api-paste.ini``.
First it is needed to add a the OCCI filter like this::
First it is needed to add the OCCI filter like this::
[filter:occi]
paste.filter_factory = ooi.wsgi:OCCIMiddleware.factory
openstack_version = /v2
``openstack_version`` can be configured to any of the supported OpenStack API
versions, as indicated in Table :ref:`api-versions`. If it is not configured, by
default it will take the ``/v2.1`` value.
versions, as indicated in Table :ref:`api-versions`. If it is not configured,
by default it will take the ``/v2.1`` value.
.. _api-versions:
.. table:: Supported OpenStack API versions
===================== ===================== =============================================
OpenStack API version ``openstack_version`` corresponding OpenStack ``composite`` section
OpenStack API version ``openstack_version`` reference OpenStack ``composite`` section
===================== ===================== =============================================
v2 ``/v2`` ``[composite:openstack_compute_api_v2]``
v2.1 ``/v2.1`` ``[composite:openstack_compute_api_v21]``
@ -38,14 +66,20 @@ above where ``/v2`` has been configured, we need to duplicate the
keystone = compute_req_id faultwrap sizelimit occi authtoken keystonecontext ratelimit occi osapi_compute_app_v2
keystone_nolimit = compute_req_id faultwrap sizelimit authtoken keystonecontext occi osapi_compute_app_v2
The last step is to add it to the ``[composite:osapi_compute]`` section::
The last step regarding the API configuration is to add it to create the
``[composite:ooi]`` section::
[composite:osapi_compute]
# (...)
use = call:nova.api.openstack.urlmap:urlmap_factory
/occi1.1: occi_api_11
You can find more detailed examples regarding the pipeline configuration in the
:ref:`pipeline-examples` section.
Finally, you need to enable it in the OpenStack nova configuration, so that it
is loaded properly. Add ``ooi`` to the ``enabled_apis`` option in the
configuration file and adapt the port if needed, via the ``ooi_listen_port``
(by default it listens in the ``8787`` port)::
enabled_apis=ec2,osapi_compute,metadata,ooi
ooi_listen_port=8787
If everything is OK, after rebooting the ``nova-api`` service you should be able
to access your OCCI endpoint at::
@ -53,5 +87,5 @@ to access your OCCI endpoint at::
$ nova credentials
# Grab the token
$ export KID=<token>
$ curl -H "x-auth-token: $KID" http://localhost:8774/occi1.1/-/
$ curl -H "x-auth-token: $KID" http://localhost:8787/occi1.1/-/

View File

@ -1,6 +1,9 @@
User documentation
==================
Please, read the following documentation if you intend to deploy ooi in your
infrastructure.
.. toctree::
:maxdepth: 2

View File

@ -1,11 +1,17 @@
Installation
============
Get the latest source code::
Installation via packages
*************************
$ git clone https://github.com/openstack/ooi.git
TBD
Install it::
Instalation from pip
********************
$ cd ooi
$ pip install .
ooi can be installed via pip from OpenStack Kilo onwards. If you are running
Juno, the code will still work, but there are some dependencies that may be in
conflict with the existing Python modules in your system, as long as missing
dependencies (``oslo.log`` is not available in Juno)::
$ pip install ooi

View File

@ -5,10 +5,7 @@ Pipeline examples
For your convenience, find below some example pipelines to be used with the
corresponding OpenStack Compute version. These are to be **added** into your
``/etc/nova/api-paste.ini`` configuration file. Take into account that you do
not have to duplicate the ``[composite:osapi_compute]`` section, but just add
the OCCI relevant line. These are just examples, so take into account that
your pipeline may actually differ.
``/etc/nova/api-paste.ini`` configuration file.
.. include:: juno.rst
.. include:: kilo.rst

View File

@ -3,20 +3,17 @@ Juno (2014.2)
.. code:: ini
[composite:osapi_compute]
[composite:ooi]
use = call:nova.api.openstack.urlmap:urlmap_factory
/: oscomputeversions
/v1.1: openstack_compute_api_v2
/v2: openstack_compute_api_v2
/v2.1: openstack_compute_api_v21
/v3: openstack_compute_api_v3
/occi1.1: occi_api_11
[filter:occi]
paste.filter_factory = ooi.wsgi:OCCIMiddleware.factory
openstack_version = /v2.1
openstack_version = /v2.0
[composite:occi_api_11]
use = call:nova.api.auth:pipeline_factory_v21
noauth = compute_req_id faultwrap sizelimit noauth occi osapi_compute_app_v21
keystone = compute_req_id faultwrap sizelimit authtoken keystonecontext occi osapi_compute_app_v21
[composite:openstack_compute_api_v2]
use = call:nova.api.auth:pipeline_factory
noauth = compute_req_id faultwrap sizelimit noauth ratelimit occi osapi_compute_app_v2
keystone = compute_req_id faultwrap sizelimit authtoken keystonecontext ratelimit occi osapi_compute_app_v2
keystone_nolimit = compute_req_id faultwrap sizelimit authtoken keystonecontext occi osapi_compute_app_v2

View File

@ -3,13 +3,8 @@ Kilo (2015.1)
.. code:: ini
[composite:osapi_compute]
[composite:ooi]
use = call:nova.api.openstack.urlmap:urlmap_factory
/: oscomputeversions
/v1.1: openstack_compute_api_v2
/v2: openstack_compute_api_v2
/v2.1: openstack_compute_api_v21
/v3: openstack_compute_api_v3
/occi1.1: occi_api_11
[filter:occi]