Billing plugin for Horizon

Now nova-billing has a Django-based web interface – horizon-billing (https://github.com/griddynamics/horizon-billing).

horizon-billing is packaged to a homonymous RPM (path for RHEL: http://yum.griddynamics.net/yum/diablo/, for CentOS: http://yum.griddynamics.net/yum/diablo-centos/).

To enable it in dashboard, install the horizon_billing package and turn it
on in /etc/openstack-dashboard/local/local_settings.py:

  • add ‘horizon_billing’ to INSTALLED_APPS tuple;
  • add ‘billing’ to ‘dashboards’ key in HORIZON_CONFIG.

After installation, a new “Billing” panel is added after “Project” and “Admin”.

About these ads

9 thoughts on “Billing plugin for Horizon

  1. Boris Deschênes

    Thanks for this, your nova-billing plugin looks great, I’ve got a problem though;

    I added ‘horizon_billing’ to the INSTALLED_APPS tuple in (nova_path)/dashboard/settings.py
    I added ‘billing’ to the dashbords key in HORIZON_CONFIG in /etc/openstack-dashboard/local/local_settings.py

    With this, I see the billing tab in horizon but when I click on it it displays the page with no billing information and an error on top “Error: Unable to get usage info: Invalid service catalog service: nova_billing” and I have the same error in httpd.log. Do I have to set a catalog entry with keystone-manage?

    thanks

    Reply
  2. Leonillo

    I’m testing OpenStack starting from the DevStack installation and your plugin seems exactly what I was looking for to complete horizon, but I have some problem with the installation.
    I have ubuntu 11.10 and to install the RPM I used “alien” to convert it in a DEB package.
    The spec script seems very simple and the converted package seems installed correctly.
    I modified both the local_settings.py and settings.py and I also added the endPoint to keystone.
    Unfortunately the dashboard doesn’t load anymore and I have the following error:
    ________________
    Caught ViewDoesNotExist while rendering: Could not import horizon_billing.total.views. Error was: No module named openstackx.api.exceptions
    Request Method: GET
    Request URL: http://10.0.2.101/
    Django Version: 1.3
    Exception Type: TemplateSyntaxError
    Exception Value:
    Caught ViewDoesNotExist while rendering: Could not import horizon_billing.total.views. Error was: No module named openstackx.api.exceptions
    Exception Location: /usr/lib/pymodules/python2.7/django/core/urlresolvers.py in _get_callback, line 167
    Python Executable: /usr/bin/python
    Python Version: 2.7.2
    Python Path:
    ['/opt/stack/horizon/openstack-dashboard/dashboard/wsgi/../..',
    '/opt/stack/python-keystoneclient',
    '/usr/local/lib/python2.7/dist-packages/prettytable-0.5-py2.7.egg',
    '/opt/stack/python-novaclient',
    '/opt/stack/keystone',
    '/opt/stack/glance',
    '/opt/stack/nova',
    '/opt/stack/horizon/horizon',
    '/usr/local/lib/python2.7/dist-packages/horizon_billing-0.0.2-py2.7.egg',
    '/usr/lib/python2.7',
    '/usr/lib/python2.7/plat-linux2',
    '/usr/lib/python2.7/lib-tk',
    '/usr/lib/python2.7/lib-old',
    '/usr/lib/python2.7/lib-dynload',
    '/usr/local/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages',
    '/usr/lib/python2.7/dist-packages/PIL',
    '/usr/lib/python2.7/dist-packages/gtk-2.0',
    '/usr/lib/pymodules/python2.7',
    '/opt/stack/horizon/openstack-dashboard/dashboard']
    Server time: gio, 23 Feb 2012 17:43:07 +0100
    ________________
    Can you give me any advice on how to do a correct installation or how to fix the problem?

    Thank you for your help.

    Reply
    1. aababilov Post author

      Ciao, Leonillo!

      Sembra che devi installare `openstackx`! Questo e` un pacchetto piccolo. E poi fai nova-api riavviare.

      Buon pro ti faccia!

      Reply
  3. guisantogui

    Hello aababilov, i want to congratulate you by the nice manual, but i don’t got this! :(

    I’ve executed the setup using “sudo python setup.py install”, then after, I’ve copy and pasted the code in /etc/openstack-dashboard/local_settings.py, like this:

    “””

    HORIZON_CONFIG = {‘dashboards’:(‘nova’, ‘syspanel’, ‘settings’, ‘billing’)}
    INSTALLED_APPS = (‘horizon_billing’)

    “””

    I’ve added the endPoint too, but i’m getting this error >> http://dl.dropbox.com/u/16124330/error%20billing << this is a html page!
    Do you know a way to fix this?
    Thanks!

    Reply
    1. aababilov

      Olá!

      If your dashboard looks for
      django_openstack/syspanel/instances/usage.html, it must be too old.
      The new Openstack Dashboard stores its templates in horizon/
      directory, not django_openstack.

      Could you update your dashboard to a new one? You can use our
      http://yum.griddynamics.net/yum/diablo/horizon-2012.1-b1407.noarch.rpm
      and http://yum.griddynamics.net/yum/diablo/openstack-dashboard-2012.1-b1407.noarch.rpm
      - they are new enough. And don’t forget to restart your apache after
      installation!

      Don’t be confused: it is an essex dashboard, but it does work with
      diablo nova and glance!

      Reply
      1. guisantogui

        I’m trying to install this on ubuntu, then i parse both packages usign alien. But when i did executed “openstack-dashboard … .deb” i got this stack:


        (Reading database … 98664 files and directories currently installed.)
        Unpacking openstack-dashboard (from openstack-dashboard_2012.1-1_all.deb) …
        dpkg: error processing openstack-dashboard_2012.1-1_all.deb (–install):
        error creating hard link `./etc/openstack-dashboard/local/__init__.pyo’: No such file or directory
        dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
        Errors were encountered while processing:
        openstack-dashboard_2012.1-1_all.deb

        Before trying install i did purge on package “openstack-dashboard”, it’s correct?

        Thanks aababilov

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s