Browse Source

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
tags/8.0.0.0b1
Martin Chlumsky 6 months ago
parent
commit
18dd74ac8d

+ 12
- 0
ansible/group_vars/all.yml View File

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

+ 8
- 8
ansible/roles/horizon/tasks/config.yml View File

@@ -20,23 +20,23 @@
20 20
     project_name: "{{ item.name }}"
21 21
   when: item.enabled | bool
22 22
   with_items:
23
-    - { name: "ceilometer", enabled: "{{ enable_ceilometer }}" }
24
-    - { name: "cinder", enabled: "{{ enable_cinder }}" }
25
-    - { name: "congress", enabled: "{{ enable_congress }}" }
23
+    - { name: "ceilometer", enabled: "{{ enable_ceilometer_horizon_policy_file }}" }
24
+    - { name: "cinder", enabled: "{{ enable_cinder_horizon_policy_file }}" }
25
+    - { name: "congress", enabled: "{{ enable_congress_horizon_policy_file }}" }
26 26
     - { name: "cloudkitty", enabled: "{{ enable_horizon_cloudkitty }}" }
27 27
     - { name: "designate", enabled: "{{ enable_horizon_designate }}" }
28 28
     - { name: "freezer", enabled: "{{ enable_horizon_freezer }}" }
29
-    - { name: "glance", enabled: "{{ enable_glance }}" }
30
-    - { name: "heat", enabled: "{{ enable_heat }}" }
29
+    - { name: "glance", enabled: "{{ enable_glance_horizon_policy_file }}" }
30
+    - { name: "heat", enabled: "{{ enable_heat_horizon_policy_file }}" }
31 31
     - { name: "ironic", enabled: "{{ enable_horizon_ironic }}" }
32
-    - { name: "keystone", enabled: "{{ enable_keystone }}" }
32
+    - { name: "keystone", enabled: "{{ enable_keystone_horizon_policy_file }}" }
33 33
     - { name: "karbor", enabled: "{{ enable_horizon_karbor }}" }
34 34
     - { name: "magnum", enabled: "{{ enable_horizon_magnum }}" }
35 35
     - { name: "manila", enabled: "{{ enable_horizon_manila }}" }
36 36
     - { name: "mistral", enabled: "{{ enable_horizon_mistral }}" }
37 37
     - { name: "murano", enabled: "{{ enable_horizon_murano }}" }
38
-    - { name: "neutron", enabled: "{{ enable_neutron }}" }
39
-    - { name: "nova", enabled: "{{ enable_nova }}" }
38
+    - { name: "neutron", enabled: "{{ enable_neutron_horizon_policy_file }}" }
39
+    - { name: "nova", enabled: "{{ enable_nova_horizon_policy_file }}" }
40 40
     - { name: "sahara", enabled: "{{ enable_horizon_sahara }}" }
41 41
     - { name: "searchlight", enabled: "{{ enable_horizon_searchlight }}" }
42 42
     - { name: "senlin", enabled: "{{ enable_horizon_senlin }}" }

+ 4
- 0
releasenotes/notes/toggle-custom-horizon-policy-files-f8e91efbb80ac0d6.yaml View File

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

Loading…
Cancel
Save