mayadata-io / spinnaker-preconfigured-job-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI Latest Kork Latest Orca

This plugin demonstrates how to setup a preconfigured litmuschaos experiment job on Kubernetes.

Usage

  • 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"

    spinnaker-1

  • Configure the stage as needed, by selecting the appropriate experiment name & associated chaos properties:

    spinnaker-2

Note:

  • Ensure that the chosen experiment names are from amongst the pod-level generic chaos experiments on the chaoshub

    chaoshub-1

  • 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

Debugging

To debug the litmuschaos-orca server component inside a Spinnaker service (like Orca) using IntelliJ Idea follow these steps:

  1. Run ./gradlew releaseBundle in the plugin project.
  2. Copy the generated .plugin-ref file under build in the plugin project submodule for the service to the plugins directory under root in the Spinnaker service that will use the plugin .
  3. 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).
  4. Configure the Spinnaker service the same way specified above.
  5. Create a new IntelliJ run configuration for the service that has the VM option -Dpf4j.mode=development and does a Build Project before launch.
  6. Debug away...

About


Languages

Language:Kotlin 100.0%