Kafka playtime
Running on Linux
Prefix commands with sudo
due to the docker daemon running as root
.
There seems to be a bug with docker-compose where it takes ~40ms to connect to the terminal output of the container, so stuff logged to the terminal in this time is lost. The best workaround seems to be adding a delay of 0.1 seconds like so:
sudo ./auto/dev sh -c 'sleep 0.1; scripts/publish'
Setup
./auto/dev/setup
Usage
Shell
To open a shell in the console container that has the Kafka management utils:
./auto/dev/console
Watch events
To watch all raw events, starting from the beginning:
./auto/dev/console scripts/watch
Watch robot commands (same as events)
To watch all raw events, from now onwards:
./auto/dev/robctl watch commands
Starting from the beginning:
./auto/dev/robctl watch commands --history
Watch board
To watch the toy robot world, viewing the board and all robots:
./auto/dev/robctl watch world
Control a robot
To control a robot:
./auto/dev/robctl control ROBOT_NAME
Valid commands are:
place 0 0 s
place 4 4 n
move
left
right