From 5e28eb8496c356f2074c21d72b52906451696e12 Mon Sep 17 00:00:00 2001 From: James McCarthy Date: Wed, 15 Jul 2015 16:00:23 +0100 Subject: [PATCH] Implement Swift Containers Known bugs/TODOs at this time of this patch update: https://bugs.launchpad.net/kolla/+bug/1477990 https://bugs.launchpad.net/kolla/+bug/1477993 Implements: Blueprint swift-container Closes-bug: #1477992 Co-Authored-By: Paul Bourke Change-Id: I031f88a7cd1867104fef12df6ab3ffcc06cb65d6 --- compose/swift-proxy.yml | 7 + compose/swift-storage.yml | 73 +++++++++ .../Dockerfile | 5 +- .../build | 0 .../swift-account-server/config-external.sh | 1 + .../swift-account-server/config-internal.sh | 1 + .../swift/swift-account-server/start.sh | 1 + .../swift/swift-account/config-external.sh | 1 - .../swift/swift-account/config-internal.sh | 1 - .../binary/swift/swift-account/start.sh | 1 - .../centos/binary/swift/swift-base/Dockerfile | 6 +- .../swift/swift-base/build-swift-ring.py | 1 + .../binary/swift/swift-base/config-swift.sh | 1 + .../Dockerfile | 5 +- .../build | 0 .../swift-container-server/config-external.sh | 1 + .../swift-container-server/config-internal.sh | 1 + .../swift/swift-container-server/start.sh | 1 + .../swift/swift-container/config-external.sh | 1 - .../swift/swift-container/config-internal.sh | 1 - .../binary/swift/swift-container/start.sh | 1 - .../centos/binary/swift/swift-data/Dockerfile | 13 ++ .../swift/{swift-object => swift-data}/build | 0 .../Dockerfile | 5 +- .../binary/swift/swift-object-auditor/build | 1 + .../swift-object-auditor/config-external.sh | 1 + .../swift-object-auditor/config-internal.sh | 1 + .../swift/swift-object-auditor/start.sh | 1 + .../binary/swift/swift-object-base/Dockerfile | 8 + .../binary/swift/swift-object-base/build | 1 + .../swift-object-base/config-swift-object.sh | 1 + .../swift/swift-object-expirer/Dockerfile | 12 ++ .../binary/swift/swift-object-expirer/build | 1 + .../swift-object-expirer/config-external.sh | 1 + .../swift-object-expirer/config-internal.sh | 1 + .../swift/swift-object-expirer/start.sh | 1 + .../swift/swift-object-replicator/Dockerfile | 7 + .../swift/swift-object-replicator/build | 1 + .../config-external.sh | 1 + .../config-internal.sh | 1 + .../swift/swift-object-replicator/start.sh | 1 + .../swift/swift-object-server/Dockerfile | 7 + .../binary/swift/swift-object-server/build | 1 + .../swift-object-server/config-external.sh | 1 + .../swift-object-server/config-internal.sh | 1 + .../binary/swift/swift-object-server/start.sh | 1 + .../swift/swift-object-updater/Dockerfile | 7 + .../binary/swift/swift-object-updater/build | 1 + .../swift-object-updater/config-external.sh | 1 + .../swift-object-updater/config-internal.sh | 1 + .../swift/swift-object-updater/start.sh | 1 + .../swift/swift-object/config-external.sh | 1 - .../swift/swift-object/config-internal.sh | 1 - .../centos/binary/swift/swift-object/start.sh | 1 - .../swift/swift-proxy-server/Dockerfile | 2 + .../swift-proxy-server/config-external.sh | 2 +- .../swift-proxy-server/config-internal.sh | 2 +- .../binary/swift/swift-proxy-server/start.sh | 2 +- .../swift-account-server/config-external.sh | 13 ++ .../swift-account-server/config-internal.sh | 54 +++++++ .../swift/swift-account-server/start.sh | 14 ++ .../swift/swift-account/config-external.sh | 10 -- .../swift/swift-account/config-internal.sh | 29 ---- .../swift/swift-base/build-swift-ring.py | 93 +++++++++++ .../common/swift/swift-base/config-swift.sh | 9 ++ .../swift-container-server/config-external.sh | 13 ++ .../swift-container-server/config-internal.sh | 52 ++++++ .../start.sh | 3 +- .../swift/swift-container/config-external.sh | 10 -- .../swift/swift-container/config-internal.sh | 29 ---- .../swift-object-auditor/config-external.sh | 13 ++ .../swift-object-auditor/config-internal.sh | 11 ++ .../start.sh | 5 +- .../swift-object-base/config-swift-object.sh | 72 +++++++++ .../swift-object-expirer/config-external.sh | 13 ++ .../swift-object-expirer/config-internal.sh | 11 ++ .../swift/swift-object-expirer/start.sh | 14 ++ .../config-external.sh | 13 ++ .../config-internal.sh | 11 ++ .../swift/swift-object-replicator/start.sh | 14 ++ .../swift-object-server/config-external.sh | 13 ++ .../swift-object-server/config-internal.sh | 11 ++ .../start.sh | 3 +- .../swift-object-updater/config-external.sh | 13 ++ .../swift-object-updater/config-internal.sh | 11 ++ .../swift/swift-object-updater/start.sh | 14 ++ .../swift/swift-object/config-external.sh | 10 -- .../swift/swift-object/config-internal.sh | 29 ---- .../swift-proxy-server/config-external.sh | 2 +- .../swift-proxy-server/config-internal.sh | 148 +++++++++++++++++- .../common/swift/swift-proxy-server/start.sh | 3 +- docs/minimal-environment-vars.md | 129 +++++++++++++-- tools/genenv | 120 +++++++++++++- 93 files changed, 1051 insertions(+), 163 deletions(-) create mode 100644 compose/swift-proxy.yml create mode 100644 compose/swift-storage.yml rename docker/centos/binary/swift/{swift-account => swift-account-server}/Dockerfile (68%) rename docker/centos/binary/swift/{swift-account => swift-account-server}/build (100%) create mode 120000 docker/centos/binary/swift/swift-account-server/config-external.sh create mode 120000 docker/centos/binary/swift/swift-account-server/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-account-server/start.sh delete mode 120000 docker/centos/binary/swift/swift-account/config-external.sh delete mode 120000 docker/centos/binary/swift/swift-account/config-internal.sh delete mode 120000 docker/centos/binary/swift/swift-account/start.sh create mode 120000 docker/centos/binary/swift/swift-base/build-swift-ring.py create mode 120000 docker/centos/binary/swift/swift-base/config-swift.sh rename docker/centos/binary/swift/{swift-container => swift-container-server}/Dockerfile (67%) rename docker/centos/binary/swift/{swift-container => swift-container-server}/build (100%) create mode 120000 docker/centos/binary/swift/swift-container-server/config-external.sh create mode 120000 docker/centos/binary/swift/swift-container-server/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-container-server/start.sh delete mode 120000 docker/centos/binary/swift/swift-container/config-external.sh delete mode 120000 docker/centos/binary/swift/swift-container/config-internal.sh delete mode 120000 docker/centos/binary/swift/swift-container/start.sh create mode 100644 docker/centos/binary/swift/swift-data/Dockerfile rename docker/centos/binary/swift/{swift-object => swift-data}/build (100%) rename docker/centos/binary/swift/{swift-object => swift-object-auditor}/Dockerfile (58%) create mode 120000 docker/centos/binary/swift/swift-object-auditor/build create mode 120000 docker/centos/binary/swift/swift-object-auditor/config-external.sh create mode 120000 docker/centos/binary/swift/swift-object-auditor/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-object-auditor/start.sh create mode 100644 docker/centos/binary/swift/swift-object-base/Dockerfile create mode 120000 docker/centos/binary/swift/swift-object-base/build create mode 120000 docker/centos/binary/swift/swift-object-base/config-swift-object.sh create mode 100644 docker/centos/binary/swift/swift-object-expirer/Dockerfile create mode 120000 docker/centos/binary/swift/swift-object-expirer/build create mode 120000 docker/centos/binary/swift/swift-object-expirer/config-external.sh create mode 120000 docker/centos/binary/swift/swift-object-expirer/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-object-expirer/start.sh create mode 100644 docker/centos/binary/swift/swift-object-replicator/Dockerfile create mode 120000 docker/centos/binary/swift/swift-object-replicator/build create mode 120000 docker/centos/binary/swift/swift-object-replicator/config-external.sh create mode 120000 docker/centos/binary/swift/swift-object-replicator/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-object-replicator/start.sh create mode 100644 docker/centos/binary/swift/swift-object-server/Dockerfile create mode 120000 docker/centos/binary/swift/swift-object-server/build create mode 120000 docker/centos/binary/swift/swift-object-server/config-external.sh create mode 120000 docker/centos/binary/swift/swift-object-server/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-object-server/start.sh create mode 100644 docker/centos/binary/swift/swift-object-updater/Dockerfile create mode 120000 docker/centos/binary/swift/swift-object-updater/build create mode 120000 docker/centos/binary/swift/swift-object-updater/config-external.sh create mode 120000 docker/centos/binary/swift/swift-object-updater/config-internal.sh create mode 120000 docker/centos/binary/swift/swift-object-updater/start.sh delete mode 120000 docker/centos/binary/swift/swift-object/config-external.sh delete mode 120000 docker/centos/binary/swift/swift-object/config-internal.sh delete mode 120000 docker/centos/binary/swift/swift-object/start.sh create mode 100644 docker/common/swift/swift-account-server/config-external.sh create mode 100755 docker/common/swift/swift-account-server/config-internal.sh create mode 100755 docker/common/swift/swift-account-server/start.sh delete mode 100755 docker/common/swift/swift-account/config-external.sh delete mode 100755 docker/common/swift/swift-account/config-internal.sh create mode 100644 docker/common/swift/swift-base/build-swift-ring.py create mode 100755 docker/common/swift/swift-base/config-swift.sh create mode 100644 docker/common/swift/swift-container-server/config-external.sh create mode 100755 docker/common/swift/swift-container-server/config-internal.sh rename docker/common/swift/{swift-container => swift-container-server}/start.sh (82%) delete mode 100755 docker/common/swift/swift-container/config-external.sh delete mode 100755 docker/common/swift/swift-container/config-internal.sh create mode 100644 docker/common/swift/swift-object-auditor/config-external.sh create mode 100755 docker/common/swift/swift-object-auditor/config-internal.sh rename docker/common/swift/{swift-account => swift-object-auditor}/start.sh (70%) create mode 100644 docker/common/swift/swift-object-base/config-swift-object.sh create mode 100644 docker/common/swift/swift-object-expirer/config-external.sh create mode 100755 docker/common/swift/swift-object-expirer/config-internal.sh create mode 100755 docker/common/swift/swift-object-expirer/start.sh create mode 100644 docker/common/swift/swift-object-replicator/config-external.sh create mode 100755 docker/common/swift/swift-object-replicator/config-internal.sh create mode 100755 docker/common/swift/swift-object-replicator/start.sh create mode 100644 docker/common/swift/swift-object-server/config-external.sh create mode 100755 docker/common/swift/swift-object-server/config-internal.sh rename docker/common/swift/{swift-object => swift-object-server}/start.sh (82%) create mode 100644 docker/common/swift/swift-object-updater/config-external.sh create mode 100755 docker/common/swift/swift-object-updater/config-internal.sh create mode 100755 docker/common/swift/swift-object-updater/start.sh delete mode 100755 docker/common/swift/swift-object/config-external.sh delete mode 100755 docker/common/swift/swift-object/config-internal.sh mode change 100755 => 100644 tools/genenv diff --git a/compose/swift-proxy.yml b/compose/swift-proxy.yml new file mode 100644 index 0000000000..0f59e7bdbb --- /dev/null +++ b/compose/swift-proxy.yml @@ -0,0 +1,7 @@ +swiftproxyserver: + image: kollaglue/centos-rdo-swift-proxy-server:latest + name: swiftproxyserver + restart: always + net: host + env_file: + - openstack.env diff --git a/compose/swift-storage.yml b/compose/swift-storage.yml new file mode 100644 index 0000000000..e790a5e718 --- /dev/null +++ b/compose/swift-storage.yml @@ -0,0 +1,73 @@ +swiftdata: + image: kollaglue/centos-rdo-swift-data:latest + name: swiftdata + +swiftobjectserver: + image: kollaglue/centos-rdo-swift-object-server:latest + name: swiftobjectserver + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftobjectauditor: + image: kollaglue/centos-rdo-swift-object-auditor:latest + name: swiftobjectauditor + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftobjectexpirer: + image: kollaglue/centos-rdo-swift-object-expirer:latest + name: swiftobjectexpirer + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftobjectreplicator: + image: kollaglue/centos-rdo-swift-object-replicator:latest + name: swiftobjectreplicator + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftobjectupdater: + image: kollaglue/centos-rdo-swift-object-updater:latest + name: swiftobjectupdater + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftcontainerserver: + image: kollaglue/centos-rdo-swift-container-server:latest + name: swiftcontainerserver + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata + +swiftaccountserver: + image: kollaglue/centos-rdo-swift-account-server:latest + name: swiftaccountserver + restart: always + net: host + env_file: + - openstack.env + volumes_from: + - swiftdata diff --git a/docker/centos/binary/swift/swift-account/Dockerfile b/docker/centos/binary/swift/swift-account-server/Dockerfile similarity index 68% rename from docker/centos/binary/swift/swift-account/Dockerfile rename to docker/centos/binary/swift/swift-account-server/Dockerfile index 4c407ea820..b60a267a85 100644 --- a/docker/centos/binary/swift/swift-account/Dockerfile +++ b/docker/centos/binary/swift/swift-account-server/Dockerfile @@ -1,8 +1,11 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) -COPY ./start.sh /start.sh +RUN yum -y install \ + openstack-swift-account \ + && yum clean all +COPY start.sh / COPY config-internal.sh config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-account/build b/docker/centos/binary/swift/swift-account-server/build similarity index 100% rename from docker/centos/binary/swift/swift-account/build rename to docker/centos/binary/swift/swift-account-server/build diff --git a/docker/centos/binary/swift/swift-account-server/config-external.sh b/docker/centos/binary/swift/swift-account-server/config-external.sh new file mode 120000 index 0000000000..93a15ca3b8 --- /dev/null +++ b/docker/centos/binary/swift/swift-account-server/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-account-server/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-account-server/config-internal.sh b/docker/centos/binary/swift/swift-account-server/config-internal.sh new file mode 120000 index 0000000000..93174deb08 --- /dev/null +++ b/docker/centos/binary/swift/swift-account-server/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-account-server/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-account-server/start.sh b/docker/centos/binary/swift/swift-account-server/start.sh new file mode 120000 index 0000000000..acf6b18d74 --- /dev/null +++ b/docker/centos/binary/swift/swift-account-server/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-account-server/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-account/config-external.sh b/docker/centos/binary/swift/swift-account/config-external.sh deleted file mode 120000 index e7c6637fe4..0000000000 --- a/docker/centos/binary/swift/swift-account/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-account/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-account/config-internal.sh b/docker/centos/binary/swift/swift-account/config-internal.sh deleted file mode 120000 index 48504d07e0..0000000000 --- a/docker/centos/binary/swift/swift-account/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-account/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-account/start.sh b/docker/centos/binary/swift/swift-account/start.sh deleted file mode 120000 index f9e76aa5ba..0000000000 --- a/docker/centos/binary/swift/swift-account/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-account/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-base/Dockerfile b/docker/centos/binary/swift/swift-base/Dockerfile index 59600a23d4..d31f9ebf6b 100644 --- a/docker/centos/binary/swift/swift-base/Dockerfile +++ b/docker/centos/binary/swift/swift-base/Dockerfile @@ -1,8 +1,8 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) -RUN yum -y install openstack-utils openstack-swift && yum clean all +RUN yum -y install openstack-swift && yum clean all + +COPY config-swift.sh build-swift-ring.py /opt/kolla/ -# These will come after we sort out start time config RUN mkdir /opt/swift -config-swift.sh /opt/swift/config-swift.sh diff --git a/docker/centos/binary/swift/swift-base/build-swift-ring.py b/docker/centos/binary/swift/swift-base/build-swift-ring.py new file mode 120000 index 0000000000..325bf93c5b --- /dev/null +++ b/docker/centos/binary/swift/swift-base/build-swift-ring.py @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-base/build-swift-ring.py \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-base/config-swift.sh b/docker/centos/binary/swift/swift-base/config-swift.sh new file mode 120000 index 0000000000..fb883f4829 --- /dev/null +++ b/docker/centos/binary/swift/swift-base/config-swift.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-base/config-swift.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container/Dockerfile b/docker/centos/binary/swift/swift-container-server/Dockerfile similarity index 67% rename from docker/centos/binary/swift/swift-container/Dockerfile rename to docker/centos/binary/swift/swift-container-server/Dockerfile index 4c407ea820..e88e1ebcc3 100644 --- a/docker/centos/binary/swift/swift-container/Dockerfile +++ b/docker/centos/binary/swift/swift-container-server/Dockerfile @@ -1,8 +1,11 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) -COPY ./start.sh /start.sh +RUN yum -y install \ + openstack-swift-container \ + && yum clean all +COPY start.sh / COPY config-internal.sh config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-container/build b/docker/centos/binary/swift/swift-container-server/build similarity index 100% rename from docker/centos/binary/swift/swift-container/build rename to docker/centos/binary/swift/swift-container-server/build diff --git a/docker/centos/binary/swift/swift-container-server/config-external.sh b/docker/centos/binary/swift/swift-container-server/config-external.sh new file mode 120000 index 0000000000..8fa814ca71 --- /dev/null +++ b/docker/centos/binary/swift/swift-container-server/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-container-server/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container-server/config-internal.sh b/docker/centos/binary/swift/swift-container-server/config-internal.sh new file mode 120000 index 0000000000..3b3c7fcdf1 --- /dev/null +++ b/docker/centos/binary/swift/swift-container-server/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-container-server/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container-server/start.sh b/docker/centos/binary/swift/swift-container-server/start.sh new file mode 120000 index 0000000000..b7d3cd9fc1 --- /dev/null +++ b/docker/centos/binary/swift/swift-container-server/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-container-server/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container/config-external.sh b/docker/centos/binary/swift/swift-container/config-external.sh deleted file mode 120000 index efc76b7af4..0000000000 --- a/docker/centos/binary/swift/swift-container/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-container/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container/config-internal.sh b/docker/centos/binary/swift/swift-container/config-internal.sh deleted file mode 120000 index 789a210a3f..0000000000 --- a/docker/centos/binary/swift/swift-container/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-container/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-container/start.sh b/docker/centos/binary/swift/swift-container/start.sh deleted file mode 120000 index dc3c88490b..0000000000 --- a/docker/centos/binary/swift/swift-container/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-container/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-data/Dockerfile b/docker/centos/binary/swift/swift-data/Dockerfile new file mode 100644 index 0000000000..ab675045c8 --- /dev/null +++ b/docker/centos/binary/swift/swift-data/Dockerfile @@ -0,0 +1,13 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +# NOTE(pbourke): This is emulating the Swift "all-in-one" setups where there are 3 disks/partitions +# on which to mirror data. This is extremely inefficient and is really only to prove everything +# works in an AIO setup. For production deploys the Ansible provisioned setup should be used. +VOLUME [ "/srv/node/sdb1" ] +VOLUME [ "/srv/node/sdb2" ] +VOLUME [ "/srv/node/sdb3" ] + +# Command needed to start the data container. +# Note: data containers do not need to be persistent. +CMD ["/bin/true"] diff --git a/docker/centos/binary/swift/swift-object/build b/docker/centos/binary/swift/swift-data/build similarity index 100% rename from docker/centos/binary/swift/swift-object/build rename to docker/centos/binary/swift/swift-data/build diff --git a/docker/centos/binary/swift/swift-object/Dockerfile b/docker/centos/binary/swift/swift-object-auditor/Dockerfile similarity index 58% rename from docker/centos/binary/swift/swift-object/Dockerfile rename to docker/centos/binary/swift/swift-object-auditor/Dockerfile index 4c407ea820..9cbbd53c0e 100644 --- a/docker/centos/binary/swift/swift-object/Dockerfile +++ b/docker/centos/binary/swift/swift-object-auditor/Dockerfile @@ -1,8 +1,7 @@ -FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base:%%KOLLA_TAG%% +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-object-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) -COPY ./start.sh /start.sh - +COPY start.sh / COPY config-internal.sh config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-object-auditor/build b/docker/centos/binary/swift/swift-object-auditor/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-auditor/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-auditor/config-external.sh b/docker/centos/binary/swift/swift-object-auditor/config-external.sh new file mode 120000 index 0000000000..1adf26bcb3 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-auditor/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-auditor/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-auditor/config-internal.sh b/docker/centos/binary/swift/swift-object-auditor/config-internal.sh new file mode 120000 index 0000000000..e3802f38d6 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-auditor/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-auditor/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-auditor/start.sh b/docker/centos/binary/swift/swift-object-auditor/start.sh new file mode 120000 index 0000000000..5ef3165595 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-auditor/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-auditor/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-base/Dockerfile b/docker/centos/binary/swift/swift-object-base/Dockerfile new file mode 100644 index 0000000000..c41502e6c9 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-base/Dockerfile @@ -0,0 +1,8 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum -y install \ + openstack-swift-object \ + && yum clean all + +COPY config-swift-object.sh /opt/kolla/ diff --git a/docker/centos/binary/swift/swift-object-base/build b/docker/centos/binary/swift/swift-object-base/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-base/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-base/config-swift-object.sh b/docker/centos/binary/swift/swift-object-base/config-swift-object.sh new file mode 120000 index 0000000000..a289b4d0de --- /dev/null +++ b/docker/centos/binary/swift/swift-object-base/config-swift-object.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-base/config-swift-object.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-expirer/Dockerfile b/docker/centos/binary/swift/swift-object-expirer/Dockerfile new file mode 100644 index 0000000000..d1a79c6ab9 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-expirer/Dockerfile @@ -0,0 +1,12 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-object-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum -y install \ + openstack-swift-proxy \ + openstack-swift-container \ + && yum clean all + +COPY start.sh / +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-object-expirer/build b/docker/centos/binary/swift/swift-object-expirer/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-expirer/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-expirer/config-external.sh b/docker/centos/binary/swift/swift-object-expirer/config-external.sh new file mode 120000 index 0000000000..7f8d3e37e6 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-expirer/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-expirer/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-expirer/config-internal.sh b/docker/centos/binary/swift/swift-object-expirer/config-internal.sh new file mode 120000 index 0000000000..ebd7f0f3e8 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-expirer/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-expirer/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-expirer/start.sh b/docker/centos/binary/swift/swift-object-expirer/start.sh new file mode 120000 index 0000000000..3b9a9c3ee9 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-expirer/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-expirer/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-replicator/Dockerfile b/docker/centos/binary/swift/swift-object-replicator/Dockerfile new file mode 100644 index 0000000000..9cbbd53c0e --- /dev/null +++ b/docker/centos/binary/swift/swift-object-replicator/Dockerfile @@ -0,0 +1,7 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-object-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-object-replicator/build b/docker/centos/binary/swift/swift-object-replicator/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-replicator/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-replicator/config-external.sh b/docker/centos/binary/swift/swift-object-replicator/config-external.sh new file mode 120000 index 0000000000..69e793df4a --- /dev/null +++ b/docker/centos/binary/swift/swift-object-replicator/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-replicator/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-replicator/config-internal.sh b/docker/centos/binary/swift/swift-object-replicator/config-internal.sh new file mode 120000 index 0000000000..f2a7e134ea --- /dev/null +++ b/docker/centos/binary/swift/swift-object-replicator/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-replicator/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-replicator/start.sh b/docker/centos/binary/swift/swift-object-replicator/start.sh new file mode 120000 index 0000000000..da27b63123 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-replicator/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-replicator/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-server/Dockerfile b/docker/centos/binary/swift/swift-object-server/Dockerfile new file mode 100644 index 0000000000..9cbbd53c0e --- /dev/null +++ b/docker/centos/binary/swift/swift-object-server/Dockerfile @@ -0,0 +1,7 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-object-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-object-server/build b/docker/centos/binary/swift/swift-object-server/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-server/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-server/config-external.sh b/docker/centos/binary/swift/swift-object-server/config-external.sh new file mode 120000 index 0000000000..a9213fffa1 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-server/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-server/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-server/config-internal.sh b/docker/centos/binary/swift/swift-object-server/config-internal.sh new file mode 120000 index 0000000000..24821e4d2d --- /dev/null +++ b/docker/centos/binary/swift/swift-object-server/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-server/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-server/start.sh b/docker/centos/binary/swift/swift-object-server/start.sh new file mode 120000 index 0000000000..7e47f8018f --- /dev/null +++ b/docker/centos/binary/swift/swift-object-server/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-server/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-updater/Dockerfile b/docker/centos/binary/swift/swift-object-updater/Dockerfile new file mode 100644 index 0000000000..9cbbd53c0e --- /dev/null +++ b/docker/centos/binary/swift/swift-object-updater/Dockerfile @@ -0,0 +1,7 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-object-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY start.sh / +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/binary/swift/swift-object-updater/build b/docker/centos/binary/swift/swift-object-updater/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-updater/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-updater/config-external.sh b/docker/centos/binary/swift/swift-object-updater/config-external.sh new file mode 120000 index 0000000000..94ba9e60c6 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-updater/config-external.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-updater/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-updater/config-internal.sh b/docker/centos/binary/swift/swift-object-updater/config-internal.sh new file mode 120000 index 0000000000..fb1e9bdff3 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-updater/config-internal.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-updater/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object-updater/start.sh b/docker/centos/binary/swift/swift-object-updater/start.sh new file mode 120000 index 0000000000..2e78e5c095 --- /dev/null +++ b/docker/centos/binary/swift/swift-object-updater/start.sh @@ -0,0 +1 @@ +../../../../../docker/common/swift/swift-object-updater/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object/config-external.sh b/docker/centos/binary/swift/swift-object/config-external.sh deleted file mode 120000 index f4256fa63d..0000000000 --- a/docker/centos/binary/swift/swift-object/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-object/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object/config-internal.sh b/docker/centos/binary/swift/swift-object/config-internal.sh deleted file mode 120000 index 3f8ba1de93..0000000000 --- a/docker/centos/binary/swift/swift-object/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-object/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-object/start.sh b/docker/centos/binary/swift/swift-object/start.sh deleted file mode 120000 index 690be2540e..0000000000 --- a/docker/centos/binary/swift/swift-object/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/swift/swift-object/start.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-proxy-server/Dockerfile b/docker/centos/binary/swift/swift-proxy-server/Dockerfile index 4c407ea820..4f8b27b491 100644 --- a/docker/centos/binary/swift/swift-proxy-server/Dockerfile +++ b/docker/centos/binary/swift/swift-proxy-server/Dockerfile @@ -1,6 +1,8 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) +RUN yum -y install openstack-swift-proxy && yum clean all + COPY ./start.sh /start.sh COPY config-internal.sh config-external.sh /opt/kolla/ diff --git a/docker/centos/binary/swift/swift-proxy-server/config-external.sh b/docker/centos/binary/swift/swift-proxy-server/config-external.sh index 04e1c640f6..178516af5f 120000 --- a/docker/centos/binary/swift/swift-proxy-server/config-external.sh +++ b/docker/centos/binary/swift/swift-proxy-server/config-external.sh @@ -1 +1 @@ -../../../../common/swift/swift-proxy-server/config-external.sh \ No newline at end of file +../../../../../docker/common/swift/swift-proxy-server/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-proxy-server/config-internal.sh b/docker/centos/binary/swift/swift-proxy-server/config-internal.sh index f95866fdd5..a33b6be4f4 120000 --- a/docker/centos/binary/swift/swift-proxy-server/config-internal.sh +++ b/docker/centos/binary/swift/swift-proxy-server/config-internal.sh @@ -1 +1 @@ -../../../../common/swift/swift-proxy-server/config-internal.sh \ No newline at end of file +../../../../../docker/common/swift/swift-proxy-server/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/swift/swift-proxy-server/start.sh b/docker/centos/binary/swift/swift-proxy-server/start.sh index 6a5581a46c..63d0ec91af 120000 --- a/docker/centos/binary/swift/swift-proxy-server/start.sh +++ b/docker/centos/binary/swift/swift-proxy-server/start.sh @@ -1 +1 @@ -../../../../common/swift/swift-proxy-server/start.sh \ No newline at end of file +../../../../../docker/common/swift/swift-proxy-server/start.sh \ No newline at end of file diff --git a/docker/common/swift/swift-account-server/config-external.sh b/docker/common/swift/swift-account-server/config-external.sh new file mode 100644 index 0000000000..fe20dcb92c --- /dev/null +++ b/docker/common/swift/swift-account-server/config-external.sh @@ -0,0 +1,13 @@ +#!/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-server.conf ]]; then + cp /opt/kolla/swift/account-server.conf /etc/swift/ + chown swift: /etc/swift/account-server.conf + chmod 0640 /etc/swift/account-server.conf +fi diff --git a/docker/common/swift/swift-account-server/config-internal.sh b/docker/common/swift/swift-account-server/config-internal.sh new file mode 100755 index 0000000000..461020fd08 --- /dev/null +++ b/docker/common/swift/swift-account-server/config-internal.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +set -e + +CMD="/usr/bin/swift-account-server" +ARGS="/etc/swift/account-server.conf --verbose" + +. /opt/kolla/config-swift.sh + +check_required_vars \ + SWIFT_ACCOUNT_SVC_BIND_IP \ + SWIFT_ACCOUNT_SVC_BIND_PORT \ + SWIFT_ACCOUNT_SVC_DEVICES \ + SWIFT_ACCOUNT_SVC_MOUNT_CHECK \ + SWIFT_ACCOUNT_SVC_RING_DEVICES \ + SWIFT_ACCOUNT_SVC_RING_HOSTS \ + SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS \ + SWIFT_ACCOUNT_SVC_RING_NAME \ + SWIFT_ACCOUNT_SVC_RING_PART_POWER \ + SWIFT_ACCOUNT_SVC_RING_REPLICAS \ + SWIFT_ACCOUNT_SVC_RING_WEIGHTS \ + SWIFT_ACCOUNT_SVC_RING_ZONES \ + SWIFT_DIR \ + SWIFT_USER + +exec $CMD $ARGS + +cfg=/etc/swift/account-server.conf + +# [DEFAULT] +crudini --set $cfg DEFAULT bind_ip "${SWIFT_ACCOUNT_SVC_BIND_IP}" +crudini --set $cfg DEFAULT bind_port "${SWIFT_ACCOUNT_SVC_BIND_PORT}" +crudini --set $cfg DEFAULT user "${SWIFT_USER}" +crudini --set $cfg DEFAULT swift_dir "${SWIFT_DIR}" +crudini --set $cfg DEFAULT devices "${SWIFT_ACCOUNT_SVC_DEVICES}" +crudini --set $cfg DEFAULT mount_check "${SWIFT_ACCOUNT_SVC_MOUNT_CHECK}" + +# Create swift user and group if they don't exist +id -u swift &>/dev/null || useradd --user-group swift + +# Ensure proper ownership of the mount point directory structure +chown -R swift:swift /srv/node + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_ACCOUNT_SVC_RING_NAME} \ + -p ${SWIFT_ACCOUNT_SVC_RING_PART_POWER} \ + -r ${SWIFT_ACCOUNT_SVC_RING_REPLICAS} \ + -m ${SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_ACCOUNT_SVC_RING_HOSTS} \ + -w ${SWIFT_ACCOUNT_SVC_RING_WEIGHTS} \ + -d ${SWIFT_ACCOUNT_SVC_RING_DEVICES} \ + -z ${SWIFT_ACCOUNT_SVC_RING_ZONES} + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-account-server/start.sh b/docker/common/swift/swift-account-server/start.sh new file mode 100755 index 0000000000..96ce90d072 --- /dev/null +++ b/docker/common/swift/swift-account-server/start.sh @@ -0,0 +1,14 @@ +#!/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 + +# Config-internal script exec out of this function, it does not return here. +set_configs + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-account/config-external.sh b/docker/common/swift/swift-account/config-external.sh deleted file mode 100755 index 2de263dda0..0000000000 --- a/docker/common/swift/swift-account/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift-account/swift.conf" -TARGET="/etc/swift/swift.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker/common/swift/swift-account/config-internal.sh b/docker/common/swift/swift-account/config-internal.sh deleted file mode 100755 index c0531f46e3..0000000000 --- a/docker/common/swift/swift-account/config-internal.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -check_required_vars KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - SWIFT_ADMIN_PASSWORD -fail_unless_db -fail_unless_os_service_running keystone - -if ! [ "$SWIFT_DB_PASSWORD" ]; then - SWIFT_DB_PASSWORD=$(openssl rand -hex 15) - export SWIFT_DB_PASSWORD -fi - -sh /opt/swift/config-swift.sh account-server - -mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql </dev/null || useradd --user-group swift + +# Ensure proper ownership of the mount point directory structure +chown -R swift:swift /srv/node + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_CONTAINER_SVC_RING_NAME} \ + -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \ + -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \ + -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \ + -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \ + -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \ + -z ${SWIFT_CONTAINER_SVC_RING_ZONES} + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-container/start.sh b/docker/common/swift/swift-container-server/start.sh similarity index 82% rename from docker/common/swift/swift-container/start.sh rename to docker/common/swift/swift-container-server/start.sh index e3187b3672..40ec939605 100755 --- a/docker/common/swift/swift-container/start.sh +++ b/docker/common/swift/swift-container-server/start.sh @@ -1,8 +1,9 @@ #!/bin/bash + set -o errexit CMD="/usr/bin/swift-container-server" -ARGS="" +ARGS="/etc/swift/container-server.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh diff --git a/docker/common/swift/swift-container/config-external.sh b/docker/common/swift/swift-container/config-external.sh deleted file mode 100755 index 23c9bb4efb..0000000000 --- a/docker/common/swift/swift-container/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift-container/swift.conf" -TARGET="/etc/swift/swift.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker/common/swift/swift-container/config-internal.sh b/docker/common/swift/swift-container/config-internal.sh deleted file mode 100755 index a11c10561c..0000000000 --- a/docker/common/swift/swift-container/config-internal.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -check_required_vars KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - SWIFT_ADMIN_PASSWORD -fail_unless_db -fail_unless_os_service_running keystone - -if ! [ "$SWIFT_DB_PASSWORD" ]; then - SWIFT_DB_PASSWORD=$(openssl rand -hex 15) - export SWIFT_DB_PASSWORD -fi - -sh /opt/swift/config-swift.sh container - -mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql </dev/null || useradd --user-group swift + +# Ensure proper ownership of the mount point directory structure +chown -R swift:swift /srv/node + +# TODO(pbourke): does this need to be on a data vol? +mkdir -p /var/cache/swift +chown -R swift:swift /var/cache/swift + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_OBJECT_SVC_RING_NAME} \ + -p ${SWIFT_OBJECT_SVC_RING_PART_POWER} \ + -r ${SWIFT_OBJECT_SVC_RING_REPLICAS} \ + -m ${SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_OBJECT_SVC_RING_HOSTS} \ + -w ${SWIFT_OBJECT_SVC_RING_WEIGHTS} \ + -d ${SWIFT_OBJECT_SVC_RING_DEVICES} \ + -z ${SWIFT_OBJECT_SVC_RING_ZONES} + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_CONTAINER_SVC_RING_NAME} \ + -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \ + -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \ + -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \ + -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \ + -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \ + -z ${SWIFT_CONTAINER_SVC_RING_ZONES} diff --git a/docker/common/swift/swift-object-expirer/config-external.sh b/docker/common/swift/swift-object-expirer/config-external.sh new file mode 100644 index 0000000000..ca4b35499c --- /dev/null +++ b/docker/common/swift/swift-object-expirer/config-external.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f /opt/kolla/swift/swift.conf ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/ + chown swift: /opt/kolla/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f /opt/kolla/swift/object-expirer.conf ]]; then + cp /opt/kolla/swift/object-expirer.conf /etc/swift/ + chown swift: /opt/kolla/swift/object-expirer.conf + chmod 0640 /etc/swift/object-expirer.conf +fi diff --git a/docker/common/swift/swift-object-expirer/config-internal.sh b/docker/common/swift/swift-object-expirer/config-internal.sh new file mode 100755 index 0000000000..8b3cac0dc5 --- /dev/null +++ b/docker/common/swift/swift-object-expirer/config-internal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +CMD="/usr/bin/swift-object-expirer" +ARGS="/etc/swift/object-server.conf --verbose" + +. /opt/kolla/config-swift.sh +. /opt/kolla/config-swift-object.sh + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object-expirer/start.sh b/docker/common/swift/swift-object-expirer/start.sh new file mode 100755 index 0000000000..e4cfa73694 --- /dev/null +++ b/docker/common/swift/swift-object-expirer/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-expirer" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Config-internal script exec out of this function, it does not return here. +set_configs + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object-replicator/config-external.sh b/docker/common/swift/swift-object-replicator/config-external.sh new file mode 100644 index 0000000000..fdf92592c8 --- /dev/null +++ b/docker/common/swift/swift-object-replicator/config-external.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f /opt/kolla/swift/swift.conf ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/ + chown swift: /opt/kolla/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f /opt/kolla/swift/object-server.conf ]]; then + cp /opt/kolla/swift/object-server.conf /etc/swift/ + chown swift: /opt/kolla/swift/object-server.conf + chmod 0640 /etc/swift/object-server.conf +fi diff --git a/docker/common/swift/swift-object-replicator/config-internal.sh b/docker/common/swift/swift-object-replicator/config-internal.sh new file mode 100755 index 0000000000..101fa90f80 --- /dev/null +++ b/docker/common/swift/swift-object-replicator/config-internal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +CMD="/usr/bin/swift-object-replicator" +ARGS="/etc/swift/object-server.conf --verbose" + +. /opt/kolla/config-swift.sh +. /opt/kolla/config-swift-object.sh + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object-replicator/start.sh b/docker/common/swift/swift-object-replicator/start.sh new file mode 100755 index 0000000000..e6049717a4 --- /dev/null +++ b/docker/common/swift/swift-object-replicator/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-replicator" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Config-internal script exec out of this function, it does not return here. +set_configs + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object-server/config-external.sh b/docker/common/swift/swift-object-server/config-external.sh new file mode 100644 index 0000000000..fdf92592c8 --- /dev/null +++ b/docker/common/swift/swift-object-server/config-external.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ -f /opt/kolla/swift/swift.conf ]]; then + cp /opt/kolla/swift/swift.conf /etc/swift/ + chown swift: /opt/kolla/swift/swift.conf + chmod 0640 /etc/swift/swift.conf +fi + +if [[ -f /opt/kolla/swift/object-server.conf ]]; then + cp /opt/kolla/swift/object-server.conf /etc/swift/ + chown swift: /opt/kolla/swift/object-server.conf + chmod 0640 /etc/swift/object-server.conf +fi diff --git a/docker/common/swift/swift-object-server/config-internal.sh b/docker/common/swift/swift-object-server/config-internal.sh new file mode 100755 index 0000000000..fbee943836 --- /dev/null +++ b/docker/common/swift/swift-object-server/config-internal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +CMD="/usr/bin/swift-object-server" +ARGS="/etc/swift/object-server.conf --verbose" + +. /opt/kolla/config-swift.sh +. /opt/kolla/config-swift-object.sh + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object/start.sh b/docker/common/swift/swift-object-server/start.sh similarity index 82% rename from docker/common/swift/swift-object/start.sh rename to docker/common/swift/swift-object-server/start.sh index abda77dbea..7b9f022f29 100755 --- a/docker/common/swift/swift-object/start.sh +++ b/docker/common/swift/swift-object-server/start.sh @@ -1,8 +1,9 @@ #!/bin/bash + set -o errexit CMD="/usr/bin/swift-object-server" -ARGS="" +ARGS="/etc/swift/object-server.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh diff --git a/docker/common/swift/swift-object-updater/config-external.sh b/docker/common/swift/swift-object-updater/config-external.sh new file mode 100644 index 0000000000..ebd1ad9a9d --- /dev/null +++ b/docker/common/swift/swift-object-updater/config-external.sh @@ -0,0 +1,13 @@ +#!/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/object-server.conf ]]; then + cp /opt/kolla/swift/object-server.conf /etc/swift/ + chown swift: /etc/swift/object-server.conf + chmod 0640 /etc/swift/object-server.conf +fi diff --git a/docker/common/swift/swift-object-updater/config-internal.sh b/docker/common/swift/swift-object-updater/config-internal.sh new file mode 100755 index 0000000000..accaea6c7f --- /dev/null +++ b/docker/common/swift/swift-object-updater/config-internal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +CMD="/usr/bin/swift-object-updater" +ARGS="/etc/swift/object-server.conf --verbose" + +. /opt/kolla/config-swift.sh +. /opt/kolla/config-swift-object.sh + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object-updater/start.sh b/docker/common/swift/swift-object-updater/start.sh new file mode 100755 index 0000000000..e3b111e79b --- /dev/null +++ b/docker/common/swift/swift-object-updater/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/swift-object-updater" +ARGS="/etc/swift/object-server.conf --verbose" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Config-internal script exec out of this function, it does not return here. +set_configs + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-object/config-external.sh b/docker/common/swift/swift-object/config-external.sh deleted file mode 100755 index d56baf1520..0000000000 --- a/docker/common/swift/swift-object/config-external.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -SOURCE="/opt/kolla/swift-object/swift.conf" -TARGET="/etc/swift/swift.conf" -OWNER="swift" - -if [[ -f "$SOURCE" ]]; then - cp $SOURCE $TARGET - chown ${OWNER}: $TARGET - chmod 0644 $TARGET -fi diff --git a/docker/common/swift/swift-object/config-internal.sh b/docker/common/swift/swift-object/config-internal.sh deleted file mode 100755 index 5931e89d6c..0000000000 --- a/docker/common/swift/swift-object/config-internal.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -check_required_vars KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - SWIFT_ADMIN_PASSWORD -fail_unless_db -fail_unless_os_service_running keystone - -if ! [ "$SWIFT_DB_PASSWORD" ]; then - SWIFT_DB_PASSWORD=$(openssl rand -hex 15) - export SWIFT_DB_PASSWORD -fi - -sh /opt/swift/config-swift.sh engine - -mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql </dev/null || useradd --user-group swift + +# TODO(pbourke): should these go into the Dockerfile instead? +# TODO(pbourke): do we need a data vol for these? +mkdir -p ${SWIFT_PROXY_SIGNING_DIR} +chown swift: ${SWIFT_PROXY_SIGNING_DIR} +chmod 0700 ${SWIFT_PROXY_SIGNING_DIR} + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_OBJECT_SVC_RING_NAME} \ + -p ${SWIFT_OBJECT_SVC_RING_PART_POWER} \ + -r ${SWIFT_OBJECT_SVC_RING_REPLICAS} \ + -m ${SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_OBJECT_SVC_RING_HOSTS} \ + -w ${SWIFT_OBJECT_SVC_RING_WEIGHTS} \ + -d ${SWIFT_OBJECT_SVC_RING_DEVICES} \ + -z ${SWIFT_OBJECT_SVC_RING_ZONES} + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_ACCOUNT_SVC_RING_NAME} \ + -p ${SWIFT_ACCOUNT_SVC_RING_PART_POWER} \ + -r ${SWIFT_ACCOUNT_SVC_RING_REPLICAS} \ + -m ${SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_ACCOUNT_SVC_RING_HOSTS} \ + -w ${SWIFT_ACCOUNT_SVC_RING_WEIGHTS} \ + -d ${SWIFT_ACCOUNT_SVC_RING_DEVICES} \ + -z ${SWIFT_ACCOUNT_SVC_RING_ZONES} + +python /opt/kolla/build-swift-ring.py \ + -f ${SWIFT_CONTAINER_SVC_RING_NAME} \ + -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \ + -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \ + -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \ + -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \ + -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \ + -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \ + -z ${SWIFT_CONTAINER_SVC_RING_ZONES} + +exec $CMD $ARGS diff --git a/docker/common/swift/swift-proxy-server/start.sh b/docker/common/swift/swift-proxy-server/start.sh index 8957b50521..c1b5b29cdb 100755 --- a/docker/common/swift/swift-proxy-server/start.sh +++ b/docker/common/swift/swift-proxy-server/start.sh @@ -1,8 +1,9 @@ #!/bin/bash + set -o errexit CMD="/usr/bin/swift-proxy-server" -ARGS="" +ARGS="/etc/swift/proxy-server.conf --verbose" # Loading common functions. source /opt/kolla/kolla-common.sh diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index 83cd6a5ef1..d9d41c4818 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -510,31 +510,134 @@ In order for each service to function, there is a minimum set of required variab RABBITMQ_PASS RABBITMQ_USER -# Swift-account +# Swift-account-server - KEYSTONE_ADMIN_SERVICE_HOST - KEYSTONE_ADMIN_TOKEN - SWIFT_ADMIN_PASSWORD + SWIFT_ACCOUNT_SVC_BIND_IP + SWIFT_ACCOUNT_SVC_BIND_PORT + SWIFT_ACCOUNT_SVC_DEVICES + SWIFT_ACCOUNT_SVC_MOUNT_CHECK + SWIFT_ACCOUNT_SVC_RING_DEVICES + SWIFT_ACCOUNT_SVC_RING_HOSTS + SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS + SWIFT_ACCOUNT_SVC_RING_NAME + SWIFT_ACCOUNT_SVC_RING_PART_POWER + SWIFT_ACCOUNT_SVC_RING_REPLICAS + SWIFT_ACCOUNT_SVC_RING_WEIGHTS + SWIFT_ACCOUNT_SVC_RING_ZONES + SWIFT_DIR + SWIFT_USER # Swift-base + SWIFT_HASH_PATH_SUFFIX + +# Swift-container-server + + SWIFT_CONTAINER_SVC_BIND_IP + SWIFT_CONTAINER_SVC_BIND_PORT + SWIFT_CONTAINER_SVC_DEVICES + SWIFT_CONTAINER_SVC_MOUNT_CHECK + SWIFT_CONTAINER_SVC_RING_DEVICES + SWIFT_CONTAINER_SVC_RING_HOSTS + SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS + SWIFT_CONTAINER_SVC_RING_NAME + SWIFT_CONTAINER_SVC_RING_PART_POWER + SWIFT_CONTAINER_SVC_RING_REPLICAS + SWIFT_CONTAINER_SVC_RING_WEIGHTS + SWIFT_CONTAINER_SVC_RING_ZONES + SWIFT_DIR + SWIFT_USER + +# Swift-object-auditor + None -# Swift-container +# Swift-object-base - KEYSTONE_ADMIN_SERVICE_HOST - KEYSTONE_ADMIN_TOKEN - SWIFT_ADMIN_PASSWORD + SWIFT_CONTAINER_SVC_RING_DEVICES + SWIFT_CONTAINER_SVC_RING_HOSTS + SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS + SWIFT_CONTAINER_SVC_RING_NAME + SWIFT_CONTAINER_SVC_RING_PART_POWER + SWIFT_CONTAINER_SVC_RING_REPLICAS + SWIFT_CONTAINER_SVC_RING_WEIGHTS + SWIFT_CONTAINER_SVC_RING_ZONES + SWIFT_DIR + SWIFT_OBJECT_SVC_BIND_IP + SWIFT_OBJECT_SVC_BIND_PORT + SWIFT_OBJECT_SVC_DEVICES + SWIFT_OBJECT_SVC_MOUNT_CHECK + SWIFT_OBJECT_SVC_PIPELINE + SWIFT_OBJECT_SVC_RING_DEVICES + SWIFT_OBJECT_SVC_RING_HOSTS + SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS + SWIFT_OBJECT_SVC_RING_NAME + SWIFT_OBJECT_SVC_RING_PART_POWER + SWIFT_OBJECT_SVC_RING_REPLICAS + SWIFT_OBJECT_SVC_RING_WEIGHTS + SWIFT_OBJECT_SVC_RING_ZONES + SWIFT_USER -# Swift-object +# Swift-object-expirer - KEYSTONE_ADMIN_SERVICE_HOST - KEYSTONE_ADMIN_TOKEN - SWIFT_ADMIN_PASSWORD + None + +# Swift-object-replicator + + None + +# Swift-object-server + + None + +# Swift-object-updater + + None # Swift-proxy-server - None + SWIFT_ACCOUNT_SVC_RING_DEVICES + SWIFT_ACCOUNT_SVC_RING_HOSTS + SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS + SWIFT_ACCOUNT_SVC_RING_NAME + SWIFT_ACCOUNT_SVC_RING_PART_POWER + SWIFT_ACCOUNT_SVC_RING_REPLICAS + SWIFT_ACCOUNT_SVC_RING_WEIGHTS + SWIFT_ACCOUNT_SVC_RING_ZONES + SWIFT_ADMIN_USER + SWIFT_CONTAINER_SVC_RING_DEVICES + SWIFT_CONTAINER_SVC_RING_HOSTS + SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS + SWIFT_CONTAINER_SVC_RING_NAME + SWIFT_CONTAINER_SVC_RING_PART_POWER + SWIFT_CONTAINER_SVC_RING_REPLICAS + SWIFT_CONTAINER_SVC_RING_WEIGHTS + SWIFT_CONTAINER_SVC_RING_ZONES + SWIFT_KEYSTONE_PASSWORD + SWIFT_KEYSTONE_USER + SWIFT_OBJECT_SVC_RING_DEVICES + SWIFT_OBJECT_SVC_RING_HOSTS + SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS + SWIFT_OBJECT_SVC_RING_NAME + SWIFT_OBJECT_SVC_RING_PART_POWER + SWIFT_OBJECT_SVC_RING_REPLICAS + SWIFT_OBJECT_SVC_RING_WEIGHTS + SWIFT_OBJECT_SVC_RING_ZONES + SWIFT_PROXY_ACCOUNT_AUTOCREATE + SWIFT_PROXY_AUTH_PLUGIN + SWIFT_PROXY_BIND_IP + SWIFT_PROXY_BIND_PORT + SWIFT_PROXY_DELAY_AUTH_DECISION + SWIFT_PROXY_DIR + SWIFT_PROXY_OPERATOR_ROLES + SWIFT_PROXY_PASSWORD + SWIFT_PROXY_PIPELINE_MAIN + SWIFT_PROXY_PROJECT_DOMAIN_ID + SWIFT_PROXY_PROJECT_NAME + SWIFT_PROXY_SIGNING_DIR + SWIFT_PROXY_USERNAME + SWIFT_PROXY_USER_DOMAIN_ID + SWIFT_USER # Zaqar diff --git a/tools/genenv b/tools/genenv old mode 100755 new mode 100644 index bcb1d1f722..7161d2d1d0 --- a/tools/genenv +++ b/tools/genenv @@ -300,10 +300,65 @@ NOVA_VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP # Nova/Neutron NEUTRON_SHARED_SECRET=sharedsecret -#Swift -SWIFT_DB_NAME=swift -SWIFT_DB_USER=swift +# Swift +SWIFT_ACCOUNT_SVC_BIND_IP=$PUBLIC_IP +SWIFT_ACCOUNT_SVC_BIND_PORT=6002 +SWIFT_ACCOUNT_SVC_DEVICES=/srv/node +SWIFT_ACCOUNT_SVC_MOUNT_CHECK=false +SWIFT_ADMIN_USER=swift +SWIFT_API_SERVICE_HOST=$HOST_IP +SWIFT_CONTAINER_SVC_BIND_IP=$PUBLIC_IP +SWIFT_CONTAINER_SVC_BIND_PORT=6001 +SWIFT_CONTAINER_SVC_DEVICES=/srv/node +SWIFT_CONTAINER_SVC_MOUNT_CHECK=false +SWIFT_DIR=/etc/swift +SWIFT_HASH_PATH_SUFFIX=$(openssl rand -hex 8) +SWIFT_KEYSTONE_PASSWORD=swift SWIFT_KEYSTONE_USER=swift +SWIFT_OBJECT_SVC_BIND_IP=$PUBLIC_IP +SWIFT_OBJECT_SVC_BIND_PORT=6000 +SWIFT_OBJECT_SVC_DEVICES=/srv/node +SWIFT_OBJECT_SVC_MOUNT_CHECK=false +SWIFT_OBJECT_SVC_PIPELINE=object-server +SWIFT_PROXY_ACCOUNT_AUTOCREATE=true +SWIFT_PROXY_AUTH_PLUGIN=password +SWIFT_PROXY_BIND_IP=$PUBLIC_IP +SWIFT_PROXY_BIND_PORT=8080 +SWIFT_PROXY_DELAY_AUTH_DECISION=true +SWIFT_PROXY_DIR=/etc/swift +SWIFT_PROXY_OPERATOR_ROLES=admin,user +SWIFT_PROXY_PASSWORD=swift +SWIFT_PROXY_PIPELINE_MAIN="catch_errors gatekeeper healthcheck cache container_sync bulk ratelimit authtoken keystoneauth slo dlo proxy-server" +SWIFT_PROXY_PROJECT_DOMAIN_ID=default +SWIFT_PROXY_PROJECT_NAME=service +SWIFT_PROXY_SIGNING_DIR=/var/cache/swift +SWIFT_PROXY_USER_DOMAIN_ID=default +SWIFT_PROXY_USERNAME=swift +SWIFT_USER=swift +SWIFT_OBJECT_SVC_RING_NAME=/etc/swift/object.builder +SWIFT_OBJECT_SVC_RING_PART_POWER=10 +SWIFT_OBJECT_SVC_RING_REPLICAS=3 +SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS=1 +SWIFT_OBJECT_SVC_RING_HOSTS="${HOST_IP}:6000,${HOST_IP}:6000,${HOST_IP}:6000" +SWIFT_OBJECT_SVC_RING_DEVICES="sdb1,sdb2,sdb3" +SWIFT_OBJECT_SVC_RING_WEIGHTS="1,1,1" +SWIFT_OBJECT_SVC_RING_ZONES="1,2,3" +SWIFT_CONTAINER_SVC_RING_NAME=/etc/swift/container.builder +SWIFT_CONTAINER_SVC_RING_PART_POWER=10 +SWIFT_CONTAINER_SVC_RING_REPLICAS=3 +SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS=1 +SWIFT_CONTAINER_SVC_RING_HOSTS="${HOST_IP}:6001,${HOST_IP}:6001,${HOST_IP}:6001" +SWIFT_CONTAINER_SVC_RING_DEVICES="sdb1,sdb2,sdb3" +SWIFT_CONTAINER_SVC_RING_WEIGHTS="1,1,1" +SWIFT_CONTAINER_SVC_RING_ZONES="1,2,3" +SWIFT_ACCOUNT_SVC_RING_NAME=/etc/swift/account.builder +SWIFT_ACCOUNT_SVC_RING_PART_POWER=10 +SWIFT_ACCOUNT_SVC_RING_REPLICAS=3 +SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS=1 +SWIFT_ACCOUNT_SVC_RING_HOSTS="${HOST_IP}:6002,${HOST_IP}:6002,${HOST_IP}:6002" +SWIFT_ACCOUNT_SVC_RING_DEVICES="sdb1,sdb2,sdb3" +SWIFT_ACCOUNT_SVC_RING_WEIGHTS="1,1,1" +SWIFT_ACCOUNT_SVC_RING_ZONES="1,2,3" #Zaqar ZAQAR_KEYSTONE_USER=zaqar @@ -500,9 +555,64 @@ RABBITMQ_USER=$RABBIT_USER RABBIT_PASSWORD=$RABBIT_PASSWORD RABBIT_USERID=$RABBIT_USER ROOT_HELPER=$ROOT_HELPER -SWIFT_DB_NAME=$SWIFT_DB_NAME -SWIFT_DB_USER=$SWIFT_DB_USER +SWIFT_ACCOUNT_SVC_BIND_IP=$SWIFT_ACCOUNT_SVC_BIND_IP +SWIFT_ACCOUNT_SVC_BIND_PORT=$SWIFT_ACCOUNT_SVC_BIND_PORT +SWIFT_ACCOUNT_SVC_DEVICES=$SWIFT_ACCOUNT_SVC_DEVICES +SWIFT_ACCOUNT_SVC_MOUNT_CHECK=$SWIFT_ACCOUNT_SVC_MOUNT_CHECK +SWIFT_ADMIN_USER=$SWIFT_ADMIN_USER +SWIFT_API_SERVICE_HOST=$SWIFT_API_SERVICE_HOST +SWIFT_CONTAINER_SVC_BIND_IP=$PUBLIC_IP +SWIFT_CONTAINER_SVC_BIND_PORT=$SWIFT_CONTAINER_SVC_BIND_PORT +SWIFT_CONTAINER_SVC_DEVICES=$SWIFT_CONTAINER_SVC_DEVICES +SWIFT_CONTAINER_SVC_MOUNT_CHECK=$SWIFT_CONTAINER_SVC_MOUNT_CHECK +SWIFT_DIR=$SWIFT_DIR +SWIFT_HASH_PATH_SUFFIX=$SWIFT_HASH_PATH_SUFFIX +SWIFT_KEYSTONE_PASSWORD=$SWIFT_KEYSTONE_PASSWORD SWIFT_KEYSTONE_USER=$SWIFT_KEYSTONE_USER +SWIFT_OBJECT_SVC_BIND_IP=$SWIFT_OBJECT_SVC_BIND_IP +SWIFT_OBJECT_SVC_BIND_PORT=$SWIFT_OBJECT_SVC_BIND_PORT +SWIFT_OBJECT_SVC_DEVICES=$SWIFT_OBJECT_SVC_DEVICES +SWIFT_OBJECT_SVC_MOUNT_CHECK=$SWIFT_OBJECT_SVC_MOUNT_CHECK +SWIFT_OBJECT_SVC_PIPELINE=$SWIFT_OBJECT_SVC_PIPELINE +SWIFT_PROXY_ACCOUNT_AUTOCREATE=$SWIFT_PROXY_ACCOUNT_AUTOCREATE +SWIFT_PROXY_AUTH_PLUGIN=$SWIFT_PROXY_AUTH_PLUGIN +SWIFT_PROXY_BIND_IP=$SWIFT_PROXY_BIND_IP +SWIFT_PROXY_BIND_PORT=$SWIFT_PROXY_BIND_PORT +SWIFT_PROXY_DELAY_AUTH_DECISION=$SWIFT_PROXY_DELAY_AUTH_DECISION +SWIFT_PROXY_DIR=$SWIFT_PROXY_DIR +SWIFT_PROXY_OPERATOR_ROLES=$SWIFT_PROXY_OPERATOR_ROLES +SWIFT_PROXY_PASSWORD=$SWIFT_PROXY_PASSWORD +SWIFT_PROXY_PIPELINE_MAIN=$SWIFT_PROXY_PIPELINE_MAIN +SWIFT_PROXY_PROJECT_DOMAIN_ID=$SWIFT_PROXY_PROJECT_DOMAIN_ID +SWIFT_PROXY_PROJECT_NAME=$SWIFT_PROXY_PROJECT_NAME +SWIFT_PROXY_SIGNING_DIR=$SWIFT_PROXY_SIGNING_DIR +SWIFT_PROXY_USER_DOMAIN_ID=$SWIFT_PROXY_USER_DOMAIN_ID +SWIFT_PROXY_USERNAME=$SWIFT_PROXY_USERNAME +SWIFT_USER=$SWIFT_USER +SWIFT_OBJECT_SVC_RING_NAME=${SWIFT_OBJECT_SVC_RING_NAME} +SWIFT_OBJECT_SVC_RING_PART_POWER=${SWIFT_OBJECT_SVC_RING_PART_POWER} +SWIFT_OBJECT_SVC_RING_REPLICAS=${SWIFT_OBJECT_SVC_RING_REPLICAS} +SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS=${SWIFT_OBJECT_SVC_RING_MIN_PART_HOURS} +SWIFT_OBJECT_SVC_RING_HOSTS=${SWIFT_OBJECT_SVC_RING_HOSTS} +SWIFT_OBJECT_SVC_RING_DEVICES=${SWIFT_OBJECT_SVC_RING_DEVICES} +SWIFT_OBJECT_SVC_RING_WEIGHTS=${SWIFT_OBJECT_SVC_RING_WEIGHTS} +SWIFT_OBJECT_SVC_RING_ZONES=${SWIFT_OBJECT_SVC_RING_ZONES} +SWIFT_CONTAINER_SVC_RING_NAME=${SWIFT_CONTAINER_SVC_RING_NAME} +SWIFT_CONTAINER_SVC_RING_PART_POWER=${SWIFT_CONTAINER_SVC_RING_PART_POWER} +SWIFT_CONTAINER_SVC_RING_REPLICAS=${SWIFT_CONTAINER_SVC_RING_REPLICAS} +SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS=${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} +SWIFT_CONTAINER_SVC_RING_HOSTS=${SWIFT_CONTAINER_SVC_RING_HOSTS} +SWIFT_CONTAINER_SVC_RING_DEVICES=${SWIFT_CONTAINER_SVC_RING_DEVICES} +SWIFT_CONTAINER_SVC_RING_WEIGHTS=${SWIFT_CONTAINER_SVC_RING_WEIGHTS} +SWIFT_CONTAINER_SVC_RING_ZONES=${SWIFT_CONTAINER_SVC_RING_ZONES} +SWIFT_ACCOUNT_SVC_RING_NAME=${SWIFT_ACCOUNT_SVC_RING_NAME} +SWIFT_ACCOUNT_SVC_RING_PART_POWER=${SWIFT_ACCOUNT_SVC_RING_PART_POWER} +SWIFT_ACCOUNT_SVC_RING_REPLICAS=${SWIFT_ACCOUNT_SVC_RING_REPLICAS} +SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS=${SWIFT_ACCOUNT_SVC_RING_MIN_PART_HOURS} +SWIFT_ACCOUNT_SVC_RING_HOSTS=${SWIFT_ACCOUNT_SVC_RING_HOSTS} +SWIFT_ACCOUNT_SVC_RING_DEVICES=${SWIFT_ACCOUNT_SVC_RING_DEVICES} +SWIFT_ACCOUNT_SVC_RING_WEIGHTS=${SWIFT_ACCOUNT_SVC_RING_WEIGHTS} +SWIFT_ACCOUNT_SVC_RING_ZONES=${SWIFT_ACCOUNT_SVC_RING_ZONES} TEMP_FILE=$TEMP_FILE TENANT_NETWORK_TYPES=$TENANT_NETWORK_TYPES TOKEN_DRIVER=$TOKEN_DRIVER