Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

1/27/2021

Reading time:1 min

scalar-labs/scalar-jepsen

by scalar-labs

Clone Jepsen repositoryConfigure to mount scalar-jepsen directory by editing ${JEPSEN_ROOT}/docker/docker-compose.dev.yml like the following control: volumes: - ${JEPSEN_ROOT}:/jepsen # Mounts $JEPSEN_ROOT on host to /jepsen control container - ${SCALAR_JEPSEN_ROOT}:/scalar-jepsen # $SCALAR_JEPSEN_ROOT is the path of this repository on hostStart docker with --dev option$ cd ${JEPSEN_ROOT}/docker$ ./up.sh --devRun tests in jepsen-controlYou can login jepsen-control by the following command$ docker exec -it jepsen-control bash# cd /scalar-jepsen/cassandra# lein run test --test lwtCheck README in each test for more detailLaunch debian machines as a control machine and Cassandra nodesWe recommend 1 control machine and 5 node machinesYou can decrease the number of nodes. If you do so then you will need to specify the nodes when starting a test.Install Java8 on each machinesudo apt install openjdk-8-jreInstall Leiningen (https://leiningen.org/) on the control machineMake an SSH key pair for Jepsen to login nodes from the control machineRegister the public key as root on each node$ sudo echo ssh-rsa ... >> /root/.ssh/authorized_keysConfigure /etc/hosts on each machine$ sudo sh -c "cat << EOF >> /etc/hosts<NODE1_IP> n1<NODE2_IP> n2<NODE3_IP> n3<NODE4_IP> n4<NODE5_IP> n5EOF"Run a test on the control machine$ cd ${SCALAR_JEPSEN}/cassandra$ lein run test --test lwt --ssh-private-key ~/.ssh/id_rsa

Illustration Image

CircleCI

  1. Clone Jepsen repository
  2. Configure to mount scalar-jepsen directory by editing ${JEPSEN_ROOT}/docker/docker-compose.dev.yml like the following
   control:
     volumes:
       - ${JEPSEN_ROOT}:/jepsen # Mounts $JEPSEN_ROOT on host to /jepsen control container
       - ${SCALAR_JEPSEN_ROOT}:/scalar-jepsen # $SCALAR_JEPSEN_ROOT is the path of this repository on host
  1. Start docker with --dev option
$ cd ${JEPSEN_ROOT}/docker
$ ./up.sh --dev
  1. Run tests in jepsen-control
  • You can login jepsen-control by the following command
$ docker exec -it jepsen-control bash
# cd /scalar-jepsen/cassandra
# lein run test --test lwt
  • Check README in each test for more detail
  1. Launch debian machines as a control machine and Cassandra nodes
  • We recommend 1 control machine and 5 node machines
    • You can decrease the number of nodes. If you do so then you will need to specify the nodes when starting a test.
  1. Install Java8 on each machine
sudo apt install openjdk-8-jre
  1. Install Leiningen (https://leiningen.org/) on the control machine
  2. Make an SSH key pair for Jepsen to login nodes from the control machine
  3. Register the public key as root on each node
$ sudo echo ssh-rsa ... >> /root/.ssh/authorized_keys
  1. Configure /etc/hosts on each machine
$ sudo sh -c "cat << EOF >> /etc/hosts
<NODE1_IP> n1
<NODE2_IP> n2
<NODE3_IP> n3
<NODE4_IP> n4
<NODE5_IP> n5
EOF"
  1. Run a test on the control machine
$ cd ${SCALAR_JEPSEN}/cassandra
$ lein run test --test lwt --ssh-private-key ~/.ssh/id_rsa

Related Articles

stress
jepsen
cassandra

Jepsen: Cassandra

John Doe

1/27/2021

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra