minimega command and control

David Fritz

July 2019

Overview

Command and control with minimega

Overview

Experimentation

An experiment is (from the perspective of the operator)

Feature walkthrough

Commands, File I/O

The cc API provides a complete file and process control framework

Commands, File I/O

# send and receive files - including wildcards and directories
cc send foo
cc send my_whole_directory/*

# 'exec' waits for a process to complete before moving on to the next command
cc exec touch /root/tumbleweed

# 'background' forks the process and immediately moves on to the next command
cc background sleep 300
cc background touch /root/impatience
shell sleep 5

# A backgrounded process can be tracked and killed
cc process list foo
cc process killall sleep

# `prefix` allows for grouping like commands
cc prefix foo
cc exec hostname
shell sleep 5
cc response foo

# filter groups allows for sending commands to one or more hosts based on any field
cc prefix foo
cc filter name=foo
cc exec hostname
shell sleep 5
cc response foo

TCP tunnels

Support for forward and reverse TCP tunnels (ie `ssh -L` and `ssh -R` style tunnels).

# create a TCP tunnel into a VM, even though it has no network!
cc tunnel foo 4444 127.0.0.1 9000
cc background nc -p 9000 -l -e /bin/sh

Remote mountpoints

Support for guest filesystem mounts - including read/write support with windows guests.

# mount guest filesystems *anywhere* on your cluster
# This supports r/w, even with windows/ntfs

shell mkdir /tmp/mount
cc mount bar /tmp/mount 

Standard I/O Redirection

Support for standard I/O redirection anywhere, including inside other guests.

# create a root shell on the windows vm, and connect stdin and stdout to a host and a linux container
cc filter name=bar
cc background stdout=out_pipe stdin=in_pipe cmd.exe


Summary

The cc API provides a first class command and control layer for minimega experiments.

Thank you

David Fritz

July 2019