File: installation.rst

package info (click to toggle)
cloudkitty-dashboard 21.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,788 kB
  • sloc: javascript: 14,055; python: 1,990; makefile: 26
file content (76 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
============
Installation
============

Retrieve and install CloudKitty dashboard:

::

    git clone https://opendev.org/openstack/cloudkitty-dashboard
    cd cloudkitty-dashboard
    python setup.py install


Find where the python packages are installed:

::

    PY_PACKAGES_PATH=`pip --version | cut -d' ' -f4`


Then add the additional settings file to the horizon settings or installation.
Depending on your setup, you might need to add it to ``/usr/share`` or directly
in the horizon python package:

::

    # If horizon is installed by packages:
    ln -s $PY_PACKAGES_PATH/cloudkittydashboard/enabled/_[0-9]*.py \
    /usr/share/openstack-dashboard/openstack_dashboard/enabled/

    # Directly from sources:
    ln -s $PY_PACKAGES_PATH/cloudkittydashboard/enabled/_[0-9]*.py \
    $PY_PACKAGES_PATH/openstack_dashboard/enabled/


Restart the web server hosting Horizon.

For more detailed information about CloudKitty installation check out the
`installation section`_ of the documentation.


.. _installation section: https://cloudkitty.readthedocs.org/en/latest/installation.html


Configuration
=============

To configure CloudKitty dashboard, add variables to your Horizon settings
file.
For more details about how to add variables to Horizon settings checkout the
`Horizon Settings Reference documentation`_.


.. _Horizon Settings Reference documentation: https://docs.openstack.org/horizon/latest/configuration/settings.html

Rate Pre/Postfix
----------------

You can configure pre/postfix to rate vaules shown at the dashboard.

Here's example of setting rate currency to US Dollar.

.. code-block:: python

   # You can choose to have prefix or postfix or both.
   # Prefix and postfix are not mutally exclusive.
   OPENSTACK_CLOUDKITTY_RATE_PREFIX = '$'
   OPENSTACK_CLOUDKITTY_RATE_POSTFIX = 'USD'

Some symbols (Such as Non-ASCII) might require to use unicode value directly.

.. code-block:: python

   # British Pound
   OPENSTACK_CLOUDKITTY_RATE_PREFIX = '\xA3'
   OPENSTACK_CLOUDKITTY_RATE_POSTFIX = 'GBP'