]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | tasks: |
2 | - vip: | |
3 | ||
4 | # make sure cephadm notices the new IP | |
5 | - cephadm.shell: | |
6 | host.a: | |
7 | - ceph orch device ls --refresh | |
8 | ||
9 | # deploy rgw + ingress | |
10 | - cephadm.apply: | |
11 | specs: | |
12 | - service_type: rgw | |
13 | service_id: foo | |
14 | placement: | |
15 | count: 4 | |
16 | host_pattern: "*" | |
17 | spec: | |
18 | rgw_frontend_port: 8000 | |
19 | - service_type: ingress | |
20 | service_id: rgw.foo | |
21 | placement: | |
22 | count: 2 | |
23 | spec: | |
24 | backend_service: rgw.foo | |
25 | frontend_port: 9000 | |
26 | monitor_port: 9001 | |
27 | virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}" | |
28 | - cephadm.wait_for_service: | |
29 | service: rgw.foo | |
30 | - cephadm.wait_for_service: | |
31 | service: ingress.rgw.foo | |
32 | ||
33 | # take each component down in turn and ensure things still work | |
34 | - cephadm.shell: | |
35 | host.a: | |
36 | - | | |
37 | echo "Check while healthy..." | |
38 | curl http://{{VIP0}}:9000/ | |
39 | ||
40 | # stop each rgw in turn | |
41 | echo "Check with each rgw stopped in turn..." | |
42 | for rgw in `ceph orch ps | grep ^rgw.foo. | awk '{print $1}'`; do | |
43 | ceph orch daemon stop $rgw | |
44 | while ! ceph orch ps | grep $rgw | grep stopped; do sleep 1 ; done | |
45 | while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done | |
46 | ceph orch daemon start $rgw | |
47 | while ! ceph orch ps | grep $rgw | grep running; do sleep 1 ; done | |
48 | done | |
49 | ||
50 | # stop each haproxy in turn | |
51 | echo "Check with each haproxy down in turn..." | |
52 | for haproxy in `ceph orch ps | grep ^haproxy.rgw.foo. | awk '{print $1}'`; do | |
53 | ceph orch daemon stop $haproxy | |
54 | while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done | |
55 | while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done | |
56 | ceph orch daemon start $haproxy | |
57 | while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done | |
58 | done | |
59 | ||
60 | while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done |