For local development and testing, you can run the engine in a Docker container.
The steps are:
Bundle the engine and its dependencies.
Build a Docker image.
Create a Docker container.
blimp/engine:blimp_engine_bundle build target will bundle the engine and its dependencies into a tarfile, which can be used to build a Docker image. This target is always built as part of the top-level
gen/engine-manifest.txt is a list of the engine's runtime dependencies. This list is automatatically generated in the build, but can be manually replicated for debugging and investigation. Use
blimp/tools/generate-target-manifest.py to manually generate the manifest after building blimp target to generate the runtime deps file:
./blimp/tools/generate-target-manifest.py \ --blacklist blimp/tools/engine-manifest-blacklist.txt \ --output out-linux/Debug/engine-manifest.txt \ --runtime-deps-file out-linux/Debug/gen/blimp-engine.runtime_deps
You can compare the output at
out-linux/Debug/engine-manifest.txt with the generated target
Using the tarfile you can create a Docker image:
docker build -f Dockerfile.base -t base - < ./out-linux/Debug/blimp_engine_bundle.tar.gz docker build -t blimp_engine - < ./out-linux/Debug/blimp_engine_bundle.tar.gz
After building the Docker image you can launch the engine inside the Docker container.
A little prep work is necessary to enable the engine to start as it requires a few files that are not provided by the container. You need:
$CONFIG_DIR) with permissions of 0755 (ie. world accessable)
$CONFIG_DIR/stunnel.pem: A PEM encoded file with a private key and a public certificate. Permissions should be set to 644.
$CONFIG_DIR/client_token: A file with a non-empty string used as the client token (the shared secret between the client and the engine). Permissions should also be set to 644. See running for how to get the default token from the source code.
This setup step is only required once and can be reused for all the rest of the runs of the engine.
$CONFIG_DIR is set up, you can launch the engine in the Docker container:
docker run -v $CONFIG_DIR:/engine/data -p 443:25466 blimp_engine
You can also pass additional flags:
docker run ... blimp_engine --with-my-flags
See the blimp engine
Dockerfile to find out what flags are passed by default.