This Docker Compose file will create a Cassandra cluster containing 3 nodes along with AxonOps for cluster monitoring and management.
You can deploy this AxonOps development environment to AWS by using the following link. Otherwise, follow the instructions below for a manual installation.
Important
AWS deployment will incur a cost. This project currently works on x86 architecture only. Apple Silicon / ARM are currently not supported.
This environment requires a recent version of Docker (Docker Engine 19.03.0 or later) with Docker Compose V2. If you do not have Docker installed the easiest way to get started is to install Docker Desktop which you can find at docker.com.
Please note this environment only supports amd64 architecture. ARM CPUs (e.g. Apple M1/M2) are not currently supported.
If you already have Docker installed then check your versions using these commands:
docker version
docker compose version
On Linux you may need to install the docker-compose-plugin
package in order for Docker Compose to work.
- Download docker-compose.yml from this repository, or use this command to download it from the command-line:
curl -O https://raw.githubusercontent.com/axonops/axonops-cassandra-dev-cluster/main/docker-compose.yml
- Run
docker compose up -d
from the directory containingdocker-compose.yml
- After a few minutes the containers will start up and initialise the Cassandra cluster
- After startup is complete open http://127.0.0.1:3000/ in your browser to see the AxonOps dashboard
Once the cluster has started up you can use this command to run cqlsh
inside one of the Cassandra containers:
docker compose exec -it cassandra-0 cqlsh
The CQL port for each node is also exposed on the host's loopback IP address as follows:
cassandra-0: 127.0.0.1:9042
cassandra-1: 127.0.0.1:9043
cassandra-2: 127.0.0.1:9044
Client applications running on the host should be able to use these addresses to connect to Cassandra.
You can stop the cluster with this command:
docker compose down
This will preserve the data for Cassandra and AxonOps in Docker volumes so it will be available when the cluster is started up again.
Use this command to start the cluster back up:
docker compose up -d
To shut down the cluster and remove all data use this command:
docker compose down -v
This will stop and remove all running containers and delete the Docker volumes containing the Cassandra and AxonOps data.
This Docker Compose environment supports Cassandra 4.0, 4.1 and 5.0 (currently in beta). The default version is 4.1 but
you can run 4.0 or test 5.0 by changing the image tag for the Cassandra containers in docker-compose.yml
.
For example to run Cassandra 4.0 change the image
line for the 3 Cassandra containers from this:
image: registry.axonops.com/axonops-public/axonops-docker/cassandra:4.1
to this:
image: registry.axonops.com/axonops-public/axonops-docker/cassandra:4.0