From d463b05cfa5e7acc661c890fd96cd8f2b7ed2714 Mon Sep 17 00:00:00 2001 From: Dai Dang Van Date: Mon, 22 May 2017 17:24:45 +0700 Subject: [PATCH] Mixing binary and source images for C* 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 Ceilometer, Ceph Cinder, Cloudkitty and Congress projects. Change-Id: I560ab84545db2e034abe03613c4e7cb407e64ab2 Implements: blueprint mixing-binary-and-source-image --- ansible/roles/ceilometer/defaults/main.yml | 23 ++++++++++++---------- ansible/roles/ceph/defaults/main.yml | 15 ++++++++------ ansible/roles/cinder/defaults/main.yml | 19 ++++++++++-------- ansible/roles/cloudkitty/defaults/main.yml | 11 +++++++---- ansible/roles/congress/defaults/main.yml | 15 ++++++++------ 5 files changed, 49 insertions(+), 34 deletions(-) diff --git a/ansible/roles/ceilometer/defaults/main.yml b/ansible/roles/ceilometer/defaults/main.yml index 47df7d996d..187e3e283e 100644 --- a/ansible/roles/ceilometer/defaults/main.yml +++ b/ansible/roles/ceilometer/defaults/main.yml @@ -70,24 +70,27 @@ ceilometer_database_mysql_address: "{{ kolla_internal_fqdn }}" #################### # Docker #################### -ceilometer_notification_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceilometer-notification" -ceilometer_notification_tag: "{{ openstack_release }}" +ceilometer_install_type: "{{ kolla_install_type }}" +ceilometer_tag: "{{ openstack_release }}" + +ceilometer_notification_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-notification" +ceilometer_notification_tag: "{{ ceilometer_tag }}" ceilometer_notification_image_full: "{{ ceilometer_notification_image }}:{{ ceilometer_notification_tag }}" -ceilometer_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceilometer-api" -ceilometer_api_tag: "{{ openstack_release }}" +ceilometer_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-api" +ceilometer_api_tag: "{{ ceilometer_tag }}" ceilometer_api_image_full: "{{ ceilometer_api_image }}:{{ ceilometer_api_tag }}" -ceilometer_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceilometer-central" -ceilometer_central_tag: "{{ openstack_release }}" +ceilometer_central_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-central" +ceilometer_central_tag: "{{ ceilometer_tag }}" ceilometer_central_image_full: "{{ ceilometer_central_image }}:{{ ceilometer_central_tag }}" -ceilometer_collector_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceilometer-collector" -ceilometer_collector_tag: "{{ openstack_release }}" +ceilometer_collector_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-collector" +ceilometer_collector_tag: "{{ ceilometer_tag }}" ceilometer_collector_image_full: "{{ ceilometer_collector_image }}:{{ ceilometer_collector_tag }}" -ceilometer_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceilometer-compute" -ceilometer_compute_tag: "{{ openstack_release }}" +ceilometer_compute_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceilometer_install_type }}-ceilometer-compute" +ceilometer_compute_tag: "{{ ceilometer_tag }}" ceilometer_compute_image_full: "{{ ceilometer_compute_image }}:{{ ceilometer_compute_tag }}" diff --git a/ansible/roles/ceph/defaults/main.yml b/ansible/roles/ceph/defaults/main.yml index 456cf43560..105279956d 100644 --- a/ansible/roles/ceph/defaults/main.yml +++ b/ansible/roles/ceph/defaults/main.yml @@ -5,16 +5,19 @@ project_name: "ceph" #################### # Docker #################### -ceph_mon_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceph-mon" -ceph_mon_tag: "{{ openstack_release }}" +ceph_install_type: "{{ kolla_install_type }}" +ceph_tag: "{{ openstack_release }}" + +ceph_mon_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceph_install_type }}-ceph-mon" +ceph_mon_tag: "{{ ceph_tag }}" ceph_mon_image_full: "{{ ceph_mon_image }}:{{ ceph_mon_tag }}" -ceph_osd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceph-osd" -ceph_osd_tag: "{{ openstack_release }}" +ceph_osd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceph_install_type }}-ceph-osd" +ceph_osd_tag: "{{ ceph_tag }}" ceph_osd_image_full: "{{ ceph_osd_image }}:{{ ceph_osd_tag }}" -ceph_rgw_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-ceph-rgw" -ceph_rgw_tag: "{{ openstack_release }}" +ceph_rgw_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceph_install_type }}-ceph-rgw" +ceph_rgw_tag: "{{ ceph_tag }}" ceph_rgw_image_full: "{{ ceph_rgw_image }}:{{ ceph_rgw_tag }}" #################### diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index b4c7f789a0..fbe6fc43f7 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -80,20 +80,23 @@ cinder_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -cinder_volume_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cinder-volume" -cinder_volume_tag: "{{ openstack_release }}" +cinder_install_type: "{{ kolla_install_type }}" +cinder_tag: "{{ openstack_release }}" + +cinder_volume_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cinder_install_type }}-cinder-volume" +cinder_volume_tag: "{{ cinder_tag }}" cinder_volume_image_full: "{{ cinder_volume_image }}:{{ cinder_volume_tag }}" -cinder_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cinder-scheduler" -cinder_scheduler_tag: "{{ openstack_release }}" +cinder_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cinder_install_type }}-cinder-scheduler" +cinder_scheduler_tag: "{{ cinder_tag }}" cinder_scheduler_image_full: "{{ cinder_scheduler_image }}:{{ cinder_scheduler_tag }}" -cinder_backup_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cinder-backup" -cinder_backup_tag: "{{ openstack_release }}" +cinder_backup_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cinder_install_type }}-cinder-backup" +cinder_backup_tag: "{{ cinder_tag }}" cinder_backup_image_full: "{{ cinder_backup_image }}:{{ cinder_backup_tag }}" -cinder_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cinder-api" -cinder_api_tag: "{{ openstack_release }}" +cinder_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cinder_install_type }}-cinder-api" +cinder_api_tag: "{{ cinder_tag }}" cinder_api_image_full: "{{ cinder_api_image }}:{{ cinder_api_tag }}" diff --git a/ansible/roles/cloudkitty/defaults/main.yml b/ansible/roles/cloudkitty/defaults/main.yml index a14865a480..7e16536991 100644 --- a/ansible/roles/cloudkitty/defaults/main.yml +++ b/ansible/roles/cloudkitty/defaults/main.yml @@ -33,12 +33,15 @@ cloudkitty_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -cloudkitty_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cloudkitty-api" -cloudkitty_api_tag: "{{ openstack_release }}" +cloudkitty_install_type: "{{ kolla_install_type }}" +cloudkitty_tag: "{{ openstack_release }}" + +cloudkitty_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cloudkitty_install_type }}-cloudkitty-api" +cloudkitty_api_tag: "{{ cloudkitty_tag }}" cloudkitty_api_image_full: "{{ cloudkitty_api_image }}:{{ cloudkitty_api_tag }}" -cloudkitty_processor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-cloudkitty-processor" -cloudkitty_processor_tag: "{{ openstack_release }}" +cloudkitty_processor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ cloudkitty_install_type }}-cloudkitty-processor" +cloudkitty_processor_tag: "{{ cloudkitty_tag }}" cloudkitty_processor_image_full: "{{ cloudkitty_processor_image }}:{{ cloudkitty_processor_tag }}" #################### diff --git a/ansible/roles/congress/defaults/main.yml b/ansible/roles/congress/defaults/main.yml index 92ad80d1ca..641450d312 100644 --- a/ansible/roles/congress/defaults/main.yml +++ b/ansible/roles/congress/defaults/main.yml @@ -42,16 +42,19 @@ congress_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -congress_policy_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-congress-policy-engine" -congress_policy_engine_tag: "{{ openstack_release }}" +congress_install_type: "{{ kolla_install_type }}" +congress_tag: "{{ openstack_release }}" + +congress_policy_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ congress_install_type }}-congress-policy-engine" +congress_policy_engine_tag: "{{ congress_tag }}" congress_policy_engine_image_full: "{{ congress_policy_engine_image }}:{{ congress_policy_engine_tag }}" -congress_datasource_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-congress-datasource" -congress_datasource_tag: "{{ openstack_release }}" +congress_datasource_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ congress_install_type }}-congress-datasource" +congress_datasource_tag: "{{ congress_tag }}" congress_datasource_image_full: "{{ congress_datasource_image }}:{{ congress_datasource_tag }}" -congress_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-congress-api" -congress_api_tag: "{{ openstack_release }}" +congress_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ congress_install_type }}-congress-api" +congress_api_tag: "{{ congress_tag }}" congress_api_image_full: "{{ congress_api_image }}:{{ congress_api_tag }}"