You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/measuring/usage-scenario.md
+37-21Lines changed: 37 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,17 @@ weight: 815
8
8
9
9
The `usage_scenario.yml` consists of these main blocks:
10
10
11
-
-`networks` - Handles the orchestration of networks
11
+
-Start of the file with some basic root level keys
12
12
-`services` - Handles the orchestration of containers
13
+
-`networks` - (optional) Handles the orchestration of networks
13
14
-`flow` - Handles the interaction with the containers
14
-
-`compose-file*` - A compose file to include.
15
-
16
-
`*`: means these values are optional.
15
+
-`compose-file` - (optional) A compose file to include
17
16
18
17
Its format is an extended subset of the [Docker Compose Specification](https://docs.docker.com/compose/compose-file/), which means that we keep the same format, but disallow some options and also add some exclusive options to our tool. However, keys that have the same name are also identical in function - thought potentially with some limitations.
19
18
20
-
At the beginning of the file you should specify `name`, `author`, and `architecture`.
21
-
These will help you later on tell what the scenario is doing.
22
-
23
-
**Linux** and **Darwin** are the only supported architectures. If you don't mention an `architecture` it will run on both.
24
-
25
-
Please note that when running the measurement you can supply an additional name,
26
-
which can and should be different from the name in the `usage_scenario.yml`.
19
+
See also the note on [unsupported features](#unsupported-docker-compose-features)
27
20
28
-
The idea is to have a general name for the `usage_scenario.yml` and another one for the specific measurement run.
description: This is just an example usage_scenario ...
37
30
```
38
31
39
-
When running the `runner.py` we would then set `--name` for instance to: *Hugo Test run on my Macbook*
40
32
41
-
### Networks
33
+
- `name` **[str]**: Name of the scenario
34
+
- `description` **[str]**: Detailed description of the scenario
35
+
- `author` **[str]**: Author of the scenario
36
+
- `architecture` **[str]** *(optional)*: If your *usage_scenario* runs only on a specific architecture you can instruct the GMT to check if the architecture of the machine matches. You can specify **Linux**, **Windows** and **Darwin**. Omit this key if your scenario has no architecture restriction.
37
+
+ Note: Windows with WSL2 and Linux containers would be **Linux** as architecture
38
+
- `ignore-unsupported-compose` **[bool]** *(optional)*: Ignore unsupported [Docker Compose](https://docs.docker.com/compose/compose-file) features and still run usage_scenario
42
39
43
-
Example:
44
40
45
-
```yaml
46
-
networks:
47
-
name: wordpress-mariadb-data-green-coding-network
48
-
```
41
+
Please note that when running the measurement you can supply an additional name,
42
+
which can and should be different from the name in the `usage_scenario.yml`.
43
+
44
+
The idea is to have a general name for the `usage_scenario.yml` and another one for the specific measurement run.
45
+
46
+
When running the `runner.py` we would then set `--name` for instance to: *Hugo Test run on my Macbook*
49
47
50
-
- `networks:`**[dict]** (Dictionary of network dictionaries for orchestration)
51
-
+ `name: [NETWORK]` **[a-zA-Z0-9_]** The name of the network with a trailing colon. No value required.
52
48
53
49
### Services
54
50
@@ -153,6 +149,18 @@ services:
153
149
Please note that every key below `services` will serve as the name of the
154
150
container later on. You can overwrite the container name with the key `container_name`.
155
151
152
+
### Networks
153
+
154
+
Example:
155
+
156
+
```yaml
157
+
networks:
158
+
name: wordpress-mariadb-data-green-coding-network
159
+
```
160
+
161
+
- `networks:`**[dict]** (Dictionary of network dictionaries for orchestration)
162
+
+ `name: [NETWORK]` **[a-zA-Z0-9_]** The name of the network with a trailing colon. No value required.
163
+
156
164
### Flow
157
165
158
166
Example:
@@ -275,3 +283,11 @@ Every note will then be consumed and can be retrieved through the API.
275
283
Please be aware that the timestamps of the note do not have to be identical
276
284
with any command or action of the container. If the timestamp however does not fall
277
285
into the time window of your measurement run it will not be displayed in the frontend.
286
+
287
+
### Unsupported Docker Compose features
288
+
289
+
All features not listed here are not supported by the Green Metrics Tool.
290
+
291
+
Since we allow the import of [Docker Compose](https://docs.docker.com/compose/compose-file) files this can lead to importing unsupported features.
292
+
293
+
GMT will error in this case. If you do not want that add the `ignore-unsupported-compose` key after you have tested your *usage_scenario.yml* file.
0 commit comments