Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use multiple tasks to start containers of a service #750

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading