scenario_file_format
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scenario_file_format [2017/10/20 11:21] – [Grammar] mimbert | scenario_file_format [2023/08/29 15:29] (current) – Add example of passive keyword in new syntax cmorin | ||
---|---|---|---|
Line 11: | Line 11: | ||
The syntax of a yaml file may be checked with http:// | The syntax of a yaml file may be checked with http:// | ||
====== Grammar ====== | ====== Grammar ====== | ||
+ | |||
+ | We're progressively adding new capabilities to the CorteXlab platform. There is now two different syntaxes for the scenario file, the legacy syntax, where commands are run on the nodes, and the new syntax, where [[docker|docker]] containers are run on the nodes. Both syntaxes are allowed, even in the same scenario, but only one syntax is allowed per-node. | ||
The scenario.yaml file is structured as follows: | The scenario.yaml file is structured as follows: | ||
- | * It //MUST// contain a //description// key, value pair whose value is a string: '' | + | * It //MUST// contain a '' |
- | * It //MUST// contain a //duration// key, value pair, whose value is an integer, the max experiment duration expressed in seconds: '' | + | * It //MUST// contain a '' |
- | * It //MUST// contain a //nodes// key, whose value is a mapping (aka hash, or dictionnary): '' | + | * It //MUST// contain a '' |
- | * Nodes key, value pairs, whose keys are the node names (in the set //node1// to //node40//, and whose values are mappings: | + | * Nodes key, value pairs, whose keys are the node names (in the set '' |
- | * which //MUST// contain | + | * which //MUST// contain |
+ | * **(new syntax)** a '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * **(old syntax)** a '' | ||
nodes: | nodes: | ||
node1: | node1: | ||
Line 23: | Line 31: | ||
- sleep 10000 | - sleep 10000 | ||
- ./my_script | - ./my_script | ||
- | </ | + | </ |
- | * which //MAY// contain a //passive// key, value pair, whose value is a boolean (default is '' | + | * which //MAY// contain a '' |
- | Thus, an example scenario | + | An example scenario |
+ | description: | ||
+ | duration: 120 | ||
+ | nodes: | ||
+ | node3: | ||
+ | container: | ||
+ | - image: m1mbert/ | ||
+ | - image: m1mbert/ | ||
+ | command: / | ||
+ | node4: | ||
+ | container: | ||
+ | image: m1mbert/ | ||
+ | passive: true | ||
+ | </ | ||
- | < | + | An example scenario (old syntax):< |
description: | description: | ||
duration: 60 | duration: 60 |
scenario_file_format.1508491314.txt.gz · Last modified: 2017/10/20 11:21 by mimbert