The Litmus framework adopts a user-friendly structure in which addition of new experiments (tests) can be an easy exercise without too-much logic building. However, it does involve packaging the test in the standard litmusbook structure and reusing/creating simple ansible task files and playbooks. Here is a quick refresher on the moving parts & basic process flow in a Litmus experiment:
The deployable/executable artifact associated with the Litmus experiment is called Litmusbook. This is a Kubernetes Job (run_litmus_test.yml)
The Litmusbook runs & manages the “ansible-runner” container
The ansible-runner container executes the test playbook (test.yml) as the entrypoint function.
The test playbook executes several locally defined tasks as well as those in (statically imported) LitmusLib utils/taskfiles (viz. common, funclib, chaoslib)
The LitmusLib utils may utilize specific “third-party” tools (deployed as Kubernetes deployments or daemonsets) to perform specific functions
Test result is updated in a dedicated Kubernetes custom resource called litmusresult
The subsequent sections will explain how an interested user/developer can approach the creation of a new Litmus Experiment. An intermediate-level knowledge of ansible (& of course, Kubernetes) is expected.