From 851c3268363864072e3c2a09a28aef0ce6b96931 Mon Sep 17 00:00:00 2001 From: rabi Date: Tue, 10 Sep 2024 14:36:28 +0530 Subject: [PATCH] Don't use multiple tasks to start containers of a service This changes telemetry and swift containers. Signed-off-by: rabi --- roles/edpm_swift/tasks/run.yml | 134 +++---------------------- roles/edpm_telemetry/defaults/main.yml | 2 +- roles/edpm_telemetry/tasks/install.yml | 13 +-- 3 files changed, 18 insertions(+), 131 deletions(-) diff --git a/roles/edpm_swift/tasks/run.yml b/roles/edpm_swift/tasks/run.yml index 8ee4f230d..371fcdafe 100644 --- a/roles/edpm_swift/tasks/run.yml +++ b/roles/edpm_swift/tasks/run.yml @@ -19,142 +19,38 @@ name: edpm_container_manage tasks_from: shutdown.yml -- name: Run swift_account_auditor container +- name: Run swift containers ansible.builtin.include_role: name: osp.edpm.edpm_container_standalone vars: - edpm_container_standalone_service: swift_account_auditor + edpm_container_standalone_service: swift edpm_container_standalone_container_defs: swift_account_auditor: "{{ lookup('template', 'templates/swift_account_auditor.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_account_auditor: "{{ lookup('template', 'templates/kolla_config/swift_account_auditor.yaml.j2') | from_yaml }}" - -- name: Run swift_account_reaper container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_account_reaper - edpm_container_standalone_container_defs: swift_account_reaper: "{{ lookup('template', 'templates/swift_account_reaper.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_account_reaper: "{{ lookup('template', 'templates/kolla_config/swift_account_reaper.yaml.j2') | from_yaml }}" - -- name: Run swift_account_replicator container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_account_replicator - edpm_container_standalone_container_defs: swift_account_replicator: "{{ lookup('template', 'templates/swift_account_replicator.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_account_replicator: "{{ lookup('template', 'templates/kolla_config/swift_account_replicator.yaml.j2') | from_yaml }}" - -- name: Run swift_account_server container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_account_server - edpm_container_standalone_container_defs: swift_account_server: "{{ lookup('template', 'templates/swift_account_server.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_account_server: "{{ lookup('template', 'templates/kolla_config/swift_account_server.yaml.j2') | from_yaml }}" - -- name: Run swift_container_auditor container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_container_auditor - edpm_container_standalone_container_defs: swift_container_auditor: "{{ lookup('template', 'templates/swift_container_auditor.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_container_auditor: "{{ lookup('template', 'templates/kolla_config/swift_container_auditor.yaml.j2') | from_yaml }}" - -- name: Run swift_container_replicator container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_container_replicator - edpm_container_standalone_container_defs: swift_container_replicator: "{{ lookup('template', 'templates/swift_container_replicator.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_container_replicator: "{{ lookup('template', 'templates/kolla_config/swift_container_replicator.yaml.j2') | from_yaml }}" - -- name: Run swift_container_server container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_container_server - edpm_container_standalone_container_defs: swift_container_server: "{{ lookup('template', 'templates/swift_container_server.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_container_server: "{{ lookup('template', 'templates/kolla_config/swift_container_server.yaml.j2') | from_yaml }}" - -- name: Run swift_container_updater container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_container_updater - edpm_container_standalone_container_defs: swift_container_updater: "{{ lookup('template', 'templates/swift_container_updater.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_container_updater: "{{ lookup('template', 'templates/kolla_config/swift_container_updater.yaml.j2') | from_yaml }}" - -- name: Run swift_object_auditor container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_object_auditor - edpm_container_standalone_container_defs: swift_object_auditor: "{{ lookup('template', 'templates/swift_object_auditor.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_object_auditor: "{{ lookup('template', 'templates/kolla_config/swift_object_auditor.yaml.j2') | from_yaml }}" - -- name: Run swift_object_expirer container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_object_expirer - edpm_container_standalone_container_defs: swift_object_expirer: "{{ lookup('template', 'templates/swift_object_expirer.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_object_expirer: "{{ lookup('template', 'templates/kolla_config/swift_object_expirer.yaml.j2') | from_yaml }}" - -- name: Run swift_object_replicator container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_object_replicator - edpm_container_standalone_container_defs: swift_object_replicator: "{{ lookup('template', 'templates/swift_object_replicator.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_object_replicator: "{{ lookup('template', 'templates/kolla_config/swift_object_replicator.yaml.j2') | from_yaml }}" - -- name: Run swift_object_server container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_object_server - edpm_container_standalone_container_defs: swift_object_server: "{{ lookup('template', 'templates/swift_object_server.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_object_server: "{{ lookup('template', 'templates/kolla_config/swift_object_server.yaml.j2') | from_yaml }}" - -- name: Run swift_object_updater container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: swift_object_updater - edpm_container_standalone_container_defs: swift_object_updater: "{{ lookup('template', 'templates/swift_object_updater.yaml.j2') | from_yaml }}" - edpm_container_standalone_kolla_config_files: - swift_object_updater: "{{ lookup('template', 'templates/kolla_config/swift_object_updater.yaml.j2') | from_yaml }}" - -- name: Run rsync container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_standalone - vars: - edpm_container_standalone_service: rsync - edpm_container_standalone_container_defs: rsync: "{{ lookup('template', 'templates/rsync.yaml.j2') | from_yaml }}" edpm_container_standalone_kolla_config_files: + swift_account_auditor: "{{ lookup('template', 'templates/kolla_config/swift_account_auditor.yaml.j2') | from_yaml }}" + swift_account_reaper: "{{ lookup('template', 'templates/kolla_config/swift_account_reaper.yaml.j2') | from_yaml }}" + swift_account_replicator: "{{ lookup('template', 'templates/kolla_config/swift_account_replicator.yaml.j2') | from_yaml }}" + swift_account_server: "{{ lookup('template', 'templates/kolla_config/swift_account_server.yaml.j2') | from_yaml }}" + swift_container_auditor: "{{ lookup('template', 'templates/kolla_config/swift_container_auditor.yaml.j2') | from_yaml }}" + swift_container_replicator: "{{ lookup('template', 'templates/kolla_config/swift_container_replicator.yaml.j2') | from_yaml }}" + swift_container_server: "{{ lookup('template', 'templates/kolla_config/swift_container_server.yaml.j2') | from_yaml }}" + swift_container_updater: "{{ lookup('template', 'templates/kolla_config/swift_container_updater.yaml.j2') | from_yaml }}" + swift_object_auditor: "{{ lookup('template', 'templates/kolla_config/swift_object_auditor.yaml.j2') | from_yaml }}" + swift_object_expirer: "{{ lookup('template', 'templates/kolla_config/swift_object_expirer.yaml.j2') | from_yaml }}" + swift_object_replicator: "{{ lookup('template', 'templates/kolla_config/swift_object_replicator.yaml.j2') | from_yaml }}" + swift_object_server: "{{ lookup('template', 'templates/kolla_config/swift_object_server.yaml.j2') | from_yaml }}" + swift_object_updater: "{{ lookup('template', 'templates/kolla_config/swift_object_updater.yaml.j2') | from_yaml }}" rsync: "{{ lookup('template', 'templates/kolla_config/rsync.yaml.j2') | from_yaml }}" diff --git a/roles/edpm_telemetry/defaults/main.yml b/roles/edpm_telemetry/defaults/main.yml index 147acd0fc..13ed4e2b7 100644 --- a/roles/edpm_telemetry/defaults/main.yml +++ b/roles/edpm_telemetry/defaults/main.yml @@ -21,7 +21,7 @@ edpm_telemetry_service_name: telemetry # Directory in the ansibleEE container edpm_telemetry_config_src: "/var/lib/openstack/configs/{{ edpm_telemetry_service_name }}" # Directory in the compute node -edpm_telemetry_config_dest: /var/lib/openstack/config/telemetry +edpm_telemetry_config_dest: "/var/lib/openstack/config/{{ edpm_telemetry_service_name }}" # Image to use for node_exporter edpm_telemetry_node_exporter_image: quay.io/prometheus/node-exporter:v1.5.0 # Image to use for Ceilometer diff --git a/roles/edpm_telemetry/tasks/install.yml b/roles/edpm_telemetry/tasks/install.yml index 73bcd3d7b..aa29d3215 100644 --- a/roles/edpm_telemetry/tasks/install.yml +++ b/roles/edpm_telemetry/tasks/install.yml @@ -14,22 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. -- name: Deploy ceilometer compute container +- name: Deploy ceilometer containers ansible.builtin.include_role: name: osp.edpm.edpm_container_manage vars: edpm_container_manage_config: "{{ edpm_telemetry_config_dest }}" edpm_container_manage_healthcheck_disabled: true - edpm_container_manage_config_patterns: ceilometer_agent_compute.json - edpm_container_manage_clean_orphans: false - -- name: Deploy ceilometer ipmi container - ansible.builtin.include_role: - name: osp.edpm.edpm_container_manage - vars: - edpm_container_manage_config: "{{ edpm_telemetry_config_dest }}" - edpm_container_manage_healthcheck_disabled: true - edpm_container_manage_config_patterns: ceilometer_agent_ipmi.json + edpm_container_manage_config_patterns: "ceilometer_*.json" edpm_container_manage_clean_orphans: false - name: Check that tls.crt exists