scalar-jepsen icon indicating copy to clipboard operation
scalar-jepsen copied to clipboard

Jepsen tests for ScalarDB and ScalarDL

Build and Test Test with Docker

Run tests with Jepsen Docker

  1. Move to the docker directory
$ cd docker
  1. Run docker-compose
$ docker-compose up -d
  1. Enter the control node
$ docker exec -it jepsen-control bash
  1. Run a test
# cd /scalar-jepsen/cassandra
# lein run test --workload lwt --ssh-private-key ~/.ssh/id_rsa
  • Check README in each test for more detail
  • --ssh-private-key should be always set to specify the SSH key
  • --workload specifies a test workload. previously we used --test.
  • --nemesis sets none, partition, clock, or crash (default: none)
  • --admin sets none, join or flush (default: none)

Run tests without Docker

  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 --workload lwt --ssh-private-key ~/.ssh/id_rsa