|
| 1 | +kinds: |
| 2 | + - name: linux |
| 3 | + gdb-cmd: "sudo -E gdb %CONFIGDIR%/../../output-linux/vmlinux" |
| 4 | + gdb-target-cmds: ["target remote %RUNDIR%/s/gdbserver"] |
| 5 | + gdb-run-cmds: ["c"] |
| 6 | + qemu: |
| 7 | + kernel: "%CONFIGDIR%/../../output-linux/arch/x86/boot/bzImage" |
| 8 | + initrd: "%CONFIGDIR%/../../output-buildroot/images/rootfs.cpio.gz" |
| 9 | + cmdline-extra: "acpi=off nokaslr" |
| 10 | + memory: "4096M" |
| 11 | + kvm: true |
| 12 | + ncpu: 4 |
| 13 | + console: |
| 14 | + timeout: 180 |
| 15 | + volumes: |
| 16 | + - "%RUNDIR%/s:/tmp/qemu-sock" |
| 17 | + |
| 18 | + - name: trex_phy |
| 19 | + privileged: true |
| 20 | + # image: quay.io/chopps/trex:v2.98 |
| 21 | + # cap_add: |
| 22 | + # - ALL |
| 23 | + # podman: |
| 24 | + # extra-args: |
| 25 | + # - --sysctl=net.ipv6.conf.all.disable_ipv6=1 |
| 26 | + # - --sysctl=net.ipv6.conf.all.forwarding=0 |
| 27 | + # - --sysctl=net.ipv6.conf.default.forwarding=0 |
| 28 | + cmd: | |
| 29 | + cd /opt/trex/current |
| 30 | + ./t-rex-64 --cfg /etc/trex_cfg.yaml -v 3 --no-termio --no-scapy-server --iom 0 -i |
| 31 | + tail -f /dev/null |
| 32 | + ports: |
| 33 | + - 8090:8090 |
| 34 | + - 4500:4500 |
| 35 | + - 4501:4501 |
| 36 | + volumes: |
| 37 | + - "%CONFIGDIR%/trex_cfg_phy.yaml:/etc/trex_cfg.yaml" |
| 38 | + - "%CONFIGDIR%/../common:/common" |
| 39 | + - /dev/hugepages:/dev/hugepages |
| 40 | + # - /var/run/systemd/journal/socket:/var/run/systemd/journal/socket |
| 41 | + merge: ["volumes"] |
| 42 | + |
| 43 | + - name: trex |
| 44 | + # image: quay.io/chopps/trex:v3.00 |
| 45 | + cmd: | |
| 46 | + ip addr |
| 47 | + NETH=$(ls -d /sys/class/net/eth* | wc -l) |
| 48 | + TAPS="" |
| 49 | + for ((i=0; i<$NETH; i++)); do |
| 50 | + ip addr flush dev eth$i |
| 51 | + done |
| 52 | + cd /opt/trex/current |
| 53 | + ./t-rex-64 --cfg /etc/trex_cfg.yaml -v 3 --no-termio --no-scapy-server --iom 0 -i |
| 54 | + tail -f /dev/null |
| 55 | + ports: |
| 56 | + - 8090:8090 |
| 57 | + - 4500:4500 |
| 58 | + - 4501:4501 |
| 59 | + volumes: |
| 60 | + - "%CONFIGDIR%/trex_cfg.yaml:/etc/trex_cfg.yaml" |
| 61 | + - "%CONFIGDIR%/../common:/common" |
| 62 | + merge: ["volumes"] |
| 63 | + |
| 64 | +cli: |
| 65 | + commands: |
| 66 | + - name: con |
| 67 | + exec-kind: |
| 68 | + - kind: linux |
| 69 | + exec: "socat /dev/stdin,rawer,escape=0x1d,,echo=0,icanon=0 unix-connect:/tmp/qemu-sock/vcon0" |
| 70 | + - kind: trex |
| 71 | + exec: "bash -c 'cd /opt/trex/current && ./trex-console'" |
| 72 | + format: "con HOST|TREX [HOST|TREX ...]" |
| 73 | + help: "open console on given hosts, * for all" |
| 74 | + new-window: true |
| 75 | + - name: mon |
| 76 | + exec-kind: |
| 77 | + - kind: linux |
| 78 | + exec: "socat /dev/stdin,rawer,escape=0x1d,,echo=0,icanon=0 unix-connect:/tmp/qemu-sock/monitor" |
| 79 | + - kind: trex |
| 80 | + exec: "bash -c 'cd /opt/trex/current && ./trex-console -r'" |
| 81 | + format: "mon HOST|TREX [HOST|TREX ...]" |
| 82 | + help: "open monitor on given hosts, * for all" |
| 83 | + new-window: true |
| 84 | + - name: xmon |
| 85 | + exec-kind: |
| 86 | + - kind: trex |
| 87 | + exec: "bash -c 'cd /opt/trex/current && ./trex-console -r -x'" |
| 88 | + format: "xmon TREX [TREX ...]" |
| 89 | + help: "open trex monitor using X11" |
| 90 | + new-window: false |
| 91 | + - name: ssh |
| 92 | + exec: "ssh -i ../../root-key -o 'UserKnownHostsFile=/dev/null' -o 'StrictHostKeyChecking=no' {host.intf_addrs['eth0'].ip}" |
| 93 | + format: "ssh HOST [HOST ...]" |
| 94 | + help: "open ssh to given hosts, * for all" |
| 95 | + new-window: true |
0 commit comments