From 0b984893c9fb7bd4df0b9ef598067dda0a3e1eb5 Mon Sep 17 00:00:00 2001 From: Donovan Francesco Date: Thu, 4 Aug 2016 11:47:05 +0200 Subject: [PATCH] Add Magnum-UI plugin support to Horizon This patch adds Magnum-UI plugin support to Horizon. Additionally some commenting is added to clarify the purpose of the developer mode variables. Change-Id: I79c532cbadd5f9cd84ac993d94eb795ba20ea003 Implements: blueprint role-magnum --- defaults/main.yml | 18 +++++++++++++++++- ...num-dashboard-support-4fcddedffb83bc28.yaml | 5 +++++ tasks/horizon_post_install.yml | 16 ++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-horizon-magnum-dashboard-support-4fcddedffb83bc28.yaml diff --git a/defaults/main.yml b/defaults/main.yml index be207385..7f68269b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,13 +20,25 @@ debug: False # Options are 'present' and 'latest' horizon_package_state: "latest" +## Toggle developer mode +horizon_developer_mode: false + +## The git source/branch for Horizon horizon_git_repo: https://git.openstack.org/openstack/horizon horizon_git_install_branch: master -horizon_developer_mode: false + +## The git source/branch for the upper-constraints (used in developer mode) horizon_requirements_git_repo: https://git.openstack.org/openstack/requirements horizon_requirements_git_install_branch: master + +## The git source/branch for the Magnum UI plugin +magnum_dashboard_git_repo: https://git.openstack.org/openstack/magnum-ui +magnum_dashboard_git_install_branch: master + +## The packages to build from source (used in developer mode) horizon_developer_constraints: - "git+{{ horizon_git_repo }}@{{ horizon_git_install_branch }}#egg=horizon" + - "git+{{ magnum_dashboard_git_repo }}@{{ magnum_dashboard_git_install_branch }}#egg=magnum-ui" # Name of the virtual env to deploy into horizon_venv_tag: untagged @@ -141,6 +153,9 @@ horizon_launch_instance_ng: True ## Ironic UI Panel horizon_enable_ironic_ui: False +## Magnum UI Panel +horizon_enable_magnum_ui: False + ## Neutron features to enable horizon_enable_neutron_lbaas: False horizon_enable_neutron_fwaas: False @@ -218,6 +233,7 @@ horizon_pip_packages: - greenlet - horizon - ironic-ui + - magnum-ui - keystonemiddleware - MySQL-python - PyMySQL diff --git a/releasenotes/notes/add-horizon-magnum-dashboard-support-4fcddedffb83bc28.yaml b/releasenotes/notes/add-horizon-magnum-dashboard-support-4fcddedffb83bc28.yaml new file mode 100644 index 00000000..7d27e599 --- /dev/null +++ b/releasenotes/notes/add-horizon-magnum-dashboard-support-4fcddedffb83bc28.yaml @@ -0,0 +1,5 @@ +--- +features: + - The os_horizon role now has support for the horizon magnum-ui dashboard. The + dashboard may be enabled by setting ``horizon_enable_magnum_ui`` to ``True`` + in ``/etc/openstack_deploy/user_variables.yml``. diff --git a/tasks/horizon_post_install.yml b/tasks/horizon_post_install.yml index 57e4a296..2e183f4f 100644 --- a/tasks/horizon_post_install.yml +++ b/tasks/horizon_post_install.yml @@ -41,6 +41,22 @@ tags: - horizon-configs +- name: Enable the magnum-ui-dashboard Horizon panel + file: + src: "{{ item.src }}" + path: "{{ item.path }}" + state: "{{ horizon_enable_magnum_ui | ternary('link', 'absent') }}" + notify: Restart apache2 + with_items: + - src: "{{ horizon_lib_dir }}/magnum_ui/enabled/_1370_project_container-infra_panelgroup.py" + path: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled/_1370_project_container-infra_panelgroup.py" + - src: "{{ horizon_lib_dir }}/magnum_ui/enabled/_1371_project_container-infra_bays_panel.py" + path: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled/_1371_project_container-infra_bays_panel.py" + - src: "{{ horizon_lib_dir }}/magnum_ui/enabled/_1372_project_container-infra_baymodels_panel.py" + path: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled/_1372_project_container-infra_baymodels_panel.py" + tags: + - horizon-configs + - name: Enable the neutron-lbaas-dashboard Horizon panel file: src: "{{ horizon_lib_dir }}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py"