Allow custom horizon policy files for disabled openstack projects.

Currently, you cannot deploy custom policy files in horizon for disabled
openstack projects that don't have a horizon plugin.

This patch allows customizing disabled openstack projects policy files
used by horizon.  For services that do not have horizon plugins, it
creates variables of the form `enable_*_horizon_policy_file` and sets
these to the relevant `enable_*` variables by default. This ensures
backwards compatibility.

This patch is useful when you are migrating to kolla-ansible from
another deployment method one openstack project at a time and you have
custom policy files deployed by the old method.

Partially-Implements: blueprint docs-migrating-to-kolla
Closes-Bug: #1809314
Change-Id: Ifc33ef65759fa4831c24d177b272af5b45f80931
This commit is contained in:
Martin Chlumsky 2018-11-14 15:37:03 -05:00
parent b4f7375023
commit 18dd74ac8d
3 changed files with 24 additions and 8 deletions

View File

@ -771,6 +771,18 @@ murano_agent_rabbitmq_user: "muranoagent"
horizon_backend_database: "{{ enable_murano | bool }}"
horizon_keystone_multidomain: False
# Enable deploying custom horizon policy files for services that don't have a
# horizon plugin but have a policy file. Override these when you have services
# not deployed by kolla-ansible but want custom policy files deployed for them
# in horizon.
enable_ceilometer_horizon_policy_file: "{{ enable_ceilometer }}"
enable_cinder_horizon_policy_file: "{{ enable_cinder }}"
enable_congress_horizon_policy_file: "{{ enable_congress }}"
enable_glance_horizon_policy_file: "{{ enable_glance }}"
enable_heat_horizon_policy_file: "{{ enable_heat }}"
enable_keystone_horizon_policy_file: "{{ enable_keystone }}"
enable_neutron_horizon_policy_file: "{{ enable_neutron }}"
enable_nova_horizon_policy_file: "{{ enable_nova }}"
#################
# Octavia options

View File

@ -20,23 +20,23 @@
project_name: "{{ item.name }}"
when: item.enabled | bool
with_items:
- { name: "ceilometer", enabled: "{{ enable_ceilometer }}" }
- { name: "cinder", enabled: "{{ enable_cinder }}" }
- { name: "congress", enabled: "{{ enable_congress }}" }
- { name: "ceilometer", enabled: "{{ enable_ceilometer_horizon_policy_file }}" }
- { name: "cinder", enabled: "{{ enable_cinder_horizon_policy_file }}" }
- { name: "congress", enabled: "{{ enable_congress_horizon_policy_file }}" }
- { name: "cloudkitty", enabled: "{{ enable_horizon_cloudkitty }}" }
- { name: "designate", enabled: "{{ enable_horizon_designate }}" }
- { name: "freezer", enabled: "{{ enable_horizon_freezer }}" }
- { name: "glance", enabled: "{{ enable_glance }}" }
- { name: "heat", enabled: "{{ enable_heat }}" }
- { name: "glance", enabled: "{{ enable_glance_horizon_policy_file }}" }
- { name: "heat", enabled: "{{ enable_heat_horizon_policy_file }}" }
- { name: "ironic", enabled: "{{ enable_horizon_ironic }}" }
- { name: "keystone", enabled: "{{ enable_keystone }}" }
- { name: "keystone", enabled: "{{ enable_keystone_horizon_policy_file }}" }
- { name: "karbor", enabled: "{{ enable_horizon_karbor }}" }
- { name: "magnum", enabled: "{{ enable_horizon_magnum }}" }
- { name: "manila", enabled: "{{ enable_horizon_manila }}" }
- { name: "mistral", enabled: "{{ enable_horizon_mistral }}" }
- { name: "murano", enabled: "{{ enable_horizon_murano }}" }
- { name: "neutron", enabled: "{{ enable_neutron }}" }
- { name: "nova", enabled: "{{ enable_nova }}" }
- { name: "neutron", enabled: "{{ enable_neutron_horizon_policy_file }}" }
- { name: "nova", enabled: "{{ enable_nova_horizon_policy_file }}" }
- { name: "sahara", enabled: "{{ enable_horizon_sahara }}" }
- { name: "searchlight", enabled: "{{ enable_horizon_searchlight }}" }
- { name: "senlin", enabled: "{{ enable_horizon_senlin }}" }

View File

@ -0,0 +1,4 @@
---
features:
- |
Add configuration to enable/disable custom horizon policy files per-service even if the service is not being deployed by kolla-ansible.