Skip to content

Latest commit

 

History

History
 
 

vagrant

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

What is this?

This is a series of scripts for Vagrant to stand-up and test Apache Ratis servers and clients. One needs to have Vagrant and VirtualBox installed to stand-up these tests environments.

What is provided?

This provides a multi-host Vagrantfile which provides the following described VM's:

ratis-build VM

This provides a built version of Ratis with the Namazu test framework as well

ratis-servers VM

This leverages the built Ratis servers to run a three server cluster and load generator. The Ratis servers are listening on ports 6000, 6001, 6002. The four processes are started and daemonized using GNU Screen. The daemons further log to files in the home directory of the test user.

ratis-hdd-slowdown VM

This VM starts the three Ratis servers and load genearator as the ratis-servers VM. However, the three servers contend with their storage directories made pathological (slow and error-prone) by Namazu. The configuration of pathology in namazu can be tuned in hdd_config.toml.

The test VM's can be stoped and all daemons restarted via: vagrant up --provision <VM name> One can login to the VM and read the message-of-the-day for instructions on how to read the daemon logs; or connect to the Screen session.

How to get started:

There is a shell script run_all_tests.sh which provides a single entrypoint for building or cleaning up all tests. To visualize the flow of building all tests, a BPMN diagram of the intended process flow is: Vagrantfile BPMN Flow

Execute run_all_tests.sh with option build:

  • Builds the ratis-build VM
  • Packages a Vagrant box to build test VMs off of
  • Builds all test VMs and suspends them on success

Execute run_all_tests.sh with option clean:

  • Destroys all test VMs
  • Destroys the ratis-build VM
  • Removes the ratis-test from Vagrant
  • Removes the ratistest.box from the local file-system

Run the tests for a machine with vagrant resume:

  • e.g. vagrant resume ratis-servers && vagrant ssh ratis-servers