OpenStack Horizon plugin that supports ESI
Clone the repository:
git clone https://github.com/CCI-MOC/esi-ui.git
Copy all files under esi-ui's enabled
directory:
cp -r <esi-ui path>/esi_ui/enabled <horizon path>/openstack_dashboard/local
Next, install the package into the environment you use to run your server.
If you run Horizon using tox, edit your tox.ini file to include esi-ui as a dependency:
[testenv] deps = ... -r{toxinidir}/requirements.txt -e <esi-ui path>
Then restart your server by running:
tox -e runserver_plus -- localhost:8000
Read how to install Horizon to use tox here: CCI-MOC/esi#545 (comment)
If you run Horizon using Apache, pip install the esi-ui package:
python setup.py sdist pip install dist/<package>.tar.gz
Finally, restart your server using one of the commands based on your environment from here: https://docs.openstack.org/horizon/latest/install/,
Read more about general plugin installation: https://docs.openstack.org/horizon/latest/contributor/tutorials/plugin.html#installing-your-plugin
ESI_EXTERNAL_NETWORK
To enable automatic floating IP creation, set ESI_EXTERNAL_NETWORK to the UUID of your external network. This is required for provisioning in environments where floating IP is created.
Example:
# In local_settings.py ESI_EXTERNAL_NETWORK = "<YOUR_EXTERNAL_NETWORK_UUID>"
An example file structure looks like this:
esi_ui ├── api │ ├── esi_api.py │ ├── esi_rest_api.py │ └── __init__.py ├── content │ ├── esi │ │ ├── __init__.py │ │ ├── panel.py │ │ ├── templates │ │ │ └── esi │ │ │ └── index.html │ │ ├── urls.py │ │ └── views.py │ └── __init__.py ├── enabled │ ├── _6000_esi_panel_group.py │ └── _6010_project_nodes_panel.py ├── __init__.py └── static └── dashboard └── project └── esi ├── esi.controller.js ├── esi.html ├── esi.module.js └── nodes.service.js
esi_rest_api.py contains api endpoints that becomes registered on the server. This file usually calls functions defined in esi_api.py which usually returns resources such as nodes, leases, offers, etc.
This directory holds subdirectories that contain the content required to display a panel.
This directory contains files that define settings for dashboards, panels, panel groups, and Django.
This directory and its contents will be copied to the Horizon root directory for Angularjs to see. To add to different dashboards, such as admin or identity, create a directory under dashboard and populate it with your Angularjs files.
Read more about the file structure: https://docs.openstack.org/horizon/latest/contributor/tutorials/plugin.html#file-structure