-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample.yml
220 lines (216 loc) · 6.5 KB
/
sample.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
tosca_definitions_version: alien_dsl_3_0_0
metadata:
template_name: TestRMSScheduler
template_version: 3.0.0-SNAPSHOT
template_author: admin
description: ""
imports:
- tosca-normative-types:1.0.0-ALIEN20
- org.alien4cloud.mock.bash:2.2.0-SNAPSHOT
- org.alien4cloud.mock.pub:2.2.0-SNAPSHOT
- alien-base-types:3.0.0
- org.alien4cloud.rmsscheduling:3.0.0
topology_template:
node_templates:
MiniBashMock:
metadata:
a4c_edit_x: 19
a4c_edit_y: "-5"
type: org.alien4cloud.mock.bash.nodes.MiniBashMock
properties:
duration: 3
variation: 20
log_length: 2000
MiniBashFailFastMock:
metadata:
a4c_edit_x: 179
a4c_edit_y: 73
type: org.alien4cloud.mock.bash.nodes.MiniBashFailFastMock
properties:
duration: 3
variation: 20
log_length: 2000
policies:
- LoopSample:
type: org.alien4cloud.rmsscheduling.policies.RMSScheduleWorkflowPolicy
targets: [ ]
properties:
duration: 3m
timer_type: cron
retry_on_error: false
loop: true
delay: 45s
only_one_running: true
conditions:
- "Average value for metric \"ES_Disk_Free\" during last 10m is > 10000"
cron_expression: "0 0/5 * * * ?"
workflow_name: run
- FailNoRetry:
type: org.alien4cloud.rmsscheduling.policies.RMSScheduleWorkflowPolicy
targets: [ ]
properties:
duration: 60s
timer_type: cron
retry_on_error: false
loop: false
delay: 10s
only_one_running: true
cron_expression: "0 6/7 * * * ?"
workflow_name: fail
- FailRetry:
type: org.alien4cloud.rmsscheduling.policies.RMSScheduleWorkflowPolicy
targets: [ ]
properties:
duration: 2m
timer_type: cron
retry_on_error: true
loop: false
delay: 30s
only_one_running: true
cron_expression: "0 0/15 * * * ?"
workflow_name: fail
workflows:
install:
steps:
MiniBashMock_starting:
target: MiniBashMock
activities:
- set_state: starting
on_success:
- MiniBashMock_started
MiniBashMock_initial:
target: MiniBashMock
activities:
- set_state: initial
on_success:
- MiniBashMock_starting
MiniBashMock_started:
target: MiniBashMock
activities:
- set_state: started
MiniBashFailFastMock_initial:
target: MiniBashFailFastMock
activities:
- set_state: initial
on_success:
- MiniBashFailFastMock_creating
MiniBashFailFastMock_creating:
target: MiniBashFailFastMock
activities:
- set_state: creating
on_success:
- MiniBashFailFastMock_created
MiniBashFailFastMock_created:
target: MiniBashFailFastMock
activities:
- set_state: created
on_success:
- MiniBashFailFastMock_configuring
MiniBashFailFastMock_configuring:
target: MiniBashFailFastMock
activities:
- set_state: configuring
on_success:
- MiniBashFailFastMock_configured
MiniBashFailFastMock_configured:
target: MiniBashFailFastMock
activities:
- set_state: configured
on_success:
- MiniBashFailFastMock_starting
MiniBashFailFastMock_starting:
target: MiniBashFailFastMock
activities:
- set_state: starting
on_success:
- MiniBashFailFastMock_started
MiniBashFailFastMock_started:
target: MiniBashFailFastMock
activities:
- set_state: started
uninstall:
steps:
MiniBashMock_deleted:
target: MiniBashMock
activities:
- set_state: deleted
MiniBashMock_stopping:
target: MiniBashMock
activities:
- set_state: stopping
on_success:
- MiniBashMock_stopped
MiniBashMock_stopped:
target: MiniBashMock
activities:
- set_state: stopped
on_success:
- MiniBashMock_deleting
MiniBashMock_deleting:
target: MiniBashMock
activities:
- set_state: deleting
on_success:
- MiniBashMock_deleted
MiniBashFailFastMock_deleting:
target: MiniBashFailFastMock
activities:
- set_state: deleting
on_success:
- MiniBashFailFastMock_deleted
MiniBashFailFastMock_deleted:
target: MiniBashFailFastMock
activities:
- set_state: deleted
run:
steps:
MiniBashMock_start:
target: MiniBashMock
activities:
- call_operation: Standard.start
MiniBashFailFastMock_submitting:
target: MiniBashFailFastMock
activities:
- set_state: submitting
on_success:
- MiniBashFailFastMock_submit
MiniBashFailFastMock_submitted:
target: MiniBashFailFastMock
activities:
- set_state: submitted
on_success:
- MiniBashFailFastMock_executing
MiniBashFailFastMock_executing:
target: MiniBashFailFastMock
activities:
- set_state: executing
on_success:
- MiniBashFailFastMock_run
MiniBashFailFastMock_executed:
target: MiniBashFailFastMock
activities:
- set_state: executed
MiniBashFailFastMock_submit:
target: MiniBashFailFastMock
activities:
- call_operation: tosca.interfaces.node.lifecycle.Runnable.submit
on_success:
- MiniBashFailFastMock_submitted
MiniBashFailFastMock_run:
target: MiniBashFailFastMock
activities:
- call_operation: tosca.interfaces.node.lifecycle.Runnable.run
on_success:
- MiniBashFailFastMock_executed
fail:
steps:
MiniBashFailFastMock_start:
target: MiniBashFailFastMock
activities:
- call_operation: Standard.start
MiniBashMock_start:
target: MiniBashMock
activities:
- call_operation: Standard.start
on_success:
- MiniBashFailFastMock_start