Skip to content

Commit 349c6a4

Browse files
committed
Merge pull request #18 from enolfc/docs
Doc update
2 parents d9a6c46 + 68a81f3 commit 349c6a4

File tree

4 files changed

+88
-15
lines changed

4 files changed

+88
-15
lines changed

doc/source/configuration.rst

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
Configuration
1717
*************
1818

19-
Caso configuration
19+
cASO configuration
2020
==================
2121

22-
caso uses a config file (default at ``/etc/caso/caso.conf``) with several
22+
``cASO`` uses a config file (default at ``/etc/caso/caso.conf``) with several
2323
sections. A sample file is available at ``etc/caso/caso.conf.sample``.
2424

2525
``[DEFAULT]`` section
2626
---------------------
2727

28-
The ``[DEFAULT]`` section configures the basic behavior of caso. The sample
28+
The ``[DEFAULT]`` section configures the basic behavior of ``cASO``. The sample
2929
config file (``/etc/caso/caso.conf.sample``) includes a description
3030
of every option. You should check at least the following options:
3131

@@ -45,16 +45,38 @@ of every option. You should check at least the following options:
4545
-----------------------
4646

4747
This section specifies the configuration of the extractor (mainly the
48-
credentials to connect to the API. Check the following:
48+
credentials to connect to the API). Check the following:
4949

5050
* ``user`` (default: ``accounting``), name of the user. This user needs proper
5151
permission to query the API for the tenant usages.
5252
* ``password`` (default: None), password of the user.
5353
* ``endpoint`` (default: None), keystone endpoint to authenticate with.
5454
* ``mapping_file`` (default: ``/etc/caso/voms.json``). File containing the
5555
mapping from VOs to local tenants as configured in Keystone-VOMS. If
56-
you are running caso on keystone host, it likely
56+
you are running ``cASO`` on keystone host, it likely
5757
is ``/etc/keystone/voms.json``. Otherwise, you have to sync this file.
58+
* ``insecure`` (default: ``False``), wether to check or not the server's
59+
certificate.
60+
61+
.. important::
62+
Your should not use ``insecure=True`` in production! If you get a SSL
63+
error ( ``CERTIFICATE_VERIFY_FAILED``), this is probably due to the fact
64+
that the request module CA bundle does not contain the CA of your server.
65+
66+
If you are using the request module of your distribution package, it is
67+
normally patched to use the system's default CA bundle
68+
(``/etc/ssl/certs/ca-certificates.crt`` from the ``ca-certificates``
69+
package on Debian systems and ``/etc/pki/tls/certs/ca-bundle.crt`` from the
70+
``ca-certificates``on RH systems). Check the packages documentation to add a
71+
new CA to those bundles.
72+
73+
If you are not installing request through the distribution packages (e.g.
74+
via pip), it uses its own vendorized CA bundle, located in the distribution
75+
directory (i.e. requests/cacert.pem). It should be enough to append the
76+
correct certificates to the end of the cacert.pem file. In a virtualenv,
77+
the bundle should be located at
78+
``$VIRTUAL_ENV/lib/python2.7/site-packages/requests/``
79+
5880

5981
``[ssm]`` section
6082
-----------------
@@ -81,7 +103,7 @@ OpenStack Configuration
81103
The user configured in the previous section has to be a member of each of the
82104
tenants (another option is to convert that user in an administrator, but the
83105
former option is a safer approach) for which it is extracting the accounting.
84-
Otherwise, ``caso`` will not be able to get the usages and will fail::
106+
Otherwise, ``cASO`` will not be able to get the usages and will fail::
85107

86108
keystone role-create --name accounting
87109
keystone user-create --name accounting --pass <password>

doc/source/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
under the License.
1515

1616
=======================================
17-
caso, an OpenStack Accounting extractor
17+
cASO, an OpenStack Accounting extractor
1818
=======================================
1919

20-
caso is a pluggable extractor of `Cloud Accounting Usage Records
20+
``cASO`` is a pluggable extractor of `Cloud Accounting Usage Records
2121
<https://wiki.egi.eu/wiki/Fedcloud-tf:WorkGroups:Scenario4#Cloud_Accounting_Usage_Record>`_
22-
from an OpenStack installation. caso gets usage information from nova or
22+
from an OpenStack installation. ``cASO`` gets usage information from nova or
2323
ceilometer APIs and can generate valid output for `Apel SSM
2424
<https://wiki.egi.eu/wiki/APEL>`_ or `logstash <http://logstash.net/>`_.
2525

doc/source/installation.rst

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Installation
2222
Pre-requisites
2323
--------------
2424

25-
If you are planning to use caso for generating accounting records for EGI,
25+
If you are planning to use ``cASO`` for generating accounting records for EGI,
2626
you will need a valid APEL/SSM configuration. Follow the documentation
2727
available at the `EGI FedCloud wiki
2828
<https://wiki.egi.eu/wiki/Fedcloud-tf:WorkGroups:Scenario4#Publishing_Records>`_
@@ -38,3 +38,41 @@ Or, if you have virtualenvwrapper installed::
3838

3939
$ mkvirtualenv caso
4040
$ pip install caso
41+
42+
CentOS 6
43+
********
44+
45+
On CentOS 6, you can use Software Collections to install Python 2.7::
46+
47+
$ yum -y install centos-release-SCL
48+
$ yum -y install python27
49+
50+
There are also some dependencies of the packages used by ``cASO`` that need to
51+
be installed (gcc, libffi-devel adn openssl-devel)::
52+
53+
$ yum -y install gcc libffi-devel openssl-devel
54+
55+
You can then install pip for that version of Python and use that to install
56+
``cASO``::
57+
58+
$ scl enable python27 bash
59+
$ easy_install-2.7 pip
60+
$ pip install caso
61+
$ exit # this terminates bash with the SCL python2.7
62+
63+
In this case you can later on use ``caso-extract`` with the following command
64+
line::
65+
66+
$ scl enable python27 caso-extract
67+
68+
Alternatively, if you want to use a virtualenv::
69+
70+
$ scl enable python27 bash
71+
$ virtualenv caso
72+
$ . caso/bin/activate
73+
$ pip install caso
74+
$ exit # this terminates bash with the SCL python2.7
75+
76+
Running from the virtualenv::
77+
78+
$ scl enable python27 caso/bin/caso-extract

doc/source/usage.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ Usage
2020
command line
2121
------------
2222

23-
caso provides the ``caso-extract`` command to generate new records from your OpenStack deployment.
23+
``cASO`` provides the ``caso-extract`` command to generate new records from
24+
your OpenStack deployment.
2425
``caso-extract -h`` will show a complete list of available arguments.
2526

26-
Use the ``--extract_from`` argument to specify the date from when the records should be extracted. If no
27-
value is set, then caso will extract the records from the last run. If equal to "None", then extract
28-
records from the beggining of time. If not time zone is specified, UTC will be used.
27+
Use the ``--extract_from`` argument to specify the date from when the records
28+
should be extracted. If no value is set, then ``cASO`` will extract the records
29+
from the last run. If equal to "None", then extract records from the beggining
30+
of time. If not time zone is specified, UTC will be used.
2931

3032
.. important::
3133
If you are running an OpenStack Nova version lower than Kilo there is a
@@ -41,6 +43,17 @@ records from the beggining of time. If not time zone is specified, UTC will be
4143
Running as a cron job
4244
---------------------
4345

44-
The best way of running ``caso`` is via a cron job like the following::
46+
The best way of running ``cASO`` is via a cron job like the following::
4547

4648
10 * * * * caso-extract
49+
50+
Migration from OSSSM
51+
--------------------
52+
53+
If you had a previous installation of osssm, you can migrate to ``cASO``
54+
following these steps:
55+
56+
#. Remove the previous osssm installation (e.g. remove apel-ssm-openstack rpm).
57+
#. Remove any cron jobs related to ``osssm.extract`` or ``osssm.push``, a single
58+
cron job as described above is enough. You should keep the cron job that executes
59+
``ssmsend``, this is still needed to send the records to the accounting database.

0 commit comments

Comments
 (0)