Introduce a plugin architecture for Horizon

Registered by Matthias Runge

Currently adding stuff to horizon requires to change settings.py. This
is nearly impossible in a world of software packages. At least, when
using RPM packages, it is absolutely unwanted, to change files at
install time, depending if other packages are installed or not.

The idea would be a directory to place python packages to be added
dynamically to the dashboard.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
Matthias Runge
Direction:
Needs approval
Assignee:
Matthias Runge
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
David Lyle
Completed by
Thierry Carrez

Whiteboard

mrunge: IMHO, the linked bug regarding dashboards in horizon config can be fixed as well.

mrunge: currently, I see no reason to have "plugins" at all (or why to give some kind of python modules a different treamment as others). So I propose here:
- treat all python modules below openstack_dashboard/dashboards as "plugins". More specifically: copying a python module to this location, should add it automatically to INSTALLED_APPS, and should also add it (if appropriate) to HORIZON_CONFIG as well.

mordred: I believe we can do what you're wanting in a packaging friendly way. We use entrypoint loading for the rest of openstack for this sort of thing, and I believe a very simple entrypoint registry would take all of about 5 minutes to put together. Alternately, you could make openstack_dashboard/dashboards a namespace package and get a similar effect. You _don't_ want to do this by copying modules in, because of the complications you'll have around devtest and the __init__.py files (there's a reason namepsace packages and entry point exist)

mrunge: right. I didn't meant to duplicate code, to copy system packages, etc. It is just intended to easily enhance the dashboard, without requiring to change settings.py after all. The latter is inherited from Django framework.

Desgin session notes: https://etherpad.openstack.org/p/icehouse-summit-Plugin-architecture-for-Horizon

Gerrit topic: https://review.openstack.org/#q,topic:bp/plugin-architecture,n,z

Addressed by: https://review.openstack.org/56367
    Plugin-based dashboard configuration

Addressed by: https://review.openstack.org/76881
    Remove apps from settings

Addressed by: https://review.openstack.org/83977
    Fix documentation about adding a new dashboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.