Skip to content

Commit

Permalink
Merge pull request #750 from rabi/reduce_tasks
Browse files Browse the repository at this point in the history
Don't use multiple tasks to start containers of a service
  • Loading branch information
openshift-merge-bot[bot] committed Sep 17, 2024
2 parents 15227e2 + 851c326 commit 294559b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 131 deletions.
134 changes: 15 additions & 119 deletions roles/edpm_swift/tasks/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
2 changes: 1 addition & 1 deletion roles/edpm_telemetry/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 2 additions & 11 deletions roles/edpm_telemetry/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 294559b

Please sign in to comment.