-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow.conf
354 lines (294 loc) · 12.7 KB
/
flow.conf
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
packages = ["github.com/flow-contrib/aliyun", "github.com/lib/pq", "github.com/flow-contrib/toolkit/sql", "github.com/flow-contrib/toolkit/monitor"]
app {
name = "devops"
usage = "fast build a devops development environment on aliyun"
commands {
describe {
usage = "describe aliyun infrastructure"
rds {
usage = "describe rds stuff"
attribute {
usage = "describe rds db instance attribute"
flow = ["devops.aliyun.rds.instance.attribute.describe"]
}
netinfo {
usage = "describe rds db instance netinfo"
flow = ["devops.aliyun.rds.instance.netinfo.describe"]
}
}
slb {
usage = "describe slb stuff"
balancer {
usage = "describe slb balancer"
flow = ["devops.aliyun.slb.balancer.describe"]
}
}
}
init {
usage = "init stuff"
rds {
usage = "init rds"
db {
usage = "init database with sql"
flow = ["devops.aliyun.rds.instance.netinfo.describe?class=rds", "toolkit.monitor.tcp.address.check?class=check", "toolkit.sql.exec?class=init"]
}
}
}
create {
usage = "create aliyun infrastructure instance"
vpc {
usage = "create vpc stuff"
vpc {
usage = "create vpc instance"
flow = ["devops.aliyun.vpc.vpc.create", "devops.aliyun.vpc.vpc.running.wait"]
}
vswitch {
usage = "create vpc vswitch"
flow = ["devops.aliyun.vpc.vswitch.create"]
}
all {
flow = [
"devops.aliyun.vpc.vpc.create",
"devops.aliyun.vpc.vpc.running.wait",
"devops.aliyun.vpc.vswitch.create"
]
}
}
dns {
domain {
usage = "management domain"
record {
usage = "add domain record"
flow = [
"devops.aliyun.slb.balancer.describe?class=slb",
"devops.aliyun.dns.domain.record.add?class=dns"
]
}
}
}
oss {
usage = "create oss bucket"
flow = ["devops.aliyun.oss.bucket.create"]
}
slb {
usage = "create load balancer stuff"
balancer {
usage = "create slb balancer"
flow = [
"devops.aliyun.slb.balancer.create"
]
}
listener {
usage = "create slb balancer listener"
flow = [
"devops.aliyun.slb.balancer.listener.http.create",
"devops.aliyun.slb.balancer.listener.https.create",
"devops.aliyun.slb.balancer.listener.tcp.create",
"devops.aliyun.slb.balancer.listener.udp.create"
]
}
vserver-group {
usage = "create slb balancer vgroup server"
flow = [
"devops.aliyun.slb.balancer.listener.vserver-group.create"
]
}
rules {
usage = "create slb balancer listener's forward rules"
flow = [
"devops.aliyun.slb.balancer.listener.rules.create"
]
}
all {
usage = "create all slb stuff"
flow = [
"devops.aliyun.slb.balancer.create",
"devops.aliyun.slb.balancer.listener.http.create",
"devops.aliyun.slb.balancer.listener.https.create",
"devops.aliyun.slb.balancer.listener.tcp.create",
"devops.aliyun.slb.balancer.listener.udp.create",
"devops.aliyun.slb.balancer.listener.vserver-group.create",
"devops.aliyun.slb.balancer.listener.rules.create"
]
}
}
rds {
usage = "create rds infrastructure"
instance {
usage = "create rds database instance"
flow = [
"devops.aliyun.rds.instance.create",
"devops.aliyun.rds.instance.running.wait"
]
}
db {
account {
usage = "create rds database account and grant privilege"
flow = ["devops.aliyun.rds.instance.account.create"]
}
conn {
usage = "init rds public conn"
flow = ["devops.aliyun.rds.instance.conn.public.alloc"]
}
all {
flow = [
"devops.aliyun.rds.instance.account.create",
"devops.aliyun.rds.instance.conn.public.alloc"
]
}
}
all {
usage = "create all rds database stuff"
flow = [
"devops.aliyun.rds.instance.create",
"devops.aliyun.rds.instance.running.wait",
"devops.aliyun.rds.instance.account.create",
"devops.aliyun.rds.instance.conn.public.alloc"
]
}
}
cs {
usage = "create container service infrastructure"
cluster {
usage = "create cluster"
flow = [
"devops.aliyun.cs.cluster.create",
"devops.aliyun.cs.cluster.running.wait"
]
}
volume {
usage = "create volume"
flow = [
"devops.aliyun.cs.cluster.volume.create"
]
}
project {
usage = "create project"
flow = [
"devops.aliyun.rds.instance.netinfo.describe?class=rds",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-base",
"toolkit.monitor.http.content.check?class=cs-gitlab-check",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-others"
]
}
all {
usage = "create all cs stuff"
flow = [
"devops.aliyun.rds.instance.netinfo.describe?class=rds",
"devops.aliyun.cs.cluster.create?class=cs",
"devops.aliyun.cs.cluster.running.wait?class=cs",
"devops.aliyun.cs.cluster.volume.create?class=cs-volume",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-base",
"toolkit.monitor.http.content.check?class=cs-gitlab-check",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-others"
]
}
}
all {
usage = "create all infrastructure instance"
flow = [
"devops.aliyun.vpc.vpc.create?class=vpc",
"devops.aliyun.vpc.vpc.running.wait?class=vpc",
"devops.aliyun.vpc.vswitch.create?class=vpc",
"devops.aliyun.oss.bucket.create?class=oss",
"devops.aliyun.rds.instance.create?class=rds",
"devops.aliyun.rds.instance.running.wait?class=rds",
"devops.aliyun.rds.instance.account.create?class=rds",
"devops.aliyun.rds.instance.conn.public.alloc?class=rds",
"devops.aliyun.rds.instance.netinfo.describe?class=rds",
"toolkit.monitor.tcp.address.check?class=check",
"toolkit.sql.exec?id=init-gitlab-db&class=init-rds",
"devops.aliyun.cs.cluster.create?class=cs",
"devops.aliyun.cs.cluster.running.wait?class=cs",
"devops.aliyun.slb.balancer.create?class=slb",
"devops.aliyun.slb.balancer.listener.http.create?class=slb",
"devops.aliyun.slb.balancer.listener.https.create?class=slb",
"devops.aliyun.slb.balancer.listener.tcp.create?class=slb",
"devops.aliyun.slb.balancer.listener.udp.create?class=slb",
"devops.aliyun.slb.balancer.listener.vserver-group.create?class=slb",
"devops.aliyun.slb.balancer.listener.rules.create?class=slb",
"devops.aliyun.slb.balancer.describe?class=slb",
"devops.aliyun.dns.domain.record.add?class=dns",
"devops.aliyun.cs.cluster.volume.create?class=cs-volume",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-base",
"toolkit.monitor.http.content.check?class=cs-gitlab-check",
"devops.aliyun.cs.cluster.project.create?class=cs-projects-others"
]
}
}
delete {
usage = "delete aliyun infrastructure instance"
vpc {
usage = "delete vpc stuff"
vpc {
usage = "delete vpc instance"
flow = ["devops.aliyun.vpc.vpc.delete"]
}
vswitch {
usage = "delete vswitch instance"
flow = ["devops.aliyun.vpc.vswitch.delete"]
}
all {
usage = "delete all vpc stuff"
flow = ["devops.aliyun.vpc.vswitch.delete", "devops.aliyun.vpc.vpc.delete"]
}
}
dns {
usage = "delete dns stuff"
domain {
usage = "delete dns domain stuff"
record {
usage = "delete dns domain record"
flow = ["devops.aliyun.dns.domain.record.delete"]
}
}
}
oss {
usage = "delete oss stuff"
bucket {
usage = "delete oss bucket"
flow = ["devops.aliyun.oss.bucket.delete"]
}
}
slb {
usage = "delete load balancer instance"
flow = ["devops.aliyun.slb.balancer.delete"]
}
rds {
usage = "delete rds infrastructure"
db {
usage = "delete rds database instance"
flow = ["devops.aliyun.rds.instance.delete"]
}
}
cs {
usage = "delete container service infrastructure"
cluster {
usage = "delete cluster"
flow = [
"devops.aliyun.cs.cluster.delete",
"devops.aliyun.cs.cluster.deleted.wait"
]
}
project {
usage = "delete project"
flow = ["devops.aliyun.cs.cluster.project.delete"]
}
}
all {
usage = "delete all infrastructure instance"
flow = [
"devops.aliyun.cs.cluster.project.delete?class=cs-projects",
"devops.aliyun.cs.cluster.delete?class=cs",
"devops.aliyun.cs.cluster.deleted.wait?class=cs",
"devops.aliyun.rds.instance.delete?class=rds",
"devops.aliyun.oss.bucket.delete?class=oss",
"devops.aliyun.slb.balancer.delete?class=slb",
"devops.aliyun.dns.domain.record.delete?class=dns",
"devops.aliyun.vpc.vswitch.delete?class=vpc",
"devops.aliyun.vpc.vpc.delete?class=vpc"
]
}
}
}
}