Ensure dashboard plugins are found by py_pkgs

The py_pkgs plugin cannot interpret jinja, so it ignores
the current set of optional packages. This results in the
repo_build process ignoring them all, ultimately resulting
in the heat role failing because it cannot find the wheel
it needs in what the repo build has produced - nor can it
go out to get it from pypi because it's restricted by
pip.conf from doing so.

For now, until we are able to eliminate pip.conf or change
the build process to allow the role wheel builds to go out
to pypi, we ensure that py_pkgs will pick up and build
these packages by implementing them into individual
*_optional_pip_packages lists. This matches the mechanism
used in the os_neutron role.

Change-Id: Ia92eb5b1355ceceada323bd075b08729afd6280f
This commit is contained in:
Jesse Pretorius 2018-09-05 13:29:18 +01:00
parent 3d60097f94
commit 5ad0f9d571
2 changed files with 35 additions and 11 deletions

View File

@ -328,18 +328,32 @@ horizon_pip_packages:
- ply
- python-memcached
- python-keystoneclient
- "{{ horizon_enable_sahara_ui | ternary('sahara_dashboard', '') }}"
- "{{ horizon_enable_trove_ui | ternary('trove_dashboard', '') }}"
- "{{ horizon_enable_magnum_ui | ternary('magnum-ui', '') }}"
- "{{ horizon_enable_heat_ui | ternary('heat_dashboard', '') }}"
- "{{ horizon_enable_ironic_ui | ternary('ironic-ui', '') }}"
- "{{ horizon_enable_designate_ui | ternary('designate_dashboard', '') }}"
- "{{ horizon_enable_neutron_lbaas | ternary('neutron-lbaas-dashboard', '') }}"
- "{{ horizon_enable_neutron_fwaas | ternary('neutron-fwaas-dashboard', '') }}"
- "{{ horizon_enable_octavia_ui | ternary('octavia_dashboard', '') }}"
# Optional pip packages for additional dashboards
# TODO(odyssey4me):
# Simplify this when we are no longer using the py_pkgs plugin
horizon_designate_optional_pip_packages:
- designate_dashboard
horizon_heat_optional_pip_packages:
- heat_dashboard
horizon_ironic_optional_pip_packages:
- ironic-ui
horizon_magnum_optional_pip_packages:
- magnum-ui
horizon_neutron_fwaas_optional_pip_packages:
- neutron-fwaas-dashboard
horizon_neutron_lbaas_optional_pip_packages:
- neutron-lbaas-dashboard
horizon_octavia_optional_pip_packages:
- octavia_dashboard
horizon_sahara_optional_pip_packages:
- sahara_dashboard
horizon_trove_optional_pip_packages:
- trove_dashboard
# This variable is used to install additional pip packages
# that could be needed for additional dashboards
# that could be needed for additional dashboards required
# which are not part of the standard set above.
horizon_optional_pip_packages: []
# This variable is used to update the horizon translations from

View File

@ -67,7 +67,17 @@
venv_install_destination_path: "{{ horizon_bin | dirname }}"
venv_install_distro_package_list: "{{ horizon_distro_packages }}"
venv_pip_install_args: "{{ horizon_pip_install_args }}"
venv_pip_packages: "{{ horizon_pip_packages + horizon_optional_pip_packages }}"
venv_pip_packages: >-
{{ horizon_pip_packages + horizon_optional_pip_packages +
(horizon_enable_designate_ui | bool) | ternary(horizon_designate_optional_pip_packages, []) +
(horizon_enable_heat_ui | bool) | ternary(horizon_heat_optional_pip_packages, []) +
(horizon_enable_ironic_ui | bool) | ternary(horizon_ironic_optional_pip_packages, []) +
(horizon_enable_magnum_ui | bool) | ternary(horizon_magnum_optional_pip_packages, []) +
(horizon_enable_neutron_fwaas | bool) | ternary(horizon_neutron_fwaas_optional_pip_packages, []) +
(horizon_enable_neutron_lbaas | bool) | ternary(horizon_neutron_lbaas_optional_pip_packages, []) +
(horizon_enable_octavia_ui | bool) | ternary(horizon_octavia_optional_pip_packages, []) +
(horizon_enable_sahara_ui | bool) | ternary(horizon_sahara_optional_pip_packages, []) +
(horizon_enable_trove_ui | bool) | ternary(horizon_trove_optional_pip_packages, []) }}
venv_facts_when_changed:
- section: "horizon"
option: "venv_tag"