Share the same image between swift services

Get rid of swfit children images by share the same image in the swift
account, swift object and swift container services

Closes-Bug: #1534476

Change-Id: I929689f93b56396a41b19fda46e4679c4de84ca1
This commit is contained in:
Jeffrey Zhang 2016-01-11 11:01:30 +08:00
parent 4bdf8bfa84
commit 1cf92be7b2
17 changed files with 30 additions and 254 deletions

View File

@ -8,57 +8,17 @@ swift_proxy_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }
swift_proxy_server_tag: "{{ openstack_release }}"
swift_proxy_server_image_full: "{{ swift_proxy_server_image }}:{{ swift_proxy_server_tag }}"
swift_account_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-server"
swift_account_server_tag: "{{ openstack_release }}"
swift_account_server_image_full: "{{ swift_account_server_image }}:{{ swift_account_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_full: "{{ swift_account_image }}:{{ swift_account_tag }}"
swift_account_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-auditor"
swift_account_auditor_tag: "{{ openstack_release }}"
swift_account_auditor_image_full: "{{ swift_account_auditor_image }}:{{ swift_account_auditor_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_full: "{{ swift_container_server_image }}:{{ swift_container_tag }}"
swift_account_replicator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-replicator"
swift_account_replicator_tag: "{{ openstack_release }}"
swift_account_replicator_image_full: "{{ swift_account_replicator_image }}:{{ swift_account_replicator_tag }}"
swift_account_reaper_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-reaper"
swift_account_reaper_tag: "{{ openstack_release }}"
swift_account_reaper_image_full: "{{ swift_account_reaper_image }}:{{ swift_account_reaper_tag }}"
swift_container_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-server"
swift_container_server_tag: "{{ openstack_release }}"
swift_container_server_image_full: "{{ swift_container_server_image }}:{{ swift_container_server_tag }}"
swift_container_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-auditor"
swift_container_auditor_tag: "{{ openstack_release }}"
swift_container_auditor_image_full: "{{ swift_container_auditor_image }}:{{ swift_container_auditor_tag }}"
swift_container_replicator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-replicator"
swift_container_replicator_tag: "{{ openstack_release }}"
swift_container_replicator_image_full: "{{ swift_container_replicator_image }}:{{ swift_container_replicator_tag }}"
swift_container_updater_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-updater"
swift_container_updater_tag: "{{ openstack_release }}"
swift_container_updater_image_full: "{{ swift_container_updater_image }}:{{ swift_container_updater_tag }}"
swift_object_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-auditor"
swift_object_auditor_tag: "{{ openstack_release }}"
swift_object_auditor_image_full: "{{ swift_object_auditor_image }}:{{ swift_object_auditor_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_full: "{{ swift_object_expirer_image }}:{{ swift_object_expirer_tag }}"
swift_object_replicator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-replicator"
swift_object_replicator_tag: "{{ openstack_release }}"
swift_object_replicator_image_full: "{{ swift_object_replicator_image }}:{{ swift_object_replicator_tag }}"
swift_object_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-server"
swift_object_server_tag: "{{ openstack_release }}"
swift_object_server_image_full: "{{ swift_object_server_image }}:{{ swift_object_server_tag }}"
swift_object_updater_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-updater"
swift_object_updater_tag: "{{ openstack_release }}"
swift_object_updater_image_full: "{{ swift_object_updater_image }}:{{ swift_object_updater_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_full: "{{ swift_object_image }}:{{ swift_object_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 }}"

View File

@ -9,100 +9,23 @@
inventory_hostname in groups['swift-object-server'] or
inventory_hostname in groups['swift-proxy-server']
- name: Pulling swift-account-auditor image
- name: Pulling swift-account image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_auditor_image_full }}"
image: "{{ swift_account_image_full }}"
when: inventory_hostname in groups['swift-account-server']
- name: Pulling swift-account-reaper image
- name: Pulling swift-container image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_reaper_image_full }}"
when: inventory_hostname in groups['swift-account-server']
- name: Pulling swift-account-replicator image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_replicator_image_full }}"
when: inventory_hostname in groups['swift-account-server']
- name: Pulling swift-account-server image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_server_image_full }}"
when: inventory_hostname in groups['swift-account-server']
- name: Pulling swift-container-auditor image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_auditor_image_full }}"
image: "{{ swift_container_image_full }}"
when: inventory_hostname in groups['swift-container-server']
- name: Pulling swift-container-replicator image
- name: Pulling swift-object image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_replicator_image_full }}"
when: inventory_hostname in groups['swift-container-server']
- name: Pulling swift-container-server image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_server_image_full }}"
when: inventory_hostname in groups['swift-container-server']
- name: Pulling swift-container-updater image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_updater_image_full }}"
when: inventory_hostname in groups['swift-container-server']
- name: Pulling swift-object-auditor image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_auditor_image_full }}"
image: "{{ swift_object_image_full }}"
when: inventory_hostname in groups['swift-object-server']
- name: Pulling swift-object-expirer image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_expirer_image_full }}"
when: inventory_hostname in groups['swift-object-server']
- name: Pulling swift-object-replicator image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_replicator_image_full }}"
when: inventory_hostname in groups['swift-object-server']
- name: Pulling swift-object-server image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_server_image_full }}"
when: inventory_hostname in groups['swift-object-server']
- name: Pulling swift-object-updater image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_updater_image_full }}"
when: inventory_hostname in groups['swift-object-server']
- name: Pulling swift-proxy-server image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ swift_proxy_server_image_full }}"
when: inventory_hostname in groups['swift-proxy-server']

View File

@ -32,7 +32,7 @@
action: "start_container"
common_options: "{{ docker_common_options }}"
name: "swift_account_server"
image: "{{ swift_account_server_image_full }}"
image: "{{ swift_account_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
- "{{ node_config_directory }}/swift-account-server/:{{ container_config_directory }}/:ro"
@ -46,7 +46,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_auditor_image_full }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -61,7 +61,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_replicator_image_full }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -76,7 +76,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_account_reaper_image_full }}"
image: "{{ swift_account_image_full }}"
name: "swift_account_reaper"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -91,7 +91,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_server_image_full }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -106,7 +106,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_auditor_image_full }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -121,7 +121,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_replicator_image_full }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -136,7 +136,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_container_updater_image_full }}"
image: "{{ swift_container_image_full }}"
name: "swift_container_updater"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -151,7 +151,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_server_image_full }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_server"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -166,7 +166,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_auditor_image_full }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_auditor"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -181,7 +181,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_replicator_image_full }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_replicator"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -196,7 +196,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_updater_image_full }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_updater"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"
@ -211,7 +211,7 @@
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ swift_object_expirer_image_full }}"
image: "{{ swift_object_image_full }}"
name: "swift_object_expirer"
volumes:
- "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro"

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,13 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,4 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }}
MAINTAINER {{ maintainer }}
{{ include_footer }}

View File

@ -1,15 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift-proxy \
openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
{{ include_footer }}

View File

@ -1,4 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }}
MAINTAINER {{ maintainer }}
{{ include_footer }}

View File

@ -1,4 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }}
MAINTAINER {{ maintainer }}
{{ include_footer }}

View File

@ -1,4 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }}
MAINTAINER {{ maintainer }}
{{ include_footer }}

View File

@ -9,3 +9,5 @@ RUN yum -y install openstack-swift-object \
{% endif %}
{% endif %}
{{ include_footer }}