From cda878d2fb62dfc40807a7c42c961a7d9462a056 Mon Sep 17 00:00:00 2001 From: Dai Dang Van Date: Sat, 3 Jun 2017 15:01:04 +0700 Subject: [PATCH] Mixing binary and source images for M* projects In case Kolla's users want to deploy with both of binary and source image, we should have a variable install type that define install type for each project. We also add specific image tag for each Openstack project. This commit is implemented for Magnum, Manila, Mistral and Murano projects. Change-Id: I6aaeb74f791c79229430a52b066327de7219a9b1 Implements: blueprint mixing-binary-and-source-image --- ansible/roles/magnum/defaults/main.yml | 12 ++++++++---- ansible/roles/manila/defaults/main.yml | 19 +++++++++++-------- ansible/roles/mistral/defaults/main.yml | 15 +++++++++------ ansible/roles/murano/defaults/main.yml | 11 +++++++---- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/ansible/roles/magnum/defaults/main.yml b/ansible/roles/magnum/defaults/main.yml index 387dc5a92b..98fa73ae39 100644 --- a/ansible/roles/magnum/defaults/main.yml +++ b/ansible/roles/magnum/defaults/main.yml @@ -34,11 +34,15 @@ magnum_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -magnum_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-magnum-api" -magnum_api_tag: "{{ openstack_release }}" +magnum_install_type: "{{ kolla_install_type }}" +magnum_tag: "{{ openstack_release }}" + +magnum_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ magnum_install_type }}-magnum-api" +magnum_api_tag: "{{ magnum_tag }}" magnum_api_image_full: "{{ magnum_api_image }}:{{ magnum_api_tag }}" -magnum_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-magnum-conductor" -magnum_conductor_tag: "{{ openstack_release }}" + +magnum_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ magnum_install_type }}-magnum-conductor" +magnum_conductor_tag: "{{ magnum_tag }}" magnum_conductor_image_full: "{{ magnum_conductor_image }}:{{ magnum_conductor_tag }}" diff --git a/ansible/roles/manila/defaults/main.yml b/ansible/roles/manila/defaults/main.yml index 00a2a2fbf7..5d6a851590 100644 --- a/ansible/roles/manila/defaults/main.yml +++ b/ansible/roles/manila/defaults/main.yml @@ -55,20 +55,23 @@ manila_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" ##################### ## Docker ##################### -manila_share_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-share" -manila_share_tag: "{{ openstack_release }}" +manila_install_type: "{{ kolla_install_type }}" +manila_tag: "{{ openstack_release }}" + +manila_share_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-share" +manila_share_tag: "{{ manila_tag }}" manila_share_image_full: "{{ manila_share_image }}:{{ manila_share_tag }}" -manila_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-scheduler" -manila_scheduler_tag: "{{ openstack_release }}" +manila_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-scheduler" +manila_scheduler_tag: "{{ manila_tag }}" manila_scheduler_image_full: "{{ manila_scheduler_image }}:{{ manila_scheduler_tag }}" -manila_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-api" -manila_api_tag: "{{ openstack_release }}" +manila_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-api" +manila_api_tag: "{{ manila_tag }}" manila_api_image_full: "{{ manila_api_image }}:{{ manila_api_tag }}" -manila_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-data" -manila_data_tag: "{{ openstack_release }}" +manila_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-data" +manila_data_tag: "{{ manila_tag }}" manila_data_image_full: "{{ manila_data_image }}:{{ manila_data_tag }}" diff --git a/ansible/roles/mistral/defaults/main.yml b/ansible/roles/mistral/defaults/main.yml index a0d00c91a5..f793a94ec7 100644 --- a/ansible/roles/mistral/defaults/main.yml +++ b/ansible/roles/mistral/defaults/main.yml @@ -42,16 +42,19 @@ mistral_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -mistral_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-mistral-engine" -mistral_engine_tag: "{{ openstack_release }}" +mistral_install_type: "{{ kolla_install_type }}" +mistral_tag: "{{ openstack_release }}" + +mistral_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mistral_install_type }}-mistral-engine" +mistral_engine_tag: "{{ mistral_tag }}" mistral_engine_image_full: "{{ mistral_engine_image }}:{{ mistral_engine_tag }}" -mistral_executor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-mistral-executor" -mistral_executor_tag: "{{ openstack_release }}" +mistral_executor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mistral_install_type }}-mistral-executor" +mistral_executor_tag: "{{ mistral_tag }}" mistral_executor_image_full: "{{ mistral_executor_image }}:{{ mistral_executor_tag }}" -mistral_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-mistral-api" -mistral_api_tag: "{{ openstack_release }}" +mistral_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mistral_install_type }}-mistral-api" +mistral_api_tag: "{{ mistral_tag }}" mistral_api_image_full: "{{ mistral_api_image }}:{{ mistral_api_tag }}" diff --git a/ansible/roles/murano/defaults/main.yml b/ansible/roles/murano/defaults/main.yml index 94bb0bdeea..6bc4484b19 100644 --- a/ansible/roles/murano/defaults/main.yml +++ b/ansible/roles/murano/defaults/main.yml @@ -12,12 +12,15 @@ murano_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -murano_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-murano-engine" -murano_engine_tag: "{{ openstack_release }}" +murano_install_type: "{{ kolla_install_type }}" +murano_tag: "{{ openstack_release }}" + +murano_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ murano_install_type }}-murano-engine" +murano_engine_tag: "{{ murano_tag }}" murano_engine_image_full: "{{ murano_engine_image }}:{{ murano_engine_tag }}" -murano_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-murano-api" -murano_api_tag: "{{ openstack_release }}" +murano_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ murano_install_type }}-murano-api" +murano_api_tag: "{{ murano_tag }}" murano_api_image_full: "{{ murano_api_image }}:{{ murano_api_tag }}"