]>
Commit | Line | Data |
---|---|---|
11fdf7f2 | 1 | #!/usr/bin/env bash |
7c673cae | 2 | |
20effc67 | 3 | [ $# -lt 1 ] && echo "usage: $0 <num-clusters> [rgw parameters...]" && exit 1 |
7c673cae FG |
4 | |
5 | num_clusters=$1 | |
20effc67 | 6 | shift |
7c673cae FG |
7 | |
8 | [ $num_clusters -lt 1 ] && echo "clusters num must be at least 1" && exit 1 | |
9 | ||
10 | . "`dirname $0`/test-rgw-common.sh" | |
11 | . "`dirname $0`/test-rgw-meta-sync.sh" | |
12 | ||
13 | set -e | |
14 | ||
15 | realm_name=earth | |
16 | zg=zg1 | |
17 | ||
18 | system_access_key="1234567890" | |
19 | system_secret="pencil" | |
20 | ||
21 | # bring up first cluster | |
22 | x $(start_ceph_cluster c1) -n | |
23 | ||
24 | # create realm, zonegroup, zone, start rgw | |
25 | init_first_zone c1 $realm_name $zg ${zg}-1 8001 $system_access_key $system_secret | |
20effc67 | 26 | x $(rgw c1 8001 "$@") |
7c673cae FG |
27 | |
28 | output=`$(rgw_admin c1) realm get` | |
29 | ||
30 | echo realm_status=$output | |
31 | ||
32 | # bring up next clusters | |
33 | ||
34 | i=2 | |
35 | while [ $i -le $num_clusters ]; do | |
36 | x $(start_ceph_cluster c$i) -n | |
37 | ||
38 | # create new zone, start rgw | |
39 | init_zone_in_existing_zg c$i $realm_name $zg ${zg}-${i} 8001 $((8000+$i)) $zone_port $system_access_key $system_secret | |
20effc67 | 40 | x $(rgw c$i $((8000+$i)) "$@") |
7c673cae FG |
41 | |
42 | i=$((i+1)) | |
43 | done | |
44 | ||
45 | i=2 | |
46 | while [ $i -le $num_clusters ]; do | |
47 | wait_for_meta_sync c1 c$i $realm_name | |
48 | ||
49 | i=$((i+1)) | |
50 | done | |
51 |