Merge "Create Dockerfile to create a yardstick-image of docker"
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc087.yaml
1 ##############################################################################
2 ## Copyright (c) 2018 Intracom Telecom and others.
3 ##
4 ## All rights reserved. This program and the accompanying materials
5 ## are made available under the terms of the Apache License, Version 2.0
6 ## which accompanies this distribution, and is available at
7 ## http://www.apache.org/licenses/LICENSE-2.0
8 ###############################################################################
9 ---
10
11 schema: "yardstick:task:0.1"
12 description: >
13     Yardstick TC087 config file;
14     SDN Controller resilience in non-HA configuration
15
16 {% set file = file or '/etc/yardstick/pod.yaml' %}
17 {% set attack_host = attack_host or 'node6' %}
18
19 scenarios:
20
21 -
22       type: "GeneralHA"
23       options:
24           monitors:
25
26             - monitor_type: "general-monitor"
27               monitor_key: "ip-status"
28               key: "snat"
29               monitor_time: 50
30               host: athena
31               sla:
32                  max_outage_time: 0
33               parameter:
34                 destination_ip: "8.8.8.8"
35
36             - monitor_type: "general-monitor"
37               monitor_key: "ip-status"
38               key: "l2"
39               monitor_time: 50
40               host: athena
41               sla:
42                  max_outage_time: 0
43               parameter:
44                 destination_ip: "@private_ip"
45
46           operations:
47             - operation_type: "general-operation"
48               key: "get-privateip"
49               operation_key: "get-privateip"
50               action_parameter:
51                 server_name: "ares"
52               return_parameter:
53                 all: "@private_ip"
54
55
56           steps:
57             - actionKey: "get-privateip"
58               actionType: "operation"
59               index: 1
60
61             - actionKey: "l2"
62               actionType: "monitor"
63               index: 2
64
65             - actionKey: "snat"
66               actionType: "monitor"
67               index: 3
68
69
70       nodes:
71         {{attack_host}}: {{attack_host}}.LF
72         athena: athena.ODLnoHA1
73       runner:
74         type: Duration
75         duration: 1
76       sla:
77         action: assert
78
79
80 -
81       type: "GeneralHA"
82       options:
83           attackers:
84             -
85               fault_type: "kill-process"
86               process_name: "opendaylight"
87               key: "kill-process"
88               host: {{attack_host}}
89
90           monitors:
91             - monitor_type: "process"
92               process_name: "opendaylight"
93               host: {{attack_host}}
94               key: "monitor-recovery"
95               monitor_time: 50
96               sla:
97                 max_recover_time: 30
98
99
100             - monitor_type: "general-monitor"
101               monitor_key: "ip-status"
102               key: "snat"
103               monitor_time: 70
104               host: athena
105               sla:
106                  max_outage_time: 0
107               parameter:
108                 destination_ip: "8.8.8.8"
109
110             - monitor_type: "general-monitor"
111               monitor_key: "ip-status"
112               key: "l2"
113               monitor_time: 70
114               host: athena
115               sla:
116                  max_outage_time: 0
117               parameter:
118                 destination_ip: "@private_ip"
119
120           operations:
121             - operation_type: "general-operation"
122               key: "start-service"
123               host: {{attack_host}}
124               operation_key: "start-service"
125               action_parameter:
126                 service: "opendaylight"
127               rollback_parameter:
128                 service: "opendaylight"
129
130             - operation_type: "general-operation"
131               key: "get-privateip"
132               operation_key: "get-privateip"
133               action_parameter:
134                 server_name: "ares"
135               return_parameter:
136                 all: "@private_ip"
137
138
139
140           steps:
141
142             - actionKey: "monitor-recovery"
143               actionType: "monitor"
144               index: 1
145
146             - actionKey: "get-privateip"
147               actionType: "operation"
148               index: 2
149
150             - actionKey: "l2"
151               actionType: "monitor"
152               index: 3
153
154             - actionKey: "snat"
155               actionType: "monitor"
156               index: 4
157
158             - actionKey: "kill-process"
159               actionType: "attacker"
160               index: 5
161
162             - actionKey: "start-service"
163               actionType: "operation"
164               index: 6
165
166
167
168       nodes:
169         {{attack_host}}: {{attack_host}}.LF
170         athena: athena.ODLnoHA1
171       runner:
172         type: Duration
173         duration: 1
174       sla:
175         action: assert
176
177 -
178       type: "GeneralHA"
179       options:
180           monitors:
181
182             - monitor_type: "general-monitor"
183               monitor_key: "ip-status"
184               key: "l2"
185               monitor_time: 80
186               host: athena
187               sla:
188                  max_outage_time: 40
189               parameter:
190                 destination_ip: "@private_ip"
191
192           operations:
193             - operation_type: "general-operation"
194               key: "get-privateip"
195               operation_key: "get-privateip"
196               action_parameter:
197                 server_name: "hermes"
198               return_parameter:
199                 all: "@private_ip"
200
201             - operation_type: "general-operation"
202               key: "nova-create-instance"
203               operation_key: "nova-create-instance"
204               action_parameter:
205                 serverconfig: "hermes yardstick-image yardstick-flavor test_one"
206               rollback_parameter:
207                 serverconfig: "hermes"
208
209             - operation_type: "general-operation"
210               key: "add-server-to-secgroup"
211               operation_key: "add-server-to-secgroup"
212               action_parameter:
213                 serverconfig: "hermes ODLnoHA1"
214               rollback_parameter:
215                 serverconfig: "hermes ODLnoHA1"
216
217
218           steps:
219             - actionKey: "nova-create-instance"
220               actionType: "operation"
221               index: 1
222
223             - actionKey: "add-server-to-secgroup"
224               actionType: "operation"
225               index: 2
226
227             - actionKey: "get-privateip"
228               actionType: "operation"
229               index: 3
230
231             - actionKey: "l2"
232               actionType: "monitor"
233               index: 4
234
235       nodes:
236         {{attack_host}}: {{attack_host}}.LF
237         athena: athena.ODLnoHA1
238       runner:
239         type: Duration
240         duration: 1
241       sla:
242         action: assert
243
244
245 contexts:
246     -
247         type: Node
248         name: LF
249         file: {{file}}
250     -
251         name: ODLnoHA1
252         image: yardstick-image
253         flavor: yardstick-flavor
254         user: ubuntu
255         host: athena
256         placement_groups:
257             pgrp1:
258                 policy: "availability"
259         servers:
260             athena:
261                 floating_ip: true
262                 placement: "pgrp1"
263                 network_ports:
264                     test_one:
265                         - ens0
266
267             ares:
268                 floating_ip: true
269                 placement: "pgrp1"
270                 network_ports:
271                     test_one:
272                         - ens0
273
274         networks:
275             test_one:
276                 cidr: '10.0.1.0/24'
277                 router: 'test_router'
278