From 29752f56b8053bbfed4397ff29e92b9cf4567e00 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Tue, 3 Mar 2015 17:07:39 +0000 Subject: swift-controller.yml: Create all the rings! --- openstack/usr/share/openstack/swift-controller.yml | 22 +++++++++++++++------- 1 file 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 -- cgit v1.2.1