diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2015-03-03 17:07:39 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2015-03-04 15:36:12 +0000 |
commit | 29752f56b8053bbfed4397ff29e92b9cf4567e00 (patch) | |
tree | 9c5c4c1e8d1920bbc0525739720786f1362ab1d5 | |
parent | d87fa741563bd68ee4c5e74ab8521e8faa469fbb (diff) | |
download | definitions-29752f56b8053bbfed4397ff29e92b9cf4567e00.tar.gz |
swift-controller.yml: Create all the rings!
-rw-r--r-- | openstack/usr/share/openstack/swift-controller.yml | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/openstack/usr/share/openstack/swift-controller.yml b/openstack/usr/share/openstack/swift-controller.yml index 1101eccd..272f0b50 100644 --- a/openstack/usr/share/openstack/swift-controller.yml +++ b/openstack/usr/share/openstack/swift-controller.yml @@ -2,6 +2,7 @@ - hosts: localhost vars_files: - swift-vars.yml + - rings: ['account', 'container', 'object'] remote_user: root tasks: - user: name=swift comment="Swift user" @@ -30,17 +31,24 @@ region='RegionOne' token={{ KEYSTONE_TEMPORARY_ADMIN_TOKEN }} - - name: Create account ring - shell: swift-ring-builder account.builder create {{ SWIFT_PART_POWER }} + - name: Create ring + shell: swift-ring-builder {{ item }}.builder create {{ SWIFT_PART_POWER }} {{ SWIFT_REPLICAS }} {{ SWIFT_MIN_PART_HOURS }} + with_items: rings - 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 }}" + shell: swift-ring-builder {{ item[0] }}.builder + add r1z1-{{ item[1].ip }}:6002/{{ item[1].device }} {{ item[1].weight }} + with_nested: + - rings + - "{{ SWIFT_STORAGE_DEVICES }}" - name: Rebalance the ring - shell: swift-ring-builder account.builder rebalance + shell: swift-ring-builder {{ item }}.builder rebalance + with_items: + - rings - name: Transfer ring to /etc/swift on each node - shell: cp account.builder /etc/swift + shell: cp {{ item }}.builder /etc/swift + with_items: + - rings |