Skip to content

Commit 4bc8bfd

Browse files
committed
Added ignore-unsupported-compose
1 parent 7f15d06 commit 4bc8bfd

File tree

1 file changed

+37
-21
lines changed

1 file changed

+37
-21
lines changed

content/en/docs/measuring/usage-scenario.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,17 @@ weight: 815
88

99
The `usage_scenario.yml` consists of these main blocks:
1010

11-
- `networks` - Handles the orchestration of networks
11+
- Start of the file with some basic root level keys
1212
- `services` - Handles the orchestration of containers
13+
- `networks` - (optional) Handles the orchestration of networks
1314
- `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
1716

1817
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.
1918

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)
2720

28-
The idea is to have a general name for the `usage_scenario.yml` and another one for the specific measurement run.
21+
### Basic root level keys
2922

3023
Example for the start of a `usage_scenario.yml`
3124

@@ -36,19 +29,22 @@ author: Arne Tarara <[email protected]>
3629
description: This is just an example usage_scenario ...
3730
```
3831
39-
When running the `runner.py` we would then set `--name` for instance to: *Hugo Test run on my Macbook*
4032
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
4239

43-
Example:
4440

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*
4947

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.
5248

5349
### Services
5450

@@ -153,6 +149,18 @@ services:
153149
Please note that every key below `services` will serve as the name of the
154150
container later on. You can overwrite the container name with the key `container_name`.
155151

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+
156164
### Flow
157165

158166
Example:
@@ -275,3 +283,11 @@ Every note will then be consumed and can be retrieved through the API.
275283
Please be aware that the timestamps of the note do not have to be identical
276284
with any command or action of the container. If the timestamp however does not fall
277285
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

Comments
 (0)