We already made a few blogs on Cassandra and Kairos DB. Unfortunately, the recipes used to build the cluster via docker-compose are no longer working with new versions of docker. You will find below a working docker-compose using version 3 of the docker-compose system that builds a three nodes Cassandra cluster.
Docker-Compose
Reserve between 4GB and 8GB of memory to docker in order to start the cluster correctly.
version: '3' services: ############################### cassandra0: image: cassandra:3.11.1 container_name: cassandra0 ports: - 9042:9042 - 9160:9160 - 7199:7199 - 8778:8778 environment: - CASSANDRA_START_RPC=true environment: - CASSANDRA_SEEDS=cassandra0 - CASSANDRA_CLUSTER_NAME=mtech_cluster ulimits: memlock: -1 nproc: 32768 nofile: 100000 ############################### cassandra1: image: cassandra:3.11.1 container_name: cassandra1 ports: - 9142:9042 command: bash -c 'sleep 60; /docker-entrypoint.sh cassandra -f' depends_on: - cassandra0 environment: - CASSANDRA_SEEDS=cassandra0 - CASSANDRA_CLUSTER_NAME=mtech_cluster ulimits: memlock: -1 nproc: 32768 nofile: 100000 ############################### cassandra2: image: cassandra:3.11.1 container_name: cassandra2 ports: - 9242:9042 command: bash -c 'sleep 120; /docker-entrypoint.sh cassandra -f' depends_on: - cassandra0 environment: - CASSANDRA_SEEDS=cassandra0 - CASSANDRA_CLUSTER_NAME=mtech_cluster ulimits: memlock: -1 nproc: 32768 nofile: 100000 ############################# kairosdb: image: snuids/kairosdb:v1.1.3 container_name: kairosdb environment: - CASSANDRA_HOST_LIST=cassandra0:9160 ports: - "4242:4242" - "8083:8083" depends_on: - cassandra0 ############################## grafana: image: grafana/grafana:master container_name: grafana ports: - 3000:3000 ############################## portainer: container_name: portainer image: portainer/portainer volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 9000:9000
In order to make Kairos DB work, you can follow the instructions of this blog.
In order to insert data into cassandra, you can follow the instructions of this blog.
2 Pingback