diff --git a/ansible/roles/murano/tasks/bootstrap.yml b/ansible/roles/murano/tasks/bootstrap.yml index ce84179acf..7c58727bb6 100644 --- a/ansible/roles/murano/tasks/bootstrap.yml +++ b/ansible/roles/murano/tasks/bootstrap.yml @@ -36,39 +36,18 @@ run_once: True delegate_to: "{{ groups['murano-api'][0] }}" -- name: Starting Murano bootstrap container - docker: - tty: True +- name: Running Murano bootstrap container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" detach: False - net: host - pull: "{{ docker_pull_policy }}" - restart_policy: "no" - state: reloaded - registry: "{{ docker_registry }}" - username: "{{ docker_registry_username }}" - password: "{{ docker_registry_password }}" - insecure_registry: "{{ docker_insecure_registry }}" - name: bootstrap_murano - image: "{{ murano_api_image_full }}" - volumes: "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro" - env: + environment: KOLLA_BOOTSTRAP: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - run_once: True - delegate_to: "{{ groups['murano-api'][0] }}" - when: database_created - -# https://github.com/ansible/ansible-modules-core/pull/1031 -- name: Waiting for bootstrap container to exit - command: docker wait bootstrap_murano - run_once: True - delegate_to: "{{ groups['murano-api'][0] }}" - when: database_created - -- name: Cleaning up Murano boostrap container - docker: - name: bootstrap_murano image: "{{ murano_api_image_full }}" - state: absent + name: "bootstrap_murano" + restart_policy: "never" + volumes: "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro" + run_once: True delegate_to: "{{ groups['murano-api'][0] }}" when: database_created diff --git a/ansible/roles/murano/tasks/start.yml b/ansible/roles/murano/tasks/start.yml index fe3301656d..0bdb46ac2d 100644 --- a/ansible/roles/murano/tasks/start.yml +++ b/ansible/roles/murano/tasks/start.yml @@ -1,43 +1,22 @@ --- -- name: Starting Murano-engine container - docker: - tty: True - net: host - pull: "{{ docker_pull_policy }}" - restart_policy: "{{ docker_restart_policy }}" - restart_policy_retry: "{{ docker_restart_policy_retry }}" - state: reloaded - registry: "{{ docker_registry }}" - username: "{{ docker_registry_username }}" - password: "{{ docker_registry_password }}" - insecure_registry: "{{ docker_insecure_registry }}" - name: murano_engine +- name: Starting murano-engine container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" image: "{{ murano_engine_image_full }}" + name: "murano_engine" volumes: - "{{ node_config_directory }}/murano-engine/:{{ container_config_directory }}/:ro" - "/var/lib/kolla/dev/log:/dev/log" - volumes_from: - env: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['murano-engine'] -- name: Starting Murano-api container - docker: - tty: True - net: host - pull: "{{ docker_pull_policy }}" - restart_policy: "{{ docker_restart_policy }}" - restart_policy_retry: "{{ docker_restart_policy_retry }}" - state: reloaded - registry: "{{ docker_registry }}" - username: "{{ docker_registry_username }}" - password: "{{ docker_registry_password }}" - insecure_registry: "{{ docker_insecure_registry }}" - name: murano_api +- name: Starting murano-api container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" image: "{{ murano_api_image_full }}" + name: "murano_api" volumes: - "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro" - "/var/lib/kolla/dev/log:/dev/log" - env: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['murano-api']