diff options
Diffstat (limited to 'docker/swift/swift-account-server')
| -rw-r--r-- | docker/swift/swift-account-server/Dockerfile.j2 | 19 | ||||
| -rw-r--r-- | docker/swift/swift-account-server/config-external.sh | 19 | ||||
| -rwxr-xr-x | docker/swift/swift-account-server/start.sh | 16 |
3 files changed, 54 insertions, 0 deletions
diff --git a/docker/swift/swift-account-server/Dockerfile.j2 b/docker/swift/swift-account-server/Dockerfile.j2 new file mode 100644 index 000000000..7320de9f4 --- /dev/null +++ b/docker/swift/swift-account-server/Dockerfile.j2 @@ -0,0 +1,19 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net.kolla) + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} + +RUN yum -y install \ + openstack-swift-account \ + && yum clean all + + {% endif %} +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-account-server/config-external.sh b/docker/swift/swift-account-server/config-external.sh new file mode 100644 index 000000000..61adefcd0 --- /dev/null +++ b/docker/swift/swift-account-server/config-external.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [[ -f /opt/kolla/swift/swift.conf ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/ + chown swift: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then + cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz + chown swift: /etc/swift/account.ring.gz + chmod 0640 /etc/swift/account.ring.gz +fi + +if [[ -f /opt/kolla/swift-account-server/account-server.conf ]]; then + cp /opt/kolla/swift-account-server/account-server.conf /etc/swift/ + chown swift: /etc/swift/account-server.conf + chmod 0640 /etc/swift/account-server.conf +fi diff --git a/docker/swift/swift-account-server/start.sh b/docker/swift/swift-account-server/start.sh new file mode 100755 index 000000000..402ee6f44 --- /dev/null +++ b/docker/swift/swift-account-server/start.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-account-server" +ARGS="/etc/swift/account-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +source /opt/kolla/config-swift.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS |
