diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-09-08 01:15:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-09-08 01:15:43 +0000 |
| commit | 84535cf15a72c72f98297d39139d4dc6bf0b5050 (patch) | |
| tree | e284b4bc0bc143da15863ae0b862cf5be7e9244f /docker | |
| parent | 2a96404eb72a691f8e75f7413f06923ee37bfeb3 (diff) | |
| parent | 8fa96a1516c494dd39c3e575dce84b30e74d34a4 (diff) | |
| download | kolla-84535cf15a72c72f98297d39139d4dc6bf0b5050.tar.gz kolla-84535cf15a72c72f98297d39139d4dc6bf0b5050.zip | |
Merge "Add rsyncd image and related Ansible for Swift"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/swift/swift-rsyncd/Dockerfile.j2 | 22 | ||||
| -rw-r--r-- | docker/swift/swift-rsyncd/config-external.sh | 9 | ||||
| -rwxr-xr-x | docker/swift/swift-rsyncd/start.sh | 14 |
3 files changed, 45 insertions, 0 deletions
diff --git a/docker/swift/swift-rsyncd/Dockerfile.j2 b/docker/swift/swift-rsyncd/Dockerfile.j2 new file mode 100644 index 000000000..b2f60a94e --- /dev/null +++ b/docker/swift/swift-rsyncd/Dockerfile.j2 @@ -0,0 +1,22 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y rsync \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + rsync \ + && apt-get clean + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-rsyncd/config-external.sh b/docker/swift/swift-rsyncd/config-external.sh new file mode 100644 index 000000000..3b3104272 --- /dev/null +++ b/docker/swift/swift-rsyncd/config-external.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift-rsyncd/rsyncd.conf" ]]; then + cp /opt/kolla/swift-rsyncd/rsyncd.conf /etc/rsyncd.conf + chown ${OWNER}: /etc/rsyncd.conf + chmod 0640 /etc/rsyncd.conf +fi diff --git a/docker/swift/swift-rsyncd/start.sh b/docker/swift/swift-rsyncd/start.sh new file mode 100755 index 000000000..2267bb59f --- /dev/null +++ b/docker/swift/swift-rsyncd/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/rsync" +ARGS="--daemon --no-detach --config=/etc/rsyncd.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS |
