diff --git a/ansible/roles/swift/defaults/main.yml b/ansible/roles/swift/defaults/main.yml index 18ff2ff331..1dda7c091c 100644 --- a/ansible/roles/swift/defaults/main.yml +++ b/ansible/roles/swift/defaults/main.yml @@ -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 }}" diff --git a/ansible/roles/swift/tasks/pull.yml b/ansible/roles/swift/tasks/pull.yml index a0ca0c694a..459b388a6f 100644 --- a/ansible/roles/swift/tasks/pull.yml +++ b/ansible/roles/swift/tasks/pull.yml @@ -8,100 +8,23 @@ inventory_hostname in groups['swift-container-server'] or inventory_hostname in groups['swift-object-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'] diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml index 980c00b0ac..6caf6abff3 100644 --- a/ansible/roles/swift/tasks/start.yml +++ b/ansible/roles/swift/tasks/start.yml @@ -33,7 +33,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" @@ -47,7 +47,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" @@ -62,7 +62,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" @@ -77,7 +77,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" @@ -92,7 +92,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" @@ -107,7 +107,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" @@ -122,7 +122,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" @@ -137,7 +137,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" @@ -152,7 +152,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" @@ -167,7 +167,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" @@ -182,7 +182,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" @@ -197,7 +197,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" @@ -212,7 +212,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" diff --git a/docker/swift/swift-account-reaper/Dockerfile.j2 b/docker/swift/swift-account-reaper/Dockerfile.j2 deleted file mode 100644 index 4ab70ac6f2..0000000000 --- a/docker/swift/swift-account-reaper/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-account-replicator/Dockerfile.j2 b/docker/swift/swift-account-replicator/Dockerfile.j2 deleted file mode 100644 index 4ab70ac6f2..0000000000 --- a/docker/swift/swift-account-replicator/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-account-server/Dockerfile.j2 b/docker/swift/swift-account-server/Dockerfile.j2 deleted file mode 100644 index 4ab70ac6f2..0000000000 --- a/docker/swift/swift-account-server/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-account-auditor/Dockerfile.j2 b/docker/swift/swift-account/Dockerfile.j2 similarity index 100% rename from docker/swift/swift-account-auditor/Dockerfile.j2 rename to docker/swift/swift-account/Dockerfile.j2 diff --git a/docker/swift/swift-container-replicator/Dockerfile.j2 b/docker/swift/swift-container-replicator/Dockerfile.j2 deleted file mode 100644 index ce7e10f73f..0000000000 --- a/docker/swift/swift-container-replicator/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-container-server/Dockerfile.j2 b/docker/swift/swift-container-server/Dockerfile.j2 deleted file mode 100644 index ce7e10f73f..0000000000 --- a/docker/swift/swift-container-server/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-container-updater/Dockerfile.j2 b/docker/swift/swift-container-updater/Dockerfile.j2 deleted file mode 100644 index ce7e10f73f..0000000000 --- a/docker/swift/swift-container-updater/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-container-auditor/Dockerfile.j2 b/docker/swift/swift-container/Dockerfile.j2 similarity index 100% rename from docker/swift/swift-container-auditor/Dockerfile.j2 rename to docker/swift/swift-container/Dockerfile.j2 diff --git a/docker/swift/swift-object-auditor/Dockerfile.j2 b/docker/swift/swift-object-auditor/Dockerfile.j2 deleted file mode 100644 index a9d2c24389..0000000000 --- a/docker/swift/swift-object-auditor/Dockerfile.j2 +++ /dev/null @@ -1,4 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{{ include_footer }} diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2 deleted file mode 100644 index e44767b34a..0000000000 --- a/docker/swift/swift-object-expirer/Dockerfile.j2 +++ /dev/null @@ -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 }} diff --git a/docker/swift/swift-object-replicator/Dockerfile.j2 b/docker/swift/swift-object-replicator/Dockerfile.j2 deleted file mode 100644 index a9d2c24389..0000000000 --- a/docker/swift/swift-object-replicator/Dockerfile.j2 +++ /dev/null @@ -1,4 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{{ include_footer }} diff --git a/docker/swift/swift-object-server/Dockerfile.j2 b/docker/swift/swift-object-server/Dockerfile.j2 deleted file mode 100644 index a9d2c24389..0000000000 --- a/docker/swift/swift-object-server/Dockerfile.j2 +++ /dev/null @@ -1,4 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{{ include_footer }} diff --git a/docker/swift/swift-object-updater/Dockerfile.j2 b/docker/swift/swift-object-updater/Dockerfile.j2 deleted file mode 100644 index a9d2c24389..0000000000 --- a/docker/swift/swift-object-updater/Dockerfile.j2 +++ /dev/null @@ -1,4 +0,0 @@ -FROM {{ namespace }}/{{ image_prefix }}swift-object-base:{{ tag }} -MAINTAINER {{ maintainer }} - -{{ include_footer }} diff --git a/docker/swift/swift-object-base/Dockerfile.j2 b/docker/swift/swift-object/Dockerfile.j2 similarity index 92% rename from docker/swift/swift-object-base/Dockerfile.j2 rename to docker/swift/swift-object/Dockerfile.j2 index 977274dd7e..5dc27404f9 100644 --- a/docker/swift/swift-object-base/Dockerfile.j2 +++ b/docker/swift/swift-object/Dockerfile.j2 @@ -9,3 +9,5 @@ RUN yum -y install openstack-swift-object \ {% endif %} {% endif %} + +{{ include_footer }}