From afdc1567bc7c0b885ac3b5a2e5f50b34a60c313b Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 21 Nov 2024 15:06:59 +0530 Subject: [PATCH] Add hook to enable horizon This PR adds hooks to enable horizon service --- hooks/playbooks/control_plane_horizon.yml | 28 +++++++++++++++++++++++ scenarios/centos-9/horizon.yml | 5 ++++ zuul.d/edpm_multinode.yaml | 1 + 3 files changed, 34 insertions(+) create mode 100644 hooks/playbooks/control_plane_horizon.yml create mode 100644 scenarios/centos-9/horizon.yml diff --git a/hooks/playbooks/control_plane_horizon.yml b/hooks/playbooks/control_plane_horizon.yml new file mode 100644 index 0000000000..a5197b51f8 --- /dev/null +++ b/hooks/playbooks/control_plane_horizon.yml @@ -0,0 +1,28 @@ +--- +- name: Kustomize ControlPlane for horizon service + hosts: "{{ cifmw_target_hook_host | default('localhost') }}" + gather_facts: false + tasks: + - name: Ensure the kustomizations dir exists + ansible.builtin.file: + path: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane" + state: directory + mode: "0755" + + - name: Create kustomize yaml to enable Horizon + ansible.builtin.copy: + dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/66-horizon-kustomization.yaml" + content: |- + apiVersion: kustomize.config.k8s.io/v1beta1 + kind: Kustomization + namespace: {{ namespace }} + patches: + - target: + kind: OpenStackControlPlane + patch: |- + - op: add + path: /spec/horizon/enabled + value: true + - op: add + path: /spec/horizon/template/memcachedInstance + value: memcached diff --git a/scenarios/centos-9/horizon.yml b/scenarios/centos-9/horizon.yml new file mode 100644 index 0000000000..53773bae61 --- /dev/null +++ b/scenarios/centos-9/horizon.yml @@ -0,0 +1,5 @@ +--- +pre_deploy: + - name: Kustomize OpenStack CR + type: playbook + source: control_plane_horizon.yml diff --git a/zuul.d/edpm_multinode.yaml b/zuul.d/edpm_multinode.yaml index 2ef1b72b25..4e1e230848 100644 --- a/zuul.d/edpm_multinode.yaml +++ b/zuul.d/edpm_multinode.yaml @@ -316,6 +316,7 @@ vars: cifmw_extras: - '@scenarios/centos-9/multinode-ci.yml' + - '@scenarios/centos-9/horizon.yml' run: - ci/playbooks/edpm/run.yml