-
Notifications
You must be signed in to change notification settings - Fork 8
Tutorial 4: Running ChronoLog with Docker (Multi node)
Welcome! This tutorial will guide you through setting up ChronoLog in a multi-node environment using Docker Compose. By the end, you'll have a fully operational distributed ChronoLog system, where multiple containers work together to simulate a real deployment.
✅ Deploy a multi-node version of ChronoLog using Docker.
✅ Configure and run different system setups based on your needs.
✅ Understand how to interact with ChronoLog, including running workloads efficiently.
If you're new to ChronoLog or want a simpler setup, check out our Single-Node Tutorial:
📌 Running ChronoLog with Docker (Single-Node)
ChronoLog runs inside Docker containers to ensure a stable, portable, and dependency-free environment. Docker Compose orchestrates multiple containers, making multi-node setups easy to manage.
Follow these links to install them if you haven’t already:
Run the following commands to confirm Docker and Docker Compose are installed:
docker --version # Should return a version numberdocker compose version # Should return a version numberIf either command fails, follow the installation guides above before proceeding.
Pull the latest ChronoLog image from Docker Hub:
docker pull gnosisrc/chronolog:latestVerify the image was downloaded successfully:
docker images | grep chronologRetrieve the docker-compose.yml file:
wget https://raw.githubusercontent.com/grc-iit/ChronoLog/refs/heads/develop/CI/docker/distributed.docker-compose.yamlVerify the file exists:
ls | grep distributed.docker-compose.yamlEnsure your system meets the following:
✅ At least 4GB RAM (8GB+ recommended)
✅ At least 4 CPU cores
✅ Sufficient disk space
✅ No conflicting ports in use. (Default ports for chronolog: 2222, 2225, 3333, 4444, 5555, 5557, 6666, 7777, 8888)
(check using: netstat -tulnp | grep LISTEN)
cd /path/to/distributed.docker-compose.yamlVerify the file is present:
ls | grep distributed.docker-compose.yamldocker compose -f distributed.docker-compose.yaml up -dThis:
-
Launches multiple ChronoLog containers (
c1,c2,c3, etc.). -
Runs them in the background (
-dflag). -
Sets up an internal ChronoLog network (
chronolog_net). -
Shares a volume (
shared_home) among containers.
Check running containers:
docker psYou should see chronolog-c1, chronolog-c2, chronolog-c3, and chronolog-c4.
ChronoLog does not automatically deploy upon starting the containers. You must manually configure the hosts files before deployment.
Inside chronolog-c1, create the required host configuration files:
docker exec -it chronolog-c1 bashIf successful, you’ll see:
grc-iit@c1:~$Inside the Docker container, navigate to the ChronoLog configuration directory:
cd ~/chronolog_install/Release/conf/Prepare the required hosts files:
echo "chronolog-c1" > hosts_visorecho "chronolog-c2" > hosts_keeperecho "chronolog-c3" > hosts_grapherecho "chronolog-c4" > hosts_playerecho "chronolog-c1" > hosts_clientRun the deployment script to distribute ChronoLog across the containers:
cd ~/chronolog_repo/deploy/
./single_user_deploy.sh -d --work-dir ~/chronolog_install/Release/This script will:
- Start ChronoVisor, ChronoKeepers, ChronoGrapher, and ChronoPlayers.
- Configure inter-container communication.
- Ensure each node operates within the distributed ChronoLog system.
Verify the deployment:
pgrep -la chronoExpected output:
- ChronoVisor (log controller)
- ChronoKeepers (log storage managers)
- ChronoGrapher (query and indexing service)
- ChronoPlayer (stream processor)
To verify the deployment, launch a client performance test from the deploy directory:
cd ~/chronolog_install/Release/deploy/
LD_LIBRARY_PATH=~/chronolog_install/Release/lib ../.spack-env/view/bin/mpiexec -n 4 -f ~/chronolog_install/Release/conf/hosts_client \
~/chronolog_install/Release/bin/client_admin --config ~/chronolog_install/Release/conf/default_conf.json \
-a 4096 -b 4096 -s 4096 -n 4096 -t 1 -h 1 -p -rThis will:
- Execute a client_admin performance test across four client processes.
- Use the predefined host configuration.
- Validate correct system functionality.
Check logs of specific nodes:
docker logs chronolog-c1 # View logs of c1
docker logs -f chronolog-c1 # Live logs
docker compose logs -f # Logs for all containersNOTE, DEPLOYMENT NEEDS TO BE STOPPED.
To stop all containers:
docker compose -f distributed.docker-compose.yaml downTo remove volumes as well:
docker compose -f distributed.docker-compose.yaml down -vNow that ChronoLog is running in a multi-node setup, you can:
- Deploy workloads inside the containers.
- Integrate ChronoLog into your existing infrastructure.
- Modify and optimize your setup based on specific needs.
Stay tuned for further tutorials on advanced configurations and optimizations! 🚀