summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstack/usr/share/openstack/swift-controller.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/openstack/usr/share/openstack/swift-controller.yml b/openstack/usr/share/openstack/swift-controller.yml
index b3f5b03b..14f0dbb1 100644
--- a/openstack/usr/share/openstack/swift-controller.yml
+++ b/openstack/usr/share/openstack/swift-controller.yml
@@ -29,3 +29,15 @@
adminurl={{ SWIFT_ADMIN_URL }}
region='RegionOne'
token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }}
+
+ - name: Create account ring
+ shell: swift-ring-builder account.builder create {{ SWIFT_PART_POWER }}
+ {{ SWIFT_REPLICAS }} {{ SWIFT_MIN_PART_HOURS }}
+
+ - name: Add each storage node to the ring
+ shell: swift-ring-builder account.builder
+ add r1z1-{{ item.ip }}:6002/{{ item.device}} {{ item.weight }}
+ with_items: {{ SWIFT_STORAGE_DEVICES }}
+
+ - name: Rebalance the ring
+ shell: swift-ring-builder account.builder rebalance