@intentius/behold 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +517 -2
- package/LICENSE +190 -0
- package/README.md +22 -2
- package/THIRD_PARTY.md +75 -0
- package/demos.json +78 -15
- package/dist/cli.js +4585 -1467
- package/example-choudoufu-estate/.behold.json +8 -0
- package/example-choudoufu-estate/README.md +48 -0
- package/example-choudoufu-estate/monolith/behaviour.live.json +495 -0
- package/example-choudoufu-estate/monolith/carve.json +12 -0
- package/example-choudoufu-estate/monolith/main.tf +127 -0
- package/example-choudoufu-estate/scripts/choudoufu-down.sh +8 -0
- package/example-choudoufu-estate/scripts/choudoufu-up.sh +62 -0
- package/example-choudoufu-estate/team-a/behaviour.live.json +179 -0
- package/example-choudoufu-estate/team-a/main.tf +58 -0
- package/example-choudoufu-estate/team-b/behaviour.live.json +179 -0
- package/example-choudoufu-estate/team-b/main.tf +73 -0
- package/example-choudoufu-estate/team-c/behaviour.live.json +179 -0
- package/example-choudoufu-estate/team-c/main.tf +51 -0
- package/licenses/cncf-artwork-LICENSE.md +13 -0
- package/licenses/iTerm2-Color-Schemes-LICENSE +31 -0
- package/licenses/kubernetes-icons-LICENSE +201 -0
- package/package.json +24 -7
- package/web/app.js +929 -20
- package/web/behaviour-scale.js +380 -0
- package/web/behaviour-scale.test.js +307 -0
- package/web/cross-env.js +58 -0
- package/web/cross-env.test.js +61 -0
- package/web/index.html +39 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# choudoufu-estate — behold's tag-owned estate demo (#366)
|
|
2
|
+
|
|
3
|
+
Four [choudoufu](https://github.com/INTENTIUS/choudoufu) estates served as one
|
|
4
|
+
composed estate. choudoufu is an OpenTofu fork whose ownership lives on the
|
|
5
|
+
resource as two AWS tags, `tofu-estate` and `tofu-address`; the state file is a
|
|
6
|
+
cache that is allowed to be stale, and an estate is split by retagging. The
|
|
7
|
+
estates here are the live-mv workbench's own fixture (`examples/live-mv-workbench`
|
|
8
|
+
in the choudoufu repo), copied:
|
|
9
|
+
|
|
10
|
+
- **monolith/** — the terralith: three teams' IAM roles, policies, inline
|
|
11
|
+
policies, attachments and log groups in one estate. `scripts/choudoufu-up.sh`
|
|
12
|
+
applies it, so every one of its 21 resources is live and marked
|
|
13
|
+
`tofu-estate = tlmig-sample-monolith`.
|
|
14
|
+
- **team-a/**, **team-b/**, **team-c/** — the estates the teams would own.
|
|
15
|
+
Each declares its own seven resources, which are the monolith's: served
|
|
16
|
+
live, every card reads *owned by tlmig-sample-monolith*, with a dashed
|
|
17
|
+
edge to the monolith's card of the same address. team-a also declares a VPC
|
|
18
|
+
the monolith does not, and team-b reads it through a data source filtered
|
|
19
|
+
on team-a's marker tags — the cross-estate reference `live-check -json`
|
|
20
|
+
states, drawn as an edge between the two boxes.
|
|
21
|
+
- **monolith/carve.json** — the plan: team-a's five taggable resources move to
|
|
22
|
+
`tlmig-sample-team-a`. The scope panel shows each move with the
|
|
23
|
+
`choudoufu live-mv` line to run and a link to the morph; behold never runs
|
|
24
|
+
the write.
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npx @intentius/behold demo choudoufu-estate # needs Docker and choudoufu on PATH
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
What the demo does: boots a scratch floci (`behold-choudoufu-floci` on
|
|
31
|
+
127.0.0.1:4650), runs `choudoufu init` in each estate copy (behold's own copy,
|
|
32
|
+
never a served project), applies the monolith, and serves the four estates
|
|
33
|
+
with `--env live`.
|
|
34
|
+
|
|
35
|
+
Then, by hand, in `team-a/` (with the same `AWS_ENDPOINT_URL` the demo
|
|
36
|
+
printed):
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
choudoufu live-mv -from-estate=tlmig-sample-monolith aws_iam_role.team_a aws_iam_role.team_a
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Reload the overlay: the role and its two followers are green in team-a's box,
|
|
43
|
+
the monolith's card for it reads *owned by tlmig-sample-team-a*, and
|
|
44
|
+
`/api/choudoufu/moves?plan=carve.json&receipt=1` says `moved`. Apply team-a
|
|
45
|
+
afterwards to bring its VPC up, and team-b's read resolves.
|
|
46
|
+
|
|
47
|
+
`bash scripts/choudoufu-down.sh` removes the container. The `.terraform/`
|
|
48
|
+
directories and the record stores are gitignored.
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"engine": "behold-fixture",
|
|
4
|
+
"version": "0",
|
|
5
|
+
"at": {
|
|
6
|
+
"traffic": "100 rps, p50"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"entities": {
|
|
10
|
+
"aws_iam_role.team_a": {
|
|
11
|
+
"at": {
|
|
12
|
+
"traffic": "100 rps, p50"
|
|
13
|
+
},
|
|
14
|
+
"cost": {
|
|
15
|
+
"perHour": 0.0004,
|
|
16
|
+
"currency": "USD"
|
|
17
|
+
},
|
|
18
|
+
"headroom": {
|
|
19
|
+
"cpu": 0.9,
|
|
20
|
+
"latency": 0.85
|
|
21
|
+
},
|
|
22
|
+
"errorRate": 0.001,
|
|
23
|
+
"resilience": {
|
|
24
|
+
"failure": "one zone lost",
|
|
25
|
+
"verdict": "survives"
|
|
26
|
+
},
|
|
27
|
+
"provenance": {
|
|
28
|
+
"engine": "behold-fixture",
|
|
29
|
+
"version": "0",
|
|
30
|
+
"tolerance": "fixture",
|
|
31
|
+
"basis": "modeled"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"aws_iam_role_policy.team_a_inline": {
|
|
35
|
+
"at": {
|
|
36
|
+
"traffic": "100 rps, p50"
|
|
37
|
+
},
|
|
38
|
+
"cost": {
|
|
39
|
+
"perHour": 0.0002,
|
|
40
|
+
"currency": "USD"
|
|
41
|
+
},
|
|
42
|
+
"headroom": {
|
|
43
|
+
"cpu": 0.84,
|
|
44
|
+
"latency": 0.76
|
|
45
|
+
},
|
|
46
|
+
"errorRate": 0.001,
|
|
47
|
+
"resilience": {
|
|
48
|
+
"failure": "one zone lost",
|
|
49
|
+
"verdict": "survives"
|
|
50
|
+
},
|
|
51
|
+
"provenance": {
|
|
52
|
+
"engine": "behold-fixture",
|
|
53
|
+
"version": "0",
|
|
54
|
+
"tolerance": "fixture",
|
|
55
|
+
"basis": "modeled"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"aws_iam_policy.team_a": {
|
|
59
|
+
"at": {
|
|
60
|
+
"traffic": "100 rps, p50"
|
|
61
|
+
},
|
|
62
|
+
"cost": {
|
|
63
|
+
"perHour": 0.0002,
|
|
64
|
+
"currency": "USD"
|
|
65
|
+
},
|
|
66
|
+
"headroom": {
|
|
67
|
+
"cpu": 0.74
|
|
68
|
+
},
|
|
69
|
+
"errorRate": 0.001,
|
|
70
|
+
"resilience": {
|
|
71
|
+
"failure": "one zone lost",
|
|
72
|
+
"verdict": "survives"
|
|
73
|
+
},
|
|
74
|
+
"provenance": {
|
|
75
|
+
"engine": "behold-fixture",
|
|
76
|
+
"version": "0",
|
|
77
|
+
"tolerance": "fixture",
|
|
78
|
+
"basis": "modeled"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"aws_iam_role_policy_attachment.team_a": {
|
|
82
|
+
"at": {
|
|
83
|
+
"traffic": "100 rps, p50"
|
|
84
|
+
},
|
|
85
|
+
"cost": {
|
|
86
|
+
"perHour": 0.0001,
|
|
87
|
+
"currency": "USD"
|
|
88
|
+
},
|
|
89
|
+
"headroom": {
|
|
90
|
+
"cpu": 0.72,
|
|
91
|
+
"latency": 0.58
|
|
92
|
+
},
|
|
93
|
+
"errorRate": 0.001,
|
|
94
|
+
"resilience": {
|
|
95
|
+
"failure": "one zone lost",
|
|
96
|
+
"verdict": "survives"
|
|
97
|
+
},
|
|
98
|
+
"provenance": {
|
|
99
|
+
"engine": "behold-fixture",
|
|
100
|
+
"version": "0",
|
|
101
|
+
"tolerance": "fixture",
|
|
102
|
+
"basis": "modeled"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"aws_cloudwatch_log_group.team_a_0": {
|
|
106
|
+
"at": {
|
|
107
|
+
"traffic": "100 rps, p50"
|
|
108
|
+
},
|
|
109
|
+
"cost": {
|
|
110
|
+
"perHour": 0.0416,
|
|
111
|
+
"currency": "USD"
|
|
112
|
+
},
|
|
113
|
+
"headroom": {
|
|
114
|
+
"cpu": 0.66,
|
|
115
|
+
"latency": 0.49
|
|
116
|
+
},
|
|
117
|
+
"errorRate": 0.0004,
|
|
118
|
+
"resilience": {
|
|
119
|
+
"failure": "one zone lost",
|
|
120
|
+
"verdict": "survives"
|
|
121
|
+
},
|
|
122
|
+
"provenance": {
|
|
123
|
+
"engine": "behold-fixture",
|
|
124
|
+
"version": "0",
|
|
125
|
+
"tolerance": "fixture",
|
|
126
|
+
"basis": "modeled"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"aws_cloudwatch_log_group.team_a_1": {
|
|
130
|
+
"at": {
|
|
131
|
+
"traffic": "100 rps, p50"
|
|
132
|
+
},
|
|
133
|
+
"cost": {
|
|
134
|
+
"perHour": 0.0312,
|
|
135
|
+
"currency": "USD"
|
|
136
|
+
},
|
|
137
|
+
"headroom": {
|
|
138
|
+
"cpu": 0.6,
|
|
139
|
+
"latency": 0.85
|
|
140
|
+
},
|
|
141
|
+
"errorRate": 0.0004,
|
|
142
|
+
"resilience": {
|
|
143
|
+
"failure": "one zone lost",
|
|
144
|
+
"verdict": "survives"
|
|
145
|
+
},
|
|
146
|
+
"provenance": {
|
|
147
|
+
"engine": "behold-fixture",
|
|
148
|
+
"version": "0",
|
|
149
|
+
"tolerance": "fixture",
|
|
150
|
+
"basis": "modeled"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"aws_cloudwatch_log_group.team_a_2": {
|
|
154
|
+
"at": {
|
|
155
|
+
"traffic": "100 rps, p50"
|
|
156
|
+
},
|
|
157
|
+
"cost": {
|
|
158
|
+
"perHour": 0.0208,
|
|
159
|
+
"currency": "USD"
|
|
160
|
+
},
|
|
161
|
+
"headroom": {
|
|
162
|
+
"cpu": 0.54,
|
|
163
|
+
"latency": 0.76
|
|
164
|
+
},
|
|
165
|
+
"errorRate": 0.0004,
|
|
166
|
+
"resilience": {
|
|
167
|
+
"failure": "one zone lost",
|
|
168
|
+
"verdict": "survives"
|
|
169
|
+
},
|
|
170
|
+
"provenance": {
|
|
171
|
+
"engine": "behold-fixture",
|
|
172
|
+
"version": "0",
|
|
173
|
+
"tolerance": "fixture",
|
|
174
|
+
"basis": "modeled"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"aws_iam_role.team_b": {
|
|
178
|
+
"at": {
|
|
179
|
+
"traffic": "100 rps, p50"
|
|
180
|
+
},
|
|
181
|
+
"cost": {
|
|
182
|
+
"perHour": 0.0004,
|
|
183
|
+
"currency": "USD"
|
|
184
|
+
},
|
|
185
|
+
"headroom": {
|
|
186
|
+
"cpu": 0.9,
|
|
187
|
+
"latency": 0.67
|
|
188
|
+
},
|
|
189
|
+
"errorRate": 0.001,
|
|
190
|
+
"resilience": {
|
|
191
|
+
"failure": "one zone lost",
|
|
192
|
+
"verdict": "degrades",
|
|
193
|
+
"note": "the trust policy names a zone-scoped service principal, so the assume path is re-established rather than kept"
|
|
194
|
+
},
|
|
195
|
+
"provenance": {
|
|
196
|
+
"engine": "behold-fixture",
|
|
197
|
+
"version": "0",
|
|
198
|
+
"tolerance": "fixture",
|
|
199
|
+
"basis": "modeled"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"aws_iam_role_policy.team_b_inline": {
|
|
203
|
+
"at": {
|
|
204
|
+
"traffic": "100 rps, p50"
|
|
205
|
+
},
|
|
206
|
+
"cost": {
|
|
207
|
+
"perHour": 0.0002,
|
|
208
|
+
"currency": "USD"
|
|
209
|
+
},
|
|
210
|
+
"headroom": {
|
|
211
|
+
"cpu": 0.84,
|
|
212
|
+
"latency": 0.58
|
|
213
|
+
},
|
|
214
|
+
"errorRate": 0.001,
|
|
215
|
+
"resilience": {
|
|
216
|
+
"failure": "one zone lost",
|
|
217
|
+
"verdict": "survives"
|
|
218
|
+
},
|
|
219
|
+
"provenance": {
|
|
220
|
+
"engine": "behold-fixture",
|
|
221
|
+
"version": "0",
|
|
222
|
+
"tolerance": "fixture",
|
|
223
|
+
"basis": "modeled"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"aws_iam_policy.team_b": {
|
|
227
|
+
"at": {
|
|
228
|
+
"traffic": "100 rps, p50"
|
|
229
|
+
},
|
|
230
|
+
"cost": {
|
|
231
|
+
"perHour": 0.0002,
|
|
232
|
+
"currency": "USD"
|
|
233
|
+
},
|
|
234
|
+
"headroom": {
|
|
235
|
+
"cpu": 0.78,
|
|
236
|
+
"latency": 0.49
|
|
237
|
+
},
|
|
238
|
+
"errorRate": 0.001,
|
|
239
|
+
"resilience": {
|
|
240
|
+
"failure": "one zone lost",
|
|
241
|
+
"verdict": "survives"
|
|
242
|
+
},
|
|
243
|
+
"provenance": {
|
|
244
|
+
"engine": "behold-fixture",
|
|
245
|
+
"version": "0",
|
|
246
|
+
"tolerance": "fixture",
|
|
247
|
+
"basis": "modeled"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"aws_iam_role_policy_attachment.team_b": {
|
|
251
|
+
"at": {
|
|
252
|
+
"traffic": "100 rps, p50"
|
|
253
|
+
},
|
|
254
|
+
"cost": {
|
|
255
|
+
"perHour": 0.0001,
|
|
256
|
+
"currency": "USD"
|
|
257
|
+
},
|
|
258
|
+
"headroom": {
|
|
259
|
+
"cpu": 0.72,
|
|
260
|
+
"latency": 0.85
|
|
261
|
+
},
|
|
262
|
+
"errorRate": 0.001,
|
|
263
|
+
"resilience": {
|
|
264
|
+
"failure": "one zone lost",
|
|
265
|
+
"verdict": "survives"
|
|
266
|
+
},
|
|
267
|
+
"provenance": {
|
|
268
|
+
"engine": "behold-fixture",
|
|
269
|
+
"version": "0",
|
|
270
|
+
"tolerance": "fixture",
|
|
271
|
+
"basis": "modeled"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"aws_cloudwatch_log_group.team_b_0": {
|
|
275
|
+
"at": {
|
|
276
|
+
"traffic": "100 rps, p50"
|
|
277
|
+
},
|
|
278
|
+
"cost": {
|
|
279
|
+
"perHour": 0.0416,
|
|
280
|
+
"currency": "USD"
|
|
281
|
+
},
|
|
282
|
+
"headroom": {
|
|
283
|
+
"cpu": 0.66,
|
|
284
|
+
"latency": 0.76
|
|
285
|
+
},
|
|
286
|
+
"errorRate": 0.0004,
|
|
287
|
+
"resilience": {
|
|
288
|
+
"failure": "one zone lost",
|
|
289
|
+
"verdict": "survives"
|
|
290
|
+
},
|
|
291
|
+
"provenance": {
|
|
292
|
+
"engine": "behold-fixture",
|
|
293
|
+
"version": "0",
|
|
294
|
+
"tolerance": "fixture",
|
|
295
|
+
"basis": "modeled"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"aws_cloudwatch_log_group.team_b_1": {
|
|
299
|
+
"at": {
|
|
300
|
+
"traffic": "100 rps, p50"
|
|
301
|
+
},
|
|
302
|
+
"cost": {
|
|
303
|
+
"perHour": 0.0312,
|
|
304
|
+
"currency": "USD"
|
|
305
|
+
},
|
|
306
|
+
"headroom": {
|
|
307
|
+
"cpu": 0.6,
|
|
308
|
+
"latency": 0.67
|
|
309
|
+
},
|
|
310
|
+
"errorRate": 0.0004,
|
|
311
|
+
"resilience": {
|
|
312
|
+
"failure": "one zone lost",
|
|
313
|
+
"verdict": "survives"
|
|
314
|
+
},
|
|
315
|
+
"provenance": {
|
|
316
|
+
"engine": "behold-fixture",
|
|
317
|
+
"version": "0",
|
|
318
|
+
"tolerance": "fixture",
|
|
319
|
+
"basis": "modeled"
|
|
320
|
+
},
|
|
321
|
+
"rightSize": {
|
|
322
|
+
"suggestion": "retention 1 day -> 7 days",
|
|
323
|
+
"reason": "the group is read for a week after every deploy and re-ingested when it is not"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"aws_cloudwatch_log_group.team_b_2": {
|
|
327
|
+
"at": {
|
|
328
|
+
"traffic": "100 rps, p50"
|
|
329
|
+
},
|
|
330
|
+
"cost": {
|
|
331
|
+
"perHour": 0.0208,
|
|
332
|
+
"currency": "USD"
|
|
333
|
+
},
|
|
334
|
+
"headroom": {
|
|
335
|
+
"cpu": 0.54,
|
|
336
|
+
"latency": 0.58
|
|
337
|
+
},
|
|
338
|
+
"errorRate": 0.0004,
|
|
339
|
+
"resilience": {
|
|
340
|
+
"failure": "one zone lost",
|
|
341
|
+
"verdict": "survives"
|
|
342
|
+
},
|
|
343
|
+
"provenance": {
|
|
344
|
+
"engine": "behold-fixture",
|
|
345
|
+
"version": "0",
|
|
346
|
+
"tolerance": "fixture",
|
|
347
|
+
"basis": "modeled"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"aws_iam_role.team_c": {
|
|
351
|
+
"at": {
|
|
352
|
+
"traffic": "100 rps, p50"
|
|
353
|
+
},
|
|
354
|
+
"cost": {
|
|
355
|
+
"perHour": 0.0004,
|
|
356
|
+
"currency": "USD"
|
|
357
|
+
},
|
|
358
|
+
"headroom": {
|
|
359
|
+
"cpu": 0.9,
|
|
360
|
+
"latency": 0.49
|
|
361
|
+
},
|
|
362
|
+
"errorRate": 0.001,
|
|
363
|
+
"resilience": {
|
|
364
|
+
"failure": "one zone lost",
|
|
365
|
+
"verdict": "survives"
|
|
366
|
+
},
|
|
367
|
+
"provenance": {
|
|
368
|
+
"engine": "behold-fixture",
|
|
369
|
+
"version": "0",
|
|
370
|
+
"tolerance": "fixture",
|
|
371
|
+
"basis": "modeled"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"aws_iam_role_policy.team_c_inline": {
|
|
375
|
+
"at": {
|
|
376
|
+
"traffic": "100 rps, p50"
|
|
377
|
+
},
|
|
378
|
+
"cost": {
|
|
379
|
+
"perHour": 0.0002,
|
|
380
|
+
"currency": "USD"
|
|
381
|
+
},
|
|
382
|
+
"headroom": {
|
|
383
|
+
"cpu": 0.84,
|
|
384
|
+
"latency": 0.85
|
|
385
|
+
},
|
|
386
|
+
"errorRate": 0.001,
|
|
387
|
+
"resilience": {
|
|
388
|
+
"failure": "one zone lost",
|
|
389
|
+
"verdict": "survives"
|
|
390
|
+
},
|
|
391
|
+
"provenance": {
|
|
392
|
+
"engine": "behold-fixture",
|
|
393
|
+
"version": "0",
|
|
394
|
+
"tolerance": "fixture",
|
|
395
|
+
"basis": "modeled"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"aws_iam_policy.team_c": {
|
|
399
|
+
"at": {
|
|
400
|
+
"traffic": "100 rps, p50"
|
|
401
|
+
},
|
|
402
|
+
"cost": {
|
|
403
|
+
"perHour": 0.0002,
|
|
404
|
+
"currency": "USD"
|
|
405
|
+
},
|
|
406
|
+
"headroom": {
|
|
407
|
+
"cpu": 0.78,
|
|
408
|
+
"latency": 0.76
|
|
409
|
+
},
|
|
410
|
+
"errorRate": 0.001,
|
|
411
|
+
"resilience": {
|
|
412
|
+
"failure": "one zone lost",
|
|
413
|
+
"verdict": "survives"
|
|
414
|
+
},
|
|
415
|
+
"provenance": {
|
|
416
|
+
"engine": "behold-fixture",
|
|
417
|
+
"version": "0",
|
|
418
|
+
"tolerance": "fixture",
|
|
419
|
+
"basis": "modeled"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"aws_cloudwatch_log_group.team_c_0": {
|
|
423
|
+
"at": {
|
|
424
|
+
"traffic": "100 rps, p50"
|
|
425
|
+
},
|
|
426
|
+
"cost": {
|
|
427
|
+
"perHour": 0.0416,
|
|
428
|
+
"currency": "USD"
|
|
429
|
+
},
|
|
430
|
+
"headroom": {
|
|
431
|
+
"cpu": 0.66,
|
|
432
|
+
"latency": 0.58
|
|
433
|
+
},
|
|
434
|
+
"errorRate": 0.0004,
|
|
435
|
+
"resilience": {
|
|
436
|
+
"failure": "one zone lost",
|
|
437
|
+
"verdict": "survives"
|
|
438
|
+
},
|
|
439
|
+
"provenance": {
|
|
440
|
+
"engine": "behold-fixture",
|
|
441
|
+
"version": "0",
|
|
442
|
+
"tolerance": "fixture",
|
|
443
|
+
"basis": "modeled"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"aws_cloudwatch_log_group.team_c_1": {
|
|
447
|
+
"at": {
|
|
448
|
+
"traffic": "100 rps, p50"
|
|
449
|
+
},
|
|
450
|
+
"cost": {
|
|
451
|
+
"perHour": 0.0312,
|
|
452
|
+
"currency": "USD"
|
|
453
|
+
},
|
|
454
|
+
"headroom": {
|
|
455
|
+
"cpu": 0.6,
|
|
456
|
+
"latency": 0.49
|
|
457
|
+
},
|
|
458
|
+
"errorRate": 0.0004,
|
|
459
|
+
"resilience": {
|
|
460
|
+
"failure": "one zone lost",
|
|
461
|
+
"verdict": "survives"
|
|
462
|
+
},
|
|
463
|
+
"provenance": {
|
|
464
|
+
"engine": "behold-fixture",
|
|
465
|
+
"version": "0",
|
|
466
|
+
"tolerance": "fixture",
|
|
467
|
+
"basis": "modeled"
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"aws_cloudwatch_log_group.team_c_2": {
|
|
471
|
+
"at": {
|
|
472
|
+
"traffic": "100 rps, p50"
|
|
473
|
+
},
|
|
474
|
+
"cost": {
|
|
475
|
+
"perHour": 0.0208,
|
|
476
|
+
"currency": "USD"
|
|
477
|
+
},
|
|
478
|
+
"headroom": {
|
|
479
|
+
"cpu": 0.54,
|
|
480
|
+
"latency": 0.85
|
|
481
|
+
},
|
|
482
|
+
"errorRate": 0.0004,
|
|
483
|
+
"resilience": {
|
|
484
|
+
"failure": "one zone lost",
|
|
485
|
+
"verdict": "survives"
|
|
486
|
+
},
|
|
487
|
+
"provenance": {
|
|
488
|
+
"engine": "behold-fixture",
|
|
489
|
+
"version": "0",
|
|
490
|
+
"tolerance": "fixture",
|
|
491
|
+
"basis": "modeled"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"from": "tlmig-sample-monolith",
|
|
3
|
+
"estates": ["tlmig-sample-team-a"],
|
|
4
|
+
"moves": [
|
|
5
|
+
{ "address": "aws_iam_role.team_a", "from": "tlmig-sample-monolith", "to": "tlmig-sample-team-a" },
|
|
6
|
+
{ "address": "aws_iam_policy.team_a", "from": "tlmig-sample-monolith", "to": "tlmig-sample-team-a" },
|
|
7
|
+
{ "address": "aws_cloudwatch_log_group.team_a_0", "from": "tlmig-sample-monolith", "to": "tlmig-sample-team-a" },
|
|
8
|
+
{ "address": "aws_cloudwatch_log_group.team_a_1", "from": "tlmig-sample-monolith", "to": "tlmig-sample-team-a" },
|
|
9
|
+
{ "address": "aws_cloudwatch_log_group.team_a_2", "from": "tlmig-sample-monolith", "to": "tlmig-sample-team-a" }
|
|
10
|
+
],
|
|
11
|
+
"rules": [{ "match": "name", "value": "team_a", "to": "tlmig-sample-team-a" }]
|
|
12
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
terraform {
|
|
2
|
+
required_providers {
|
|
3
|
+
aws = {
|
|
4
|
+
source = "hashicorp/aws"
|
|
5
|
+
version = "= 6.58.0"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
live {
|
|
9
|
+
estate = "tlmig-sample-monolith"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
provider "aws" {
|
|
14
|
+
region = "us-east-1"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# ---- team-a ----
|
|
19
|
+
resource "aws_iam_role" "team_a" {
|
|
20
|
+
name = "tlmig-sample-team-a-role"
|
|
21
|
+
assume_role_policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Principal = { Service = "ec2.amazonaws.com" }, Action = "sts:AssumeRole" }] })
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
resource "aws_iam_role_policy" "team_a_inline" {
|
|
25
|
+
name = "tlmig-sample-team-a-inline"
|
|
26
|
+
role = aws_iam_role.team_a.id
|
|
27
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:CreateLogStream"], Resource = "*" }] })
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
resource "aws_iam_policy" "team_a" {
|
|
31
|
+
name = "tlmig-sample-team-a-policy"
|
|
32
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:PutLogEvents"], Resource = "*" }] })
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
resource "aws_iam_role_policy_attachment" "team_a" {
|
|
36
|
+
role = aws_iam_role.team_a.name
|
|
37
|
+
policy_arn = aws_iam_policy.team_a.arn
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
resource "aws_cloudwatch_log_group" "team_a_0" {
|
|
41
|
+
name = "/tlmig-sample/team-a/svc-0"
|
|
42
|
+
retention_in_days = 1
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
resource "aws_cloudwatch_log_group" "team_a_1" {
|
|
46
|
+
name = "/tlmig-sample/team-a/svc-1"
|
|
47
|
+
retention_in_days = 1
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
resource "aws_cloudwatch_log_group" "team_a_2" {
|
|
51
|
+
name = "/tlmig-sample/team-a/svc-2"
|
|
52
|
+
retention_in_days = 1
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# ---- team-b ----
|
|
56
|
+
resource "aws_iam_role" "team_b" {
|
|
57
|
+
name = "tlmig-sample-team-b-role"
|
|
58
|
+
assume_role_policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Principal = { Service = "ec2.amazonaws.com" }, Action = "sts:AssumeRole" }] })
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
resource "aws_iam_role_policy" "team_b_inline" {
|
|
62
|
+
name = "tlmig-sample-team-b-inline"
|
|
63
|
+
role = aws_iam_role.team_b.id
|
|
64
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:CreateLogStream"], Resource = "*" }] })
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
resource "aws_iam_policy" "team_b" {
|
|
68
|
+
name = "tlmig-sample-team-b-policy"
|
|
69
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:PutLogEvents"], Resource = "*" }] })
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
resource "aws_iam_role_policy_attachment" "team_b" {
|
|
73
|
+
role = aws_iam_role.team_b.name
|
|
74
|
+
policy_arn = aws_iam_policy.team_b.arn
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
resource "aws_cloudwatch_log_group" "team_b_0" {
|
|
78
|
+
name = "/tlmig-sample/team-b/svc-0"
|
|
79
|
+
retention_in_days = 1
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
resource "aws_cloudwatch_log_group" "team_b_1" {
|
|
83
|
+
name = "/tlmig-sample/team-b/svc-1"
|
|
84
|
+
retention_in_days = 1
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
resource "aws_cloudwatch_log_group" "team_b_2" {
|
|
88
|
+
name = "/tlmig-sample/team-b/svc-2"
|
|
89
|
+
retention_in_days = 1
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# ---- team-c ----
|
|
93
|
+
resource "aws_iam_role" "team_c" {
|
|
94
|
+
name = "tlmig-sample-team-c-role"
|
|
95
|
+
assume_role_policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Principal = { Service = "ec2.amazonaws.com" }, Action = "sts:AssumeRole" }] })
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
resource "aws_iam_role_policy" "team_c_inline" {
|
|
99
|
+
name = "tlmig-sample-team-c-inline"
|
|
100
|
+
role = aws_iam_role.team_c.id
|
|
101
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:CreateLogStream"], Resource = "*" }] })
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
resource "aws_iam_policy" "team_c" {
|
|
105
|
+
name = "tlmig-sample-team-c-policy"
|
|
106
|
+
policy = jsonencode({ Version = "2012-10-17", Statement = [{ Effect = "Allow", Action = ["logs:PutLogEvents"], Resource = "*" }] })
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
resource "aws_iam_role_policy_attachment" "team_c" {
|
|
110
|
+
role = aws_iam_role.team_c.name
|
|
111
|
+
policy_arn = aws_iam_policy.team_c.arn
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
resource "aws_cloudwatch_log_group" "team_c_0" {
|
|
115
|
+
name = "/tlmig-sample/team-c/svc-0"
|
|
116
|
+
retention_in_days = 1
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
resource "aws_cloudwatch_log_group" "team_c_1" {
|
|
120
|
+
name = "/tlmig-sample/team-c/svc-1"
|
|
121
|
+
retention_in_days = 1
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
resource "aws_cloudwatch_log_group" "team_c_2" {
|
|
125
|
+
name = "/tlmig-sample/team-c/svc-2"
|
|
126
|
+
retention_in_days = 1
|
|
127
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Tear down the choudoufu-estate demo: remove OUR floci container, by its name
|
|
3
|
+
# and no other (behold's scratch discipline, src/scratch.ts). The estate
|
|
4
|
+
# copies stay — they are yours to edit; the next choudoufu-up.sh re-applies.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
CONTAINER=behold-choudoufu-floci
|
|
7
|
+
docker rm -f "$CONTAINER" >/dev/null 2>&1 || true
|
|
8
|
+
echo "choudoufu-estate demo: ${CONTAINER} removed."
|