From f127da3cb10d1df171bfafc349fb942d123df150 Mon Sep 17 00:00:00 2001 From: Dai Dang Van Date: Mon, 22 May 2017 17:30:57 +0700 Subject: [PATCH] Mixing binary and source images for D*, G* and H* 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 Designate, Gnocchi and Heat projects. Change-Id: I07451750e70e0e6305dca451422e33cd31ce8a4c Implements: blueprint mixing-binary-and-source-image --- ansible/roles/designate/defaults/main.yml | 26 ++++++++++++----------- ansible/roles/gnocchi/defaults/main.yml | 15 +++++++------ ansible/roles/heat/defaults/main.yml | 15 +++++++------ 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/ansible/roles/designate/defaults/main.yml b/ansible/roles/designate/defaults/main.yml index 3cf838823c..50bfb1ec07 100644 --- a/ansible/roles/designate/defaults/main.yml +++ b/ansible/roles/designate/defaults/main.yml @@ -74,29 +74,31 @@ designate_pool_manager_database_address: "{{ kolla_internal_fqdn }}:{{ database_ #################### # Docker #################### +designate_install_type: "{{ kolla_install_type }}" +designate_tag: "{{ openstack_release }}" -designate_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-central" -designate_central_tag: "{{ openstack_release }}" +designate_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-central" +designate_central_tag: "{{ designate_tag }}" designate_central_image_full: "{{ designate_central_image }}:{{ designate_central_tag }}" -designate_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-api" -designate_api_tag: "{{ openstack_release }}" +designate_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-api" +designate_api_tag: "{{ designate_tag }}" designate_api_image_full: "{{ designate_api_image }}:{{ designate_api_tag }}" -designate_backend_bind9_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-backend-bind9" -designate_backend_bind9_tag: "{{ openstack_release }}" +designate_backend_bind9_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-backend-bind9" +designate_backend_bind9_tag: "{{ designate_tag }}" designate_backend_bind9_image_full: "{{ designate_backend_bind9_image }}:{{ designate_backend_bind9_tag }}" -designate_mdns_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-mdns" -designate_mdns_tag: "{{ openstack_release }}" +designate_mdns_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-mdns" +designate_mdns_tag: "{{ designate_tag }}" designate_mdns_image_full: "{{ designate_mdns_image }}:{{ designate_mdns_tag }}" -designate_sink_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-sink" -designate_sink_tag: "{{ openstack_release }}" +designate_sink_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-sink" +designate_sink_tag: "{{ designate_tag }}" designate_sink_image_full: "{{ designate_sink_image }}:{{ designate_sink_tag }}" -designate_worker_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-designate-worker" -designate_worker_tag: "{{ openstack_release }}" +designate_worker_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ designate_install_type }}-designate-worker" +designate_worker_tag: "{{ designate_tag }}" designate_worker_image_full: "{{ designate_worker_image }}:{{ designate_worker_tag }}" #################### diff --git a/ansible/roles/gnocchi/defaults/main.yml b/ansible/roles/gnocchi/defaults/main.yml index a7c32813c7..8c9320d12a 100644 --- a/ansible/roles/gnocchi/defaults/main.yml +++ b/ansible/roles/gnocchi/defaults/main.yml @@ -58,16 +58,19 @@ gnocchi_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -gnocchi_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-api" -gnocchi_api_tag: "{{ openstack_release }}" +gnocchi_install_type: "{{ kolla_install_type }}" +gnocchi_tag: "{{ openstack_release }}" + +gnocchi_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ gnocchi_install_type }}-gnocchi-api" +gnocchi_api_tag: "{{ gnocchi_tag }}" gnocchi_api_image_full: "{{ gnocchi_api_image }}:{{ gnocchi_api_tag }}" -gnocchi_statsd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-statsd" -gnocchi_statsd_tag: "{{ openstack_release }}" +gnocchi_statsd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ gnocchi_install_type }}-gnocchi-statsd" +gnocchi_statsd_tag: "{{ gnocchi_tag }}" gnocchi_statsd_image_full: "{{ gnocchi_statsd_image }}:{{ gnocchi_statsd_tag }}" -gnocchi_metricd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-gnocchi-metricd" -gnocchi_metricd_tag: "{{ openstack_release }}" +gnocchi_metricd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ gnocchi_install_type }}-gnocchi-metricd" +gnocchi_metricd_tag: "{{ gnocchi_tag }}" gnocchi_metricd_image_full: "{{ gnocchi_metricd_image }}:{{ gnocchi_metricd_tag }}" #################### diff --git a/ansible/roles/heat/defaults/main.yml b/ansible/roles/heat/defaults/main.yml index 2a4f80e21a..3c10e92f8d 100644 --- a/ansible/roles/heat/defaults/main.yml +++ b/ansible/roles/heat/defaults/main.yml @@ -41,16 +41,19 @@ heat_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -heat_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-api" -heat_api_tag: "{{ openstack_release }}" +heat_install_type: "{{ kolla_install_type }}" +heat_tag: "{{ openstack_release }}" + +heat_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ heat_install_type }}-heat-api" +heat_api_tag: "{{ heat_tag }}" heat_api_image_full: "{{ heat_api_image }}:{{ heat_api_tag }}" -heat_api_cfn_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-api-cfn" -heat_api_cfn_tag: "{{ openstack_release }}" +heat_api_cfn_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ heat_install_type }}-heat-api-cfn" +heat_api_cfn_tag: "{{ heat_tag }}" heat_api_cfn_image_full: "{{ heat_api_cfn_image }}:{{ heat_api_cfn_tag }}" -heat_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-engine" -heat_engine_tag: "{{ openstack_release }}" +heat_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ heat_install_type }}-heat-engine" +heat_engine_tag: "{{ heat_tag }}" heat_engine_image_full: "{{ heat_engine_image }}:{{ heat_engine_tag }}" ####################