From 74242ee904495ebe32cbc6e860e62b0cb2acd75b Mon Sep 17 00:00:00 2001 From: Dai Dang Van Date: Sat, 3 Jun 2017 16:17:18 +0700 Subject: [PATCH] Mixing binary and source images for S* 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 Sahara, Searchlight, Senlin, Solum and Swift projects. Change-Id: I964796b2f9e3eae69d7eccf68e9428ce9390010c Implements: blueprint mixing-binary-and-source-image --- ansible/roles/sahara/defaults/main.yml | 11 ++++++--- ansible/roles/searchlight/defaults/main.yml | 11 ++++++--- ansible/roles/senlin/defaults/main.yml | 11 ++++++--- ansible/roles/solum/defaults/main.yml | 19 +++++++++------ ansible/roles/swift/defaults/main.yml | 27 ++++++++++++--------- 5 files changed, 47 insertions(+), 32 deletions(-) diff --git a/ansible/roles/sahara/defaults/main.yml b/ansible/roles/sahara/defaults/main.yml index d1e9dbe6b4..ea70fccad5 100644 --- a/ansible/roles/sahara/defaults/main.yml +++ b/ansible/roles/sahara/defaults/main.yml @@ -37,12 +37,15 @@ sahara_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -sahara_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-sahara-engine" -sahara_engine_tag: "{{ openstack_release }}" +sahara_install_type: "{{ kolla_install_type }}" +sahara_tag: "{{ openstack_release }}" + +sahara_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ sahara_install_type }}-sahara-engine" +sahara_engine_tag: "{{ sahara_tag }}" sahara_engine_image_full: "{{ sahara_engine_image }}:{{ sahara_engine_tag }}" -sahara_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-sahara-api" -sahara_api_tag: "{{ openstack_release }}" +sahara_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ sahara_install_type }}-sahara-api" +sahara_api_tag: "{{ sahara_tag }}" sahara_api_image_full: "{{ sahara_api_image }}:{{ sahara_api_tag }}" diff --git a/ansible/roles/searchlight/defaults/main.yml b/ansible/roles/searchlight/defaults/main.yml index a23b189800..bc5b3435f7 100644 --- a/ansible/roles/searchlight/defaults/main.yml +++ b/ansible/roles/searchlight/defaults/main.yml @@ -29,12 +29,15 @@ searchlight_elasticsearch_url: "{{ kolla_internal_fqdn }}:{{ elasticsearch_port #################### # Docker #################### -searchlight_listener_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-searchlight-listener" -searchlight_listener_tag: "{{ openstack_release }}" +searchlight_install_type: "{{ kolla_install_type }}" +searchlight_tag: "{{ openstack_release }}" + +searchlight_listener_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ searchlight_install_type }}-searchlight-listener" +searchlight_listener_tag: "{{ searchlight_tag }}" searchlight_listener_image_full: "{{ searchlight_listener_image }}:{{ searchlight_listener_tag }}" -searchlight_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-searchlight-api" -searchlight_api_tag: "{{ openstack_release }}" +searchlight_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ searchlight_install_type }}-searchlight-api" +searchlight_api_tag: "{{ searchlight_tag }}" searchlight_api_image_full: "{{ searchlight_api_image }}:{{ searchlight_api_tag }}" diff --git a/ansible/roles/senlin/defaults/main.yml b/ansible/roles/senlin/defaults/main.yml index 84e1642cec..4a3c57f699 100644 --- a/ansible/roles/senlin/defaults/main.yml +++ b/ansible/roles/senlin/defaults/main.yml @@ -32,12 +32,15 @@ senlin_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -senlin_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-senlin-engine" -senlin_engine_tag: "{{ openstack_release }}" +senlin_install_type: "{{ kolla_install_type }}" +senlin_tag: "{{ openstack_release }}" + +senlin_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ senlin_install_type }}-senlin-engine" +senlin_engine_tag: "{{ senlin_tag }}" senlin_engine_image_full: "{{ senlin_engine_image }}:{{ senlin_engine_tag }}" -senlin_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-senlin-api" -senlin_api_tag: "{{ openstack_release }}" +senlin_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ senlin_install_type }}-senlin-api" +senlin_api_tag: "{{ senlin_tag }}" senlin_api_image_full: "{{ senlin_api_image }}:{{ senlin_api_tag }}" diff --git a/ansible/roles/solum/defaults/main.yml b/ansible/roles/solum/defaults/main.yml index 26df15c00e..bd9d4cfec2 100644 --- a/ansible/roles/solum/defaults/main.yml +++ b/ansible/roles/solum/defaults/main.yml @@ -51,20 +51,23 @@ solum_database_address: "{{ kolla_internal_fqdn }}:{{ database_port }}" #################### # Docker #################### -solum_worker_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-solum-worker" -solum_worker_tag: "{{ openstack_release }}" +solum_install_type: "{{ kolla_install_type }}" +solum_tag: "{{ openstack_release }}" + +solum_worker_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ solum_install_type }}-solum-worker" +solum_worker_tag: "{{ solum_tag }}" solum_worker_image_full: "{{ solum_worker_image }}:{{ solum_worker_tag }}" -solum_deployer_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-solum-deployer" -solum_deployer_tag: "{{ openstack_release }}" +solum_deployer_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ solum_install_type }}-solum-deployer" +solum_deployer_tag: "{{ solum_tag }}" solum_deployer_image_full: "{{ solum_deployer_image }}:{{ solum_deployer_tag }}" -solum_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-solum-conductor" -solum_conductor_tag: "{{ openstack_release }}" +solum_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ solum_install_type }}-solum-conductor" +solum_conductor_tag: "{{ solum_tag }}" solum_conductor_image_full: "{{ solum_conductor_image }}:{{ solum_conductor_tag }}" -solum_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-solum-api" -solum_api_tag: "{{ openstack_release }}" +solum_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ solum_install_type }}-solum-api" +solum_api_tag: "{{ solum_tag }}" solum_api_image_full: "{{ solum_api_image }}:{{ solum_api_tag }}" diff --git a/ansible/roles/swift/defaults/main.yml b/ansible/roles/swift/defaults/main.yml index 8ac6fc11a5..78e5c740f0 100644 --- a/ansible/roles/swift/defaults/main.yml +++ b/ansible/roles/swift/defaults/main.yml @@ -4,28 +4,31 @@ project_name: "swift" #################### # Docker #################### -swift_proxy_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-proxy-server" -swift_proxy_server_tag: "{{ openstack_release }}" +swift_install_type: "{{ kolla_install_type }}" +swift_tag: "{{ openstack_release }}" + +swift_proxy_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-proxy-server" +swift_proxy_server_tag: "{{ swift_tag }}" swift_proxy_server_image_full: "{{ swift_proxy_server_image }}:{{ swift_proxy_server_tag }}" -swift_account_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account" -swift_account_tag: "{{ openstack_release }}" +swift_account_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-account" +swift_account_tag: "{{ swift_tag }}" swift_account_image_full: "{{ swift_account_image }}:{{ swift_account_tag }}" -swift_container_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container" -swift_container_tag: "{{ openstack_release }}" +swift_container_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-container" +swift_container_tag: "{{ swift_tag }}" swift_container_image_full: "{{ swift_container_image }}:{{ swift_container_tag }}" -swift_object_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object" -swift_object_tag: "{{ openstack_release }}" +swift_object_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-object" +swift_object_tag: "{{ swift_tag }}" swift_object_image_full: "{{ swift_object_image }}:{{ swift_object_tag }}" -swift_object_expirer_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-expirer" -swift_object_expirer_tag: "{{ openstack_release }}" +swift_object_expirer_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-object-expirer" +swift_object_expirer_tag: "{{ swift_tag }}" swift_object_expirer_image_full: "{{ swift_object_expirer_image }}:{{ swift_object_expirer_tag }}" -swift_rsyncd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-rsyncd" -swift_rsyncd_tag: "{{ openstack_release }}" +swift_rsyncd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ swift_install_type }}-swift-rsyncd" +swift_rsyncd_tag: "{{ swift_tag }}" swift_rsyncd_image_full: "{{ swift_rsyncd_image }}:{{ swift_rsyncd_tag }}" ####################