This repository bundles the documentation and setup details around the software used in the RCLL.
Most of the software used in the RCLL can be found in the github organization. The docker images for the RCLL get published to the quay.
The rulebook for the RCLL can be found here.
There are various libraries to make communication with the refbox easy, at the moment there is one for Java and one for C++. Here you can find an example that is using the C++ lib. For Communication with the refbox there is a mqtt bridge available which can be found here.
To use this repository you have to have docker
, docker-compose
, screen
and bash
installed. To make the commands available you have to source setup.sh
, you can do this in our local
~/.bashrc
All the commands that are listened below can be configured via various env variables. To overwrite the defaults which are set in the setup.sh
script, manually overwrite them in the file local_setup.sh
. This file is ignored in git and will be created automatically once you source the setup.sh
for the first time.
If you want to play a c0 productino challenge, one must add export REFBOX_CONFIG_CHALLENGE=./../config/refbox/challenge_prod_c0.yaml
into his local_setup.sh
.
The main commands are
- rc_start
- rc_stop
- rc_pull
start the refbox and the vue frontend. the ui can then be accessed via: http://localhost:8080/
Main environment variables for configuration:
REFBOX_IMAGE
image to use for refboxREFBOX_TAG
tag to use for refboxREFBOX_FRONTEND_IMAGE
image to use for refbox frontendREFBOX_FRONTEND_TAG
tag to use for refbox frontendREFBOX_CONFIG_GAME
game config to use in the refbox.REFBOX_CONFIG_SIMULATION
simulation config to use in the refbox.REFBOX_CONFIG_COMM
communication config to use in the refbox.REFBOX_CONFIG_MPS
mps config to use in the refbox.REFBOX_CONFIG_TEAM
team config to use in the refbox.REFBOX_CONFIG_CHALLENGE
challenges config to use in the refbox.REFBOX_CONFIG_MONGODB
mongodb config to use in the refbox.
In the directory config/refbox
are some configurations which are used by default. You can find more here in the rcll-refbox repository.
The startup utilizes docker-compose to spin up services and then sets up a screen session where the logs can be followed.
The screen session is named ${RC_SCREEN_NAME}
, which defaults to rcll
.
The existing tabs in that session are always closed before re-launching.
This stops all services.
This pulls the newest version of all docker images.
The RCLL offers also some additional tools. For each, there are 3 commands:
- rc_start_ - which launches the tool
- rc_stop_ - which stops the tool
- rc_pull_ - which updates the docker containers for that tool
There are also options for each tool to be launched in the main commands above.
Used to just start the refbox and it's frontend without any other tools.
See the rc_start
section for configuration options.
Note that the startup also checks for the existance of a MongoDB un RC_MONGODB_URI
.
The refbox requires a running MongoDB instance (any version compatible with the mongocxx-driver of the refbox). Per default, a new MongoDB 5.0 is started on startup. But it is also possible to use an existing instance. Note that the refbox needs to be configured separately to also use the instance.
Env variables for configuration:
RC_MONGODB_START
set to true if a mongodb instance should start with the main command, defaults totrue
RC_MONGODB_HOST
hostname or ip address where the instance should run on, defaults tolocalhost
RC_MONGODB_PORT
port where the intance should run on, defaults to27017
RC_MONGODB_URI
Final URI, defaults tomongodb://${RC_MONGODB_HOST}:${RC_MONGODB_PORT}
The refbox logs games into a database, the frontend of the refbox can display that data. In order to do so, a small backend is required that bridges between the database and the frontend.
Env variables for configuration:
RC_MONGODB_BACKEND_START
set to true if the mongodb backend should be started with the main command, defaults tofalse
RC_MONGODB_BACKEND_DB_NAME
name of the database to use, defaults torcll
, which is the default name of the database the refbox uses.
Note that the backend also utilizes the RC_MONGODB_URI
variable from the mongodb component.
Note: The image is only available via ghcr.io, so you have to login in order to be able to pull it!
Env variables for configuration:
RC_MQTT_START
set to true if mqtt bridge should start with the main commandRC_MQTT_BROKER
broker to connect toRC_MQTT_REFBOX
ip of the refboxRC_MQTT_TEAM
team nameRC_MQTT_KEY
crypto key for refbox communication
start the rcll-simulator and the frontend for it. The ui can then be accessed via http://localhost:4200/``.
Env variables for configuration:
SIMULATOR_IMAGE
image to use for simulatorSIMULATOR_TAG
tag to use for simulatorSIMULATOR_FRONTEND_IMAGE
image to use for simulator frontendSIMULATOR_FRONTEND_TAG
tag to use for simulator frontendSIMULATOR_CONFIG_FILE
the config file used for the simulator.
Generally it is good to take a look at the refbox wiki, which contains a lot of information.
Each Team has to communicate with the refbox. This is done via the rcll-protobuf-msgs. You can find a detailed documentation on them here. In the refbox repository is a wiki entry giving a good overview of the communication, see this link