This plugin demonstrates how to setup a preconfigured litmuschaos experiment job on Kubernetes.
- Add LitmusChaos to the spinnaker plugin list by modifying the halyard config as provided below. Refer: plugin-v2-configuration
spinnaker:
extensibility:
plugins:
Litmuschaos.PreconfiguredJobPlugin:
id: Litmuschaos.PreconfiguredJobPlugin
enabled: true
version: 0.0.3
extensions: {}
repositories:
spinnaker-plugins-repository:
id: spinnaker-plugins-repository
url: https://raw.githubusercontent.com/mayadata-io/spinnaker-plugins-repository/main/plugins.json
Note: The plugin metadata is maintained in the litmus spinnaker plugins repository
-
Select the LitmusChaos predefined stage in the Spinnaker pipeline, with the right "dependent stage"
-
Configure the stage as needed, by selecting the appropriate experiment name & associated chaos properties:
Note:
-
Ensure that the chosen experiment names are from amongst the pod-level generic chaos experiments on the chaoshub
-
Provide the appropriate container runtime (supported: docker, containerd, crio)
-
Refer to the litmus documentation for more information on the experiment behaviour
-
Use the litmus install/uninstall flags set to
true
to specify if these steps are needed in the same stage. If however, you would like to verify the ChaosResult CRs generated during the experiment or wish to string together more than one experiment as part of the pipeline, you can can use the individual install/uninstall custom jobs that can be updated in the orca-local.yaml
To debug the litmuschaos-orca
server component inside a Spinnaker service (like Orca) using IntelliJ Idea follow these steps:
- Run
./gradlew releaseBundle
in the plugin project. - Copy the generated
.plugin-ref
file underbuild
in the plugin project submodule for the service to theplugins
directory under root in the Spinnaker service that will use the plugin . - Link the plugin project to the service project in IntelliJ (from the service project use the
+
button in the Gradle tab and select the plugin build.gradle). - Configure the Spinnaker service the same way specified above.
- Create a new IntelliJ run configuration for the service that has the VM option
-Dpf4j.mode=development
and does aBuild Project
before launch. - Debug away...