Fix ring bulder command examples in swift readme doc

- avoid hard coding install type and base distro in sample commands
- fix semicolon to actually make for loop work

Change-Id: I15b46fec5b4ebf7987ea22e7c71a44c739f7dee3
This commit is contained in:
Qiu Yu 2015-09-17 17:56:11 -07:00
parent 1b33345fb8
commit e4b825e084

View File

@ -33,51 +33,53 @@ container directories:
:: ::
export KOLLA_INTERNAL_ADDRESS=1.2.3.4 export KOLLA_INTERNAL_ADDRESS=1.2.3.4
export KOLLA_BASE_DISTRO=centos
export KOLLA_INSTALL_TYPE=binary
# Object ring # Object ring
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base \
swift-ring-builder /etc/kolla/config/swift/object.builder create 10 3 1 swift-ring-builder /etc/kolla/config/swift/object.builder create 10 3 1
for partition in sdb1 sdb2 sdb3; do for partition in sdb1 sdb2 sdb3; do
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base swift-ring-builder \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base swift-ring-builder \
/etc/kolla/config/swift/object.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6000/${partition} 1 /etc/kolla/config/swift/object.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6000/${partition} 1;
done done
# Account ring # Account ring
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base \
swift-ring-builder /etc/kolla/config/swift/account.builder create 10 3 1 swift-ring-builder /etc/kolla/config/swift/account.builder create 10 3 1
for partition in sdb1 sdb2 sdb3; do for partition in sdb1 sdb2 sdb3; do
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base swift-ring-builder \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base swift-ring-builder \
/etc/kolla/config/swift/account.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6001/${partition} 1 /etc/kolla/config/swift/account.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6001/${partition} 1;
done done
# Container ring # Container ring
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base \
swift-ring-builder /etc/kolla/config/swift/container.builder create 10 3 1 swift-ring-builder /etc/kolla/config/swift/container.builder create 10 3 1
for partition in sdb1 sdb2 sdb3; do for partition in sdb1 sdb2 sdb3; do
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base swift-ring-builder \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base swift-ring-builder \
/etc/kolla/config/swift/container.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6002/${partition} 1 /etc/kolla/config/swift/container.builder add z1-${KOLLA_INTERNAL_ADDRESS}:6002/${partition} 1;
done done
for ring in object account container; do for ring in object account container; do
docker run \ docker run \
-v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \ -v /etc/kolla/config/swift/:/etc/kolla/config/swift/ \
kollaglue/centos-binary-swift-base swift-ring-builder \ kollaglue/${KOLLA_BASE_DISTRO}-${KOLLA_INSTALL_TYPE}-swift-base swift-ring-builder \
/etc/kolla/config/swift/${ring}.builder rebalance /etc/kolla/config/swift/${ring}.builder rebalance;
done done
Similar commands can be used for multinode, you will just need to run the the 'add' step for each IP Similar commands can be used for multinode, you will just need to run the the 'add' step for each IP