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
- Add 'reset' to cc scorch component
- README updates and formatting
- Use self.mm property instead of passing around a mm object
- Handle cases where no cmd.type is specified
- Code cleanup
Copy file name to clipboardExpand all lines: src/python/phenix_apps/apps/scorch/cc/README.md
+38-11Lines changed: 38 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,27 +5,47 @@ type: cc
5
5
exe: phenix-scorch-component-cc
6
6
```
7
7
8
+
> NOTE: miniccc must be installed and running on the target VM(s).
9
+
8
10
## Metadata Options
9
11
10
-
```
12
+
```yaml
11
13
metadata:
14
+
# Commands (types) to run for a particular stage (configure, start, stop, cleanup)
15
+
# NOTE: The stage-level types differ from the VM-level types
16
+
configure:
17
+
- type: reset # delete all miniccc commands and responses
18
+
start: [] # same array of keys as above
19
+
stop: [] # same array of keys as above
20
+
cleanup: [] # same array of keys as above
21
+
22
+
# Commands to run for specific VMs, for a particular stage
12
23
vms:
13
-
- hostname:
14
-
configure:
15
-
- type: exec # can be exec, background, send, or recv
16
-
args: whoami # a simple string of args (not an array)
17
-
once: <bool> # only execute a command once (applicable for exec and background) (default: true)
18
-
wait: <bool> # wait for cmd to be executed by VM (default: false)
19
-
validator: <bash script to validate exec results>
20
-
start: [] # same array of keys as above
21
-
stop: [] # same array of keys as above
22
-
cleanup: [] # same array of keys as above
24
+
- hostname:
25
+
configure:
26
+
- type: exec # can be exec, background, send, recv
27
+
args: whoami # a simple string of args (not an array)
28
+
once: <bool> # only execute a command once (applicable for exec and background) (default: true)
29
+
wait: <bool> # wait for cmd to be executed by VM (default: false)
30
+
validator: <bash script to validate exec results>
31
+
start: [] # same array of keys as above
32
+
stop: [] # same array of keys as above
33
+
cleanup: [] # same array of keys as above
23
34
```
24
35
25
36
> The validator is only used when `type = exec` and forces `wait = true`. The
26
37
> validator script should be written to process STDIN. Anything the validator
27
38
> script writes to STDERR will be available to the user if the validation fails.
28
39
40
+
## Types
41
+
- VM-specific command types
42
+
- `exec`: execute a command (`cc exec`)
43
+
- `background`: execute a command in the background (component will continue)
44
+
- `send`: send a file (Host -> VM)
45
+
- `recv`: receive a file (VM -> Host)
46
+
- Stage-level command types
47
+
- `reset`: reset miniccc state, by clearing filter and deleting all commands and responses. **WARNING**: THIS WILL INTERFERE WITH OPERATION OF MANY COMPONENTS! Reset should only be used at the start or end of a run or a loop (use with special care in loops!).
48
+
29
49
## Notes on the `exec` and `background` Type
30
50
31
51
When a `cc` command is configured, minimega will send the command to a `miniccc`
@@ -68,6 +88,13 @@ host for the current scorch run, loop, and count.
0 commit comments