diff options
| author | jamesmmccarthy <james.m.mccarthy@oracle.com> | 2015-09-01 08:32:00 +0000 |
|---|---|---|
| committer | jamesmmccarthy <james.m.mccarthy@oracle.com> | 2015-09-07 10:38:00 +0000 |
| commit | 91fc423a01866df1354f1a0720e83a2c25b93572 (patch) | |
| tree | 7b4f79f4bf400e38dba37d21a3a346ce6cb8bb9f /docker | |
| parent | 6668900e7193000628496630389a142a61aa51ea (diff) | |
| download | kolla-91fc423a01866df1354f1a0720e83a2c25b93572.tar.gz kolla-91fc423a01866df1354f1a0720e83a2c25b93572.zip | |
Add missing Swift services, also ansible configuration
DocImpact
Closes-Bug: #1477993
Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
Change-Id: Ifeab0fec11889cb0c90a56a6211dbdd27a40f3d9
Diffstat (limited to 'docker')
26 files changed, 418 insertions, 60 deletions
diff --git a/docker/swift/swift-account-auditor/Dockerfile.j2 b/docker/swift/swift-account-auditor/Dockerfile.j2 new file mode 100644 index 000000000..7320de9f4 --- /dev/null +++ b/docker/swift/swift-account-auditor/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-auditor/config-external.sh b/docker/swift/swift-account-auditor/config-external.sh new file mode 100644 index 000000000..955d75341 --- /dev/null +++ b/docker/swift/swift-account-auditor/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-auditor/account-auditor.conf ]]; then + cp /opt/kolla/swift-account-auditor/account-auditor.conf /etc/swift/ + chown swift: /etc/swift/account-auditor.conf + chmod 0640 /etc/swift/account-auditor.conf +fi diff --git a/docker/swift/swift-account-auditor/start.sh b/docker/swift/swift-account-auditor/start.sh new file mode 100755 index 000000000..c83000da1 --- /dev/null +++ b/docker/swift/swift-account-auditor/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-account-auditor" +ARGS="/etc/swift/account-auditor.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-account-reaper/Dockerfile.j2 b/docker/swift/swift-account-reaper/Dockerfile.j2 new file mode 100644 index 000000000..7320de9f4 --- /dev/null +++ b/docker/swift/swift-account-reaper/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-reaper/config-external.sh b/docker/swift/swift-account-reaper/config-external.sh new file mode 100644 index 000000000..dc2055ab3 --- /dev/null +++ b/docker/swift/swift-account-reaper/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-reaper/account-reaper.conf ]]; then + cp /opt/kolla/swift-account-reaper/account-reaper.conf /etc/swift/ + chown swift: /etc/swift/account-reaper.conf + chmod 0640 /etc/swift/account-reaper.conf +fi diff --git a/docker/swift/swift-account-reaper/start.sh b/docker/swift/swift-account-reaper/start.sh new file mode 100755 index 000000000..fb6dcfe36 --- /dev/null +++ b/docker/swift/swift-account-reaper/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-account-reaper" +ARGS="/etc/swift/account-reaper.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-account-replicator/Dockerfile.j2 b/docker/swift/swift-account-replicator/Dockerfile.j2 new file mode 100644 index 000000000..7320de9f4 --- /dev/null +++ b/docker/swift/swift-account-replicator/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-replicator/config-external.sh b/docker/swift/swift-account-replicator/config-external.sh new file mode 100644 index 000000000..062c524f2 --- /dev/null +++ b/docker/swift/swift-account-replicator/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-replicator/account-replicator.conf ]]; then + cp /opt/kolla/swift-account-replicator/account-replicator.conf /etc/swift/ + chown swift: /etc/swift/account-replicator.conf + chmod 0640 /etc/swift/account-replicator.conf +fi diff --git a/docker/swift/swift-account-replicator/start.sh b/docker/swift/swift-account-replicator/start.sh new file mode 100755 index 000000000..c820209e2 --- /dev/null +++ b/docker/swift/swift-account-replicator/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-account-replicator" +ARGS="/etc/swift/account-replicator.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-container-auditor/Dockerfile.j2 b/docker/swift/swift-container-auditor/Dockerfile.j2 new file mode 100644 index 000000000..1a08c0f5d --- /dev/null +++ b/docker/swift/swift-container-auditor/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-container \ + && 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-container-auditor/config-external.sh b/docker/swift/swift-container-auditor/config-external.sh new file mode 100644 index 000000000..e01cc12ae --- /dev/null +++ b/docker/swift/swift-container-auditor/config-external.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift-container-auditor/container-auditor.conf" ]]; then + cp /opt/kolla/swift-container-auditor/container-auditor.conf /etc/swift/container-auditor.conf + chown ${OWNER}: /etc/swift/container-auditor.conf + chmod 0640 /etc/swift/container-auditor.conf +fi diff --git a/docker/swift/swift-container-auditor/start.sh b/docker/swift/swift-container-auditor/start.sh new file mode 100755 index 000000000..27dfd0e6b --- /dev/null +++ b/docker/swift/swift-container-auditor/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-container-auditor" +ARGS="/etc/swift/container-auditor.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-container-replicator/Dockerfile.j2 b/docker/swift/swift-container-replicator/Dockerfile.j2 new file mode 100644 index 000000000..1a08c0f5d --- /dev/null +++ b/docker/swift/swift-container-replicator/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-container \ + && 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-container-replicator/config-external.sh b/docker/swift/swift-container-replicator/config-external.sh new file mode 100644 index 000000000..439d4ae97 --- /dev/null +++ b/docker/swift/swift-container-replicator/config-external.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift-container-replicator/container-replicator.conf" ]]; then + cp /opt/kolla/swift-container-replicator/container-replicator.conf /etc/swift/container-replicator.conf + chown ${OWNER}: /etc/swift/container-replicator.conf + chmod 0640 /etc/swift/container-replicator.conf +fi diff --git a/docker/swift/swift-container-replicator/start.sh b/docker/swift/swift-container-replicator/start.sh new file mode 100755 index 000000000..b110ab8af --- /dev/null +++ b/docker/swift/swift-container-replicator/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-container-replicator" +ARGS="/etc/swift/container-replicator.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-container-updater/Dockerfile.j2 b/docker/swift/swift-container-updater/Dockerfile.j2 new file mode 100644 index 000000000..1a08c0f5d --- /dev/null +++ b/docker/swift/swift-container-updater/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-container \ + && 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-container-updater/config-external.sh b/docker/swift/swift-container-updater/config-external.sh new file mode 100644 index 000000000..ea2d3b781 --- /dev/null +++ b/docker/swift/swift-container-updater/config-external.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /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/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift-container-updater/container-updater.conf" ]]; then + cp /opt/kolla/swift-container-updater/container-updater.conf /etc/swift/container-updater.conf + chown ${OWNER}: /etc/swift/container-updater.conf + chmod 0640 /etc/swift/container-updater.conf +fi diff --git a/docker/swift/swift-container-updater/start.sh b/docker/swift/swift-container-updater/start.sh new file mode 100755 index 000000000..d2fe2eb8c --- /dev/null +++ b/docker/swift/swift-container-updater/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-container-updater" +ARGS="/etc/swift/container-updater.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker/swift/swift-object-auditor/config-external.sh b/docker/swift/swift-object-auditor/config-external.sh index 0fa02e985..02be86bfd 100644 --- a/docker/swift/swift-object-auditor/config-external.sh +++ b/docker/swift/swift-object-auditor/config-external.sh @@ -1,18 +1,27 @@ #!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" + OWNER="swift" -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz fi -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER +if [[ -f "/opt/kolla/swift-object-auditor/object-auditor.conf" ]]; then + cp /opt/kolla/swift-object-auditor/object-auditor.conf /etc/swift/object-auditor.conf + chown ${OWNER}: /etc/swift/object-auditor.conf + chmod 0640 /etc/swift/object-auditor.conf fi diff --git a/docker/swift/swift-object-auditor/start.sh b/docker/swift/swift-object-auditor/start.sh index 6319eed6b..0f0111a8e 100755 --- a/docker/swift/swift-object-auditor/start.sh +++ b/docker/swift/swift-object-auditor/start.sh @@ -3,13 +3,11 @@ set -o errexit CMD="/usr/bin/swift-object-auditor" -ARGS="/etc/swift/object-server.conf --verbose" +ARGS="/etc/swift/object-auditor.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh -source /opt/kolla/config-swift.sh - # Execute config strategy set_configs diff --git a/docker/swift/swift-object-expirer/config-external.sh b/docker/swift/swift-object-expirer/config-external.sh index ff2bcf9f5..51fe26618 100644 --- a/docker/swift/swift-object-expirer/config-external.sh +++ b/docker/swift/swift-object-expirer/config-external.sh @@ -1,18 +1,33 @@ #!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_EXPIRER="/opt/kolla/swift/object-expirer.conf" -TARGET_OBJECT_EXPIRER="/etc/swift/object-expirer.conf" + OWNER="swift" -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz +fi + +if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then + cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz + chown ${OWNER}: /etc/swift/account.ring.gz + chmod 0640 /etc/swift/account.ring.gz fi -if [[ -f "$SOURCE_OBJECT_EXPIRER" ]]; then - cp $SOURCE_OBJECT_EXPIRER $TARGET_OBJECT_EXPIRER - chown ${OWNER}: $TARGET_OBJECT_EXPIRER - chmod 0640 $TARGET_OBJECT_EXPIRER +if [[ -f "/opt/kolla/swift-object-expirer/object-expirer.conf" ]]; then + cp /opt/kolla/swift-object-expirer/object-expirer.conf /etc/swift/object-expirer.conf + chown ${OWNER}: /etc/swift/object-expirer.conf + chmod 0640 /etc/swift/object-expirer.conf fi diff --git a/docker/swift/swift-object-expirer/start.sh b/docker/swift/swift-object-expirer/start.sh index 434e8dc49..366525d11 100755 --- a/docker/swift/swift-object-expirer/start.sh +++ b/docker/swift/swift-object-expirer/start.sh @@ -3,13 +3,11 @@ set -o errexit CMD="/usr/bin/swift-object-expirer" -ARGS="/etc/swift/object-server.conf --verbose" +ARGS="/etc/swift/object-expirer.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh -source /opt/kolla/config-swift.sh - # Execute config strategy set_configs diff --git a/docker/swift/swift-object-replicator/config-external.sh b/docker/swift/swift-object-replicator/config-external.sh index 0fa02e985..827721088 100644 --- a/docker/swift/swift-object-replicator/config-external.sh +++ b/docker/swift/swift-object-replicator/config-external.sh @@ -1,18 +1,27 @@ #!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" + OWNER="swift" -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz fi -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER +if [[ -f "/opt/kolla/swift-object-replicator/object-replicator.conf" ]]; then + cp /opt/kolla/swift-object-replicator/object-replicator.conf /etc/swift/object-replicator.conf + chown ${OWNER}: /etc/swift/object-replicator.conf + chmod 0640 /etc/swift/object-replicator.conf fi diff --git a/docker/swift/swift-object-replicator/start.sh b/docker/swift/swift-object-replicator/start.sh index 203f8864d..dbb142499 100755 --- a/docker/swift/swift-object-replicator/start.sh +++ b/docker/swift/swift-object-replicator/start.sh @@ -3,13 +3,11 @@ set -o errexit CMD="/usr/bin/swift-object-replicator" -ARGS="/etc/swift/object-server.conf --verbose" +ARGS="/etc/swift/object-replicator.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh -source /opt/kolla/config-swift.sh - # Execute config strategy set_configs diff --git a/docker/swift/swift-object-updater/config-external.sh b/docker/swift/swift-object-updater/config-external.sh index 0fa02e985..b94844476 100644 --- a/docker/swift/swift-object-updater/config-external.sh +++ b/docker/swift/swift-object-updater/config-external.sh @@ -1,18 +1,27 @@ #!/bin/bash -SOURCE="/opt/kolla/swift/swift.conf" -TARGET="/etc/swift/swift.conf" -SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf" -TARGET_OBJECT_SERVER="/etc/swift/object-server.conf" + OWNER="swift" -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0640 $TARGET +if [[ -f "/opt/kolla/swift/swift.conf" ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf + chown ${OWNER}: /etc/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then + cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz + chown ${OWNER}: /etc/swift/object.ring.gz + chmod 0640 /etc/swift/object.ring.gz +fi + +if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then + cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz + chown ${OWNER}: /etc/swift/container.ring.gz + chmod 0640 /etc/swift/container.ring.gz fi -if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then - cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER - chown ${OWNER}: $TARGET_OBJECT_SERVER - chmod 0640 $TARGET_OBJECT_SERVER +if [[ -f "/opt/kolla/swift-object-updater/object-updater.conf" ]]; then + cp /opt/kolla/swift-object-updater/object-updater.conf /etc/swift/object-updater.conf + chown ${OWNER}: /etc/swift/object-updater.conf + chmod 0640 /etc/swift/object-updater.conf fi diff --git a/docker/swift/swift-object-updater/start.sh b/docker/swift/swift-object-updater/start.sh index 744344f74..5e970b416 100755 --- a/docker/swift/swift-object-updater/start.sh +++ b/docker/swift/swift-object-updater/start.sh @@ -3,13 +3,11 @@ set -o errexit CMD="/usr/bin/swift-object-updater" -ARGS="/etc/swift/object-server.conf --verbose" +ARGS="/etc/swift/object-updater.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh -source /opt/kolla/config-swift.sh - # Execute config strategy set_configs |
