-
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 number
docker 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 (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.
docker exec -it chronolog-c1 bashIf successful, you’ll see:
grc-iit@c1:~$Inside c1, run:
pgrep -la chronoExpected output:
- ChronoVisor (log controller)
- ChronoKeepers (log storage managers)
- ChronoGrapher (query and indexing service)
- ChronoPlayer (stream processor)
docker logs chronolog-c1 # View logs of c1
docker logs -f chronolog-c1 # Live logs
docker compose logs -f # Logs for all containersTo stop all containers:
docker compose -f distributed.docker-compose.yaml downTo remove volumes as well:
docker compose -f distributed.docker-compose.yaml down -vThe default setup launches:
- 1x ChronoVisor (must remain one)
- 1x ChronoKeeper
- 1x ChronoGrapher
- 1x ChronoPlayer
To increase the number of Keepers, Graphers, or Players, use:
docker compose -f distributed.docker-compose.yaml up -d --scale c2=3 --scale c3=3 --scale c4=3Explanation:
-
--scale c2=3→ Launches 3 ChronoKeepers. -
--scale c3=3→ Launches 3 ChronoGraphers. -
--scale c4=3→ Launches 3 ChronoPlayers. -
ChronoVisor (
c1) remains a single instance.
Verify scaling:
docker psNote: Scaling this way is temporary. To make permanent changes, modify docker-compose.yml.
To stop all containers:
docker compose -f distributed.docker-compose.yaml downTo reset everything:
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! 🚀