diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml index a800a7605d..1f396b0d59 100644 --- a/ansible/roles/nova/defaults/main.yml +++ b/ansible/roles/nova/defaults/main.yml @@ -40,6 +40,10 @@ nova_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker nova_api_tag: "{{ openstack_release }}" nova_api_image_full: "{{ nova_api_image }}:{{ nova_api_tag }}" +nova_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-data" +nova_data_tag: "{{ openstack_release }}" +nova_data_image_full: "{{ nova_data_image }}:{{ nova_data_tag }}" + #################### # Openstack diff --git a/ansible/roles/nova/tasks/bootstrap.yml b/ansible/roles/nova/tasks/bootstrap.yml index a9d1723b66..9022ae209d 100644 --- a/ansible/roles/nova/tasks/bootstrap.yml +++ b/ansible/roles/nova/tasks/bootstrap.yml @@ -27,6 +27,22 @@ failed_when: database_user_create.stdout.split()[2] != 'SUCCESS' run_once: True +- name: Starting Nova data container + docker: + docker_api_version: "{{ docker_api_version }}" + 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: nova_data + image: "{{ nova_data_image_full }}" + volumes: "/var/lib/nova/instances" + - name: Starting Nova bootstrap container docker: detach: False diff --git a/ansible/roles/nova/tasks/start.yml b/ansible/roles/nova/tasks/start.yml index c4460a830f..b6b657c241 100644 --- a/ansible/roles/nova/tasks/start.yml +++ b/ansible/roles/nova/tasks/start.yml @@ -19,7 +19,8 @@ - "{{ node_config_directory }}/nova-libvirt/:/opt/kolla/nova-libvirt/:ro" - "/run:/run" - "/sys/fs/cgroup:/sys/fs/cgroup" - - "/var/lib/nova/instances" + volumes_from: + - nova_data env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['compute'] @@ -142,7 +143,7 @@ - "/lib/modules:/lib/modules:ro" - "/run:/run" volumes_from: - - nova_libvirt + - nova_data env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: inventory_hostname in groups['compute']