= Tournament Scripts = [[TOC(DSC*,depth=2)]] == Objective == The page describes a pair of scripts that are used to execute the set of matches for both competitive and cooperative tournaments. The scripts will, based on configuration files and input arguments, image the appropriate nodes, turn them on and execute the match. === Team Configuration File === [http://en.wikipedia.org/wiki/YAML YAML] file is used as a team configuration file specifying team names and corresponding images. Each team is identified with the team number which is used by the match configuration file to specify the pair (or triplet) of teams for each round of the torunament. Note that YAML format insists on leading spaces (i.e. TABs are not allowed). An example of team configuration file is: {{{ T0: name: ORBIT team 1 image: dsc-wtest1.ndz T1: name: ORBIT team 2 image: dsc-wtest2.ndz T2: name: ORBIT team 3 image: dsc-wtest3.ndz }}} === Competitive Configuration File === [http://en.wikipedia.org/wiki/YAML YAML] file that specifies matches. Number defining the match is used by the framework to select the match. {{{ G1: 1: T1 2: T2 G2: 1: T0 2: T2 G3: 1: T0 2: T1 }}} In this file we have 3 mathces defined. The first match (i.e. match 1) teams 1 and 2 will be playing and in A configuration X nodes will get image from team 1 and Y nodes will be imaged with team 2 image; B match will have team 2 image on X nodes and team 1 image on Y nodes. Similarly, match 2 will be played between team 0 and team 2 while match 3 will be played between teams 0 and 1. Default file name is '''comp_matches.yaml''' in current working directory (can be changed with the command line option). === Cooperative Configuraiton File === Format of the configuration [http://en.wikipedia.org/wiki/YAML YAML] file defines cooperative matches is:. {{{ G1: 1: T0 2: T1 3: T2 }}} T0 -> A, T1 -> B, T1 -> C == Running Competitive Matches == Script for running competitive matches is '''dsc-comp'''. The sysnopsys of the command is: {{{ Usage: /usr/local/bin/dsc-comp [OPTIONS] MATCHNUMBER MATCHVARIANT where MATCHNUMBER - ordinal number of the match to be played form the match configuration file MATCHVARIANT - A for first vairant of the match; B for second variant of the match Example: /usr/local/bin/dsc-comp 7 B OPTIONS -s, --secondary Play the match in the secondary arena [default: false] -l, --loadonly Only load images but do NOT execute the match [default: false] -v, --verbose Turn on more verbose output [default: false] -n, --notexecute Only explain what is being done rather than doing it -t, --teams FILE Teams file [default: teams.yaml] -m, --matches FILE Competitive matches configuration file [default: comp_matches.yaml -h, --help Show this usage message and quit. }}}