37e257913c
Added Dockerfile and configuration files under the new `docker` directory to build a Swift All in One container image. The primary goal of this container image is to provide application developers with a Swift/S3 endpoint that can be tested against during the development cycle. Added Zuul jobs to build docker container Change-Id: Ib10975a1862a4fa8c4eeaba139837cf1f22b272a
37 lines
1.5 KiB
Plaintext
Executable File
37 lines
1.5 KiB
Plaintext
Executable File
#!/usr/bin/with-contenv sh
|
|
|
|
POLICIES="object container account"
|
|
|
|
for p in $POLICIES; do
|
|
echo "swift-ring-builder $p.builder create 10 1 1" > /etc/swift/remakerings.$p;
|
|
echo "started /etc/swift/remakerings.$p with 'swift-ring-build create'"
|
|
done
|
|
|
|
|
|
for drive in `ls /srv/node/ | grep 'swift-d'`; do
|
|
echo "swift-ring-builder object.builder add r1z1-127.0.0.1:6000/$drive 1" >> /etc/swift/remakerings.object
|
|
echo "pushed command to add r1z1-127.0.0.1:6000/$drive to /etc/swift/remakerings.object"
|
|
echo "swift-ring-builder container.builder add r1z1-127.0.0.1:6001/$drive 1" >> /etc/swift/remakerings.container
|
|
echo "pushed command to add r1z1-127.0.0.1:6001/$drive to /etc/swift/remakerings.container"
|
|
echo "swift-ring-builder account.builder add r1z1-127.0.0.1:6002/$drive 1" >> /etc/swift/remakerings.account
|
|
echo "pushed command to add r1z1-127.0.0.1:6002/$drive to /etc/swift/remakerings.account"
|
|
done
|
|
|
|
for p in $POLICIES; do
|
|
echo "swift-ring-builder $p.builder rebalance" >> /etc/swift/remakerings.$p;
|
|
echo "pushed command to rebalance ring into /etc/swift/remakerings.$p"
|
|
done
|
|
|
|
echo "rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz" > /etc/swift/remakerings
|
|
echo "created umbrella /etc/swift/remakerings, with deleting all ring files"
|
|
|
|
for p in $POLICIES; do
|
|
cat /etc/swift/remakerings.$p >> /etc/swift/remakerings;
|
|
echo "pushed /etc/swift/remakerings.$p to /etc/swift/remakerings"
|
|
rm -f /etc/swift/remakerings.$p;
|
|
echo "deleted /etc/swift/remakerings.$p"
|
|
done
|
|
|
|
chmod +x /etc/swift/remakerings
|
|
echo "made remaketings executable (+x)"
|