forked from CARV-ICS-FORTH/frisbee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10.availability-failover-single.yml
60 lines (52 loc) · 1.67 KB
/
10.availability-failover-single.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
apiVersion: frisbee.io/v1alpha1
kind: TestPlan
metadata:
name: redis-availability-failover-single
spec:
actions:
# Step 1. Create a single Master node
- action: Service
name: master
service:
templateRef: redis.single.master
# Step 2. Create a Slave node
- action: Service
name: slave
depends: { running: [ master ] }
service:
templateRef: redis.single.slave
inputs:
- { master: .service.master.one }
# Step 3. Create a failover manager
- action: Service
name: sentinel
depends: { running: [ master, slave ] }
service:
templateRef: redis.single.sentinel
inputs:
- { master: .service.master.one }
# Step 4. Hammer the server with requests
- action: Cluster
name: "loaders"
depends: { running: [ master ] }
cluster:
templateRef: ycsb.redis.loader
inputs:
- { server: master, workload: workloada, recordcount: "10000000", threads: "1", delay: "15", mode: "single" }
# Step 5. Cause partition A on the 3rd minute, lasting 2 minutes
- action: Chaos
name: partition-a
depends: { running: [ master, slave ], after: "3m" }
chaos:
templateRef: system.chaos.network.partition
inputs:
- { targets: .service.master.one, duration: "2m" }
# Step 5. Cause partition B on the 6th minute, lasting 1 minute
- action: Chaos
name: partition-b
depends: { running: [ master, slave ], success: [ partition-a ], after: "6m" }
chaos:
templateRef: system.chaos.network.partition
inputs:
- { targets: .service.master.one, duration: "1m" }