diff --git a/ansible/roles/swift/defaults/main.yml b/ansible/roles/swift/defaults/main.yml index 7171d87609..e10f8cda99 100644 --- a/ansible/roles/swift/defaults/main.yml +++ b/ansible/roles/swift/defaults/main.yml @@ -20,6 +20,10 @@ swift_object_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ do swift_object_tag: "{{ openstack_release }}" 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_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_full: "{{ swift_rsyncd_image }}:{{ swift_rsyncd_tag }}" diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml index 891f92ed76..39b08f174b 100644 --- a/ansible/roles/swift/tasks/start.yml +++ b/ansible/roles/swift/tasks/start.yml @@ -218,7 +218,7 @@ kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" + image: "{{ swift_object_expirer_image_full }}" name: "swift_object_expirer" volumes: - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" diff --git a/docker/swift/swift-object-expirer/Dockerfile.j2 b/docker/swift/swift-object-expirer/Dockerfile.j2 new file mode 100644 index 0000000000..e451aec44f --- /dev/null +++ b/docker/swift/swift-object-expirer/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block swift_object_expirer_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + # RDO has it packaged in the wrong package for now. The issue is being + # tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1382921 + {% set swift_object_expirer_packages = ['openstack-swift-proxy'] %} + {% elif base_distro in ['ubuntu'] %} + {% set swift_object_expirer_packages = ['swift-object'] %} + {% endif %} + +{{ macros.install_packages(swift_object_expirer_packages | customizable("packages")) }} + +{% endif %} + +{% block swift_object_expirer_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER swift