LitmusChaos Documentation

website·Indexed 35 days ago

https://docs.litmuschaos.io/

Documentation for LitmusChaos, a complete solution for chaos engineering. Includes guides on architecture, installation, and user operations for versions 3.9.2, 3.30.0, and Next. Covers chaos experiments, infrastructure management, observability setup with Prometheus, GitOps configuration, and the litmusctl command-line tool.

Tokens
1.2M
Snippets
3.6K
Records
9.5K
Agent score
42%

What's inside LitmusChaos

  1. Overview of LitmusChaos Framework

    LitmusChaos is a CNCF Incubating, Cloud-Native Chaos Engineering Framework designed for Kubernetes SREs and Developers. It allows users to identify weaknesses in both Kubernetes-based and non-Kubernetes platforms and applications. The framework uses a 'Kubernetes-native' approach, defining chaos intent declaratively via Kubernetes Custom Resources (CRs). It is typically used in staging and production environments to uncover bugs and vulnerabilities to increase overall system resilience.
  2. Overview of Litmus Execution Plane Components

    The Litmus Execution Plane orchestrates chaos injection in target resources. It is installed either in an external target cluster (external infrastructure) or in the host cluster containing the control plane (self infrastructure). It is divided into two main categories: Chaos Infrastructure components (facilitating injection, observability, and automation) and Backend Execution Infrastructure components (orchestrating the actual execution of experiments).
  3. Overview of LitmusChaos 3.0 Features

    LitmusChaos 3.0 introduces several core enhancements to simplify chaos engineering at scale on Kubernetes:

    • Environments: Allows users to categorize and compartmentalize chaos infrastructures for better organization and collaboration.
    • Chaos Studio: A streamlined interface for fine-tuning chaos parameters and configurations, removing complex setup procedures.
    • Resilience Probes: Implements a plug-and-play architecture where probes can be created once and reused across multiple experiments for steady-state validation.
    • MongoDB High Availability: Support for installing MongoDB Replicas via Helm using Bitnami Mongo to test MongoDB infrastructure reliability.
    • UI Overhaul: A redesigned user interface leveraging the Harness UIcore library for a more intuitive user journey.
  4. Overview of LitmusChaos Resilience Probe types

    Probes are pluggable checks in a ChaosEngine used to validate service health or resource states during different stages of a Chaos Fault (SoT, EoT, Edge, Continuous, and OnChaos). Success is tracked via probeSuccessPercentage in the ChaosResult resource.

    Available probe types:

    • httpProbe: Validates health/availability via a specified URL.
    • cmdProbe: Executes shell commands and matches the output.
    • k8sProbe: Verifies the state of Kubernetes resources using GVR (Group, Version, Resource) and filters.
    • promProbe: Executes Prometheus queries and matches the output against conditions.
  5. Overview of Litmus Chaos Control Plane components

    The Chaos control plane consists of several micro-services that power the ChaosCenter (the web portal and CLI). It is responsible for creating and scheduling chaos experiments, providing system observability during events, and analyzing fault results. Key components include:

    • Authentication Server: A Golang service for user/project management, authentication, and authorization.
    • Backend Server: A GraphQL-based Golang service that bridges the ChaosCenter with the database and the Execution Plane.
    • Database: A MongoDB NoSQL database storing user info, experiment history, templates, projects, ChaosHubs, and GitOps details.
    • ChaosCenter: The user interface layer consisting of:
      • Web UI: A React.js frontend for experiment management, observability, and analytics.
      • Litmusctl: A CLI tool for managing Litmus Chaos infrastructure, projects, and accounts.
      • Litmus APIs: Comprising the Authentication API (user/project tasks via Authentication Server) and the Portal API (experiment management and monitoring via Backend Server).
  6. Overview of Litmus ChaosCenter

    ChaosCenter is the central management hub (single source of truth) for Litmus. It is pre-packaged with the LitmusChaos installation and provides a cross-cloud interface to manage chaos experiments, users, and teams. It can be accessed via Ingress, NodePort, or LoadBalancer.

    Key capabilities include:

    • Chaos Experiment Creation: Create experiments from templates, from scratch (via ChaosHubs), or from YAMLs. Supports sequential/parallel steps, cron schedules, and priority assignment.
    • User & Team Management: Role-Based Access Control (RBAC), team creation, and user authentication.
    • Experiment Management: GitOps integration for automated changes, support for custom public/private image servers, and resilience score analysis.
  7. Overview of Litmus Execution Plane Components

    The Litmus Execution Plane orchestrates chaos injection in target resources. It is installed either in an external target cluster (external chaos infrastructure) or in the host cluster containing the control plane (self chaos infrastructure). It is divided into two main categories:

    Litmus Chaos Infrastructure Components:

    • Workflow Controller: Argo Workflow Controller that creates Chaos Experiments using the Chaos Experiment CR.
    • Subscriber: Links the Execution Plane to the Control Plane. Handles health checks, creates Chaos Experiment CRs from templates, watches for events, and sends results back to the Control Plane.
    • Event Tracker (Optional): Triggers automated chaos runs based on conditions defined in an EventTrackerPolicy CR. Requires GitOps to be enabled.
    • Chaos Exporter (Optional): Exports chaos metrics as time-series data to Prometheus for observability.

    Litmus Backend Execution Infrastructure Components:

    • Chaos Experiment CR: An Argo Workflow CR describing the steps of the chaos experiment, including failure conditions and parallel failures.
    • ChaosExperiment CR: Defines low-level execution info and fault tunables for a specific chaos fault.
    • ChaosEngine CR: Connects an application instance to one or more chaos faults and specifies run-level details.
    • Chaos Operator: A Kubernetes custom-controller that manages the lifecycle of ChaosEngine resources and creates the ChaosEngine Runner pod.
    • ChaosResult CR: Stores the results of a chaos fault (reference, state, verdict) and serves as the source for metrics collection.
    • Chaos Runner: Manages the lifecycle of chaos faults by creating Fault Jobs and monitoring them until completion.
    • Fault Jobs: Pods that execute the actual fault business logic for chaos injection.
  8. Overview of Litmus ChaosCenter

    ChaosCenter serves as the single source of truth for controlling all Litmus functions. It is pre-packaged with the LitmusChaos installation and provides a centralized interface to manage chaos experiments, users, and teams. It can be accessed via Ingress, NodePort, or LoadBalancer regardless of the deployment cloud.
  9. Overview of LitmusChaos Framework

    LitmusChaos is a Cloud-Native Chaos Engineering Framework (CNCF Incubating project) designed for Kubernetes SREs and Developers. It allows users to identify weaknesses in both Kubernetes-based and non-Kubernetes platforms and applications. The framework uses a "Kubernetes-native" approach, defining chaos intent declaratively via Kubernetes Custom Resources (CRs). It is typically used in staging environments first and then in production to uncover bugs and vulnerabilities to increase overall system resilience.
  10. Overview of Litmus Resilience Probes

    Resilience Probes are pluggable checks defined within a ChaosEngine for Chaos Experiments. They are executed by fault pods to determine the verdict of a fault based on success/failure conditions. Litmus supports four probe types:

    • httpProbe: Queries health or downstream URIs.
    • cmdProbe: Executes shell commands for custom health checks.
    • k8sProbe: Performs CRUD operations against Kubernetes resources.
    • promProbe: Executes PromQL queries against Prometheus metrics.
  11. Overview of Litmus ChaosCenter

    ChaosCenter is a unified management pane used to control the entire lifecycle of chaos experiments within Litmus. It is pre-packaged with the LitmusChaos installation and can be accessed via Ingress, NodePort, or LoadBalancer. Key capabilities include:

    • Chaos Experiment Creation: Support for templates, custom experiments via ChaosHubs, YAML imports, sequential/parallel step control, cron scheduling, and priority assignment.
    • User and Team Management: Role-Based Access Control (RBAC), team creation, and user authentication.
    • Experiment Management: GitOps integration for automated changes, custom image server support (public/private), and Resilience Score analysis.
  12. Overview of Litmus Execution Plane Components

    The Litmus Execution Plane is responsible for orchestrating chaos injection in target resources. It is installed either in an external target cluster (external chaos infrastructure) or in the host cluster containing the control plane (self chaos infrastructure). It is divided into two main categories: Chaos Infrastructure components (facilitating injection, observability, and automation) and Backend Execution Infrastructure components (orchestrating the actual execution of experiments).