Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "First chaos experiment" #9474

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions docs/chaos-engineering/concepts/chaos101.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ redirect_from:
- /docs/chaos-engineering/get-started/overview
- /docs/chaos-engineering/architecture-and-security/architecture/components
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Welcome to Harness Chaos Engineering (HCE)!
Welcome to Harness Chaos Engineering!

This topic provides you with all the details such as **what**, **why**, and **how** of chaos engineering, such as:

Expand Down Expand Up @@ -104,13 +105,11 @@ HCE doesn't just focus on fault injection; it helps you set up a fully operation

### Steps to Inject Chaos into your Application

1. [Fulfill the resource requirements or facilitate the permissions](/docs/chaos-engineering/getting-started/saas/): You can create resources or get the required permissions to create the necessary resources. For example, to execute a Kubernetes fault, you may need the permissions mentioned [here](/docs/chaos-engineering/use-harness-ce/chaos-faults/kubernetes/permissions/fault-wise-permission).

2. [Add an environment](/docs/chaos-engineering/use-harness-ce/infrastructures/enable-disable#create-environment): A chaos experiment is performed within a chaos environment that houses the necessary infrastructure.
1. [Fulfill the resource requirements and facilitate the permissions](/docs/chaos-engineering/getting-started/saas/): You can create resources or get the required permissions to create the necessary resources. For example, to execute a Kubernetes fault, you may need the permissions mentioned [here](/docs/chaos-engineering/use-harness-ce/chaos-faults/kubernetes/permissions/fault-wise-permission).

3. [Enabling a chaos infrastructure](/docs/chaos-engineering/use-harness-ce/infrastructures/enable-disable#enable-chaos): The required chaos infrastructure is enabled within a chaos environment.
2. [Add an environment](/docs/chaos-engineering/use-harness-ce/infrastructures/enable-disable#create-environment) and [create an infrastructure](/docs/chaos-engineering/use-harness-ce/infrastructures/enable-disable#enable-chaos): A chaos experiment is performed within an environment that houses the chaos-enabled infrastructure.

4. [Create and run a chaos experiment](/docs/chaos-engineering/use-harness-ce/experiments/create-experiments): You can decide which resources to target and execute the chaos experiments on.
3. [Create and run a chaos experiment](/docs/chaos-engineering/use-harness-ce/experiments/create-experiments): You can decide which resources to target and execute the chaos experiments on.

#### Workflow Custom Resource (CR)

Expand Down Expand Up @@ -160,5 +159,4 @@ By embracing chaos engineering, you can better prepare your applications to with
## Try Chaos Engineering today

* [Run your first chaos experiment](/docs/chaos-engineering/getting-started/saas/)
* [Executing experiments in a sandbox](/docs/chaos-engineering/training/sandbox)
* [Create chaos experiments from scratch](/docs/chaos-engineering/getting-started/saas/chaos-experiment-from-blank-canvas)
* [Executing experiments in a sandbox](/docs/chaos-engineering/training/sandbox)
67 changes: 38 additions & 29 deletions docs/chaos-engineering/concepts/explore-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,45 @@ redirect_from:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

**Before you begin, review the following**

- [All about chaos engineering](/docs/chaos-engineering/concepts/chaos101)

Harness Chaos Engineering (HCE), a part of Harness platform, is offered as SaaS or deployed on-premise (SMP) that is managed by the enterprise customers. The capabilities of HCE are same in both the models - **SaaS** or **On-Premise**.
Harness Chaos Engineering is a part of Harness platform that is offered as SaaS or deployed on-premise (SMP) that is managed by the enterprise customers. The capabilities of Harness CE are same in both the **SaaS** and **On-Premise** models.
Irrespective of the model, the architecture is divided into two parts.

1. **The Control Plane** that is part of the Harness Platform.
2. **The Execution Plane** that resides in the enterprise's private or public network.
1. **The Control Plane** that is part of the Harness Platform that is responsible for orchestrating, managing, and controlling the execution of chaos experiments.
2. **The Execution Plane** that resides in the enterprise's private or public network where chaos experiments are executed. It consists of the infrastructure where faults are injected and tested.

An enterprise typically consists of one chaos control plane and one or more chaos execution planes. The diagrams below describe different deployment models.

## Deployment models

![SaaS-and-SMP model of deployment of Harness Chaos Engineering](./static/architecture/saas-vs-onprem.png)

---

## Execution plane
The execution plane consists of a logical group of components that reside in the customer's network responsible for running chaos experiments. Some of these components are long running and others are spawned dynamically at run time (of the chaos experiment). The chaos experiments are executed on the target resources by a chaos agent residing on the target or by the Harness delegate residing in the customer network.

### Agentless model
In the agentless model, the chaos experiments are run by the Harness Delegate. One Harness Delegate can run chaos experiments on multiple targets such as other Kubernetes clusters, cloud platform resources, VMware resources, as long as the network connectivity is available between the Delegate and the target.
In the agentless model, the chaos experiments are run by the Harness Delegate. One Harness Delegate can run chaos experiments on multiple targets such as other Kubernetes clusters, cloud platform resources, VMware resources, as long as the network connectivity is available between the Delegate and the target.

![Agentless Execution Plane](./static/architecture/agentless-model.png)

Harness Delegate can run chaos experiments on the following target types:
- Kubernetes clusters and the applications running on the Kubernetes. This includes the managed Kubernetes services like EKS, GKE and AKS.
- Cloud Platform resources like AWS ECS, AWS Lambda, GCP Cloud Run, Google Cloud Functions, Azure ACS and Azure functions. This includes cloud platform resources like load balancers too.
- VMware resources
- VMware resources.

---

### Agent model
### Agent-based model
In the agent model, a chaos agent has to be deployed on the target resource and then the chaos agent runs the chaos experiments on the local resources.

![Agent based Execution Plane](./static/architecture/agentbased-model.png)

Agent model is preferred to run chaos experiments on the Linux or Windows hosts. However, they can be used to run chaos experiments on all types of resources. The following table provides different agent types and corresponding target resources.
Agent model is preferred to run chaos experiments on the Linux or Windows hosts.

**Agent and Agentless models**
The following table provides different agent types and corresponding target resources.

**Agent-Based and Agentless models**

| Model | Agent | Supported Target Types |
|-----------|------------------------|------------------------------------------------|
Expand All @@ -69,6 +70,7 @@ Agent model is preferred to run chaos experiments on the Linux or Windows hosts.
| Agent | Linux Chaos Agent | Linux hosts and applications running on them |
| Agent | Windows Chaos Agent | Windows hosts and applications running on them |

---

## Features of Control Plane
The control plane in Harness Chaos Engineering consists of various components that helps connect the targets to Harness, create chaos experiments, set up RBACs, set up governance and orchestrate the chaos experiments. Some of the key features of the control plane are described below.
Expand All @@ -87,7 +89,7 @@ Chaos governance is a critical feature of the Harness Chaos Engineering module,
2. Guardrails around running chaos experiments. This is achieved through the [ChaosGuard](/docs/chaos-engineering/use-harness-ce/governance/governance-in-execution/).

### Construct Chaos Experiments
Chaos experiments are initially constructed using an easy-to-use UI based builder called **Chaos Studio**. Chaos Studio helps in building complex chaos experiments with ease and also provides a great execution view. Chaos experiments will have chaos faults and resilience probes. Chaos fault templates are taken from the Enterprise ChaosHub and then tuned to the needs of the experiment. Resilience probes are constructed either from scratch or using the templates, tuned and then attached to a fault or an experiment.
Chaos experiments are initially [constructed](/docs/chaos-engineering/use-harness-ce/experiments/create-experiments) using an easy-to-use UI based builder called **Chaos Studio**. Chaos Studio helps in building complex chaos experiments with ease and also provides a great execution view. Chaos experiments will have chaos faults and resilience probes. Chaos fault templates are taken from the Enterprise ChaosHub and then tuned to the needs of the experiment. Resilience probes are constructed in accordance with the validation needs and mapped to the desired faults.

In summary, creation of chaos experiments is made easier by the UI based tooling and the end result of such creation is an YAML file. This YAML file can then be used to achieve further automation using infrastructure management tools such a Terraform or Harness IaC.

Expand All @@ -103,31 +105,38 @@ The common practice is to select the chaos faults from the Enterprise ChaosHub,
### Orchestrate Chaos Experiments
Once the chaos experiments are created using a chaos studio, they are available in the project workspace. You can execute them in many ways, as described below.

#### Orchestrate Via Pipelines
Harness chaos module provides the ability to [execute experiments in pipelines](/docs/chaos-engineering/integrations/pipeline-exec) with the help of a builtin step called Chaos-Step. This chaos-step executes the target experiment and the resulting resilience score is returned to the pipeline.
- **Orchestrate Via Pipelines**
Harness chaos module provides the ability to [execute experiments in pipelines](/docs/chaos-engineering/integrations/pipeline-exec) with the help of a builtin step called Chaos-Step. This chaos-step executes the target experiment and the resulting resilience score is returned to the pipeline.

This method offers a streamlined and powerful way to execute chaos experiments by integrating pipeline capabilities such as approvals, notifications, and parallel experiment execution. These features create an efficient framework for orchestrating chaos experiments seamlessly.

This method offers a streamlined and powerful way to execute chaos experiments by integrating pipeline capabilities such as approvals, notifications, and parallel experiment execution. These features create an efficient framework for orchestrating chaos experiments seamlessly.
You can expand the orchestration to other pipelines like Jenkins, Google Cloud Build, or GitHub Actions through APIs or the HCE-CLI, a specialized command-line tool. This ensures adaptability and seamless integration into various CI/CD workflows.

You can expand the orchestration to other pipelines like Jenkins, Google Cloud Build, or GitHub Actions through APIs or the HCE-CLI, a specialized command-line tool. This ensures adaptability and seamless integration into various CI/CD workflows.
- **Orchestrate Via API**

#### Orchestrate Via API
Harness provides API end points to invoke a chaos experiment and to query the result of a chaos experiment that is already run. For more information, go to [execute using API](/docs/chaos-engineering/getting-started/saas/experiment-using-api).
Harness provides API end points to invoke a chaos experiment and to query the result of a chaos experiment that is already run. For more information, go to [execute using API](/docs/chaos-engineering/getting-started/saas/experiment-using-api).

#### Orchestrate Via Scheduler
Harness Chaos Engineering control plane allows you to schedule a chaos experiment using CRON. For more information, go to [run experiments on schedule](/docs/chaos-engineering/use-harness-ce/experiments/create-experiments#execute-experiment-on-a-schedule).
- **Orchestrate Via Scheduler**

#### Orchestrate Via Portal
Harness chaos portal (aka the control plane) allows you to run an experiment with the **Run** button. You can stop an experiment execution with the **Stop** button in the [portal](https://app.harness.io).
Harness Chaos Engineering control plane allows you to schedule a chaos experiment using CRON. For more information, go to [run experiments on schedule](/docs/chaos-engineering/use-harness-ce/experiments/create-experiments#execute-experiment-on-a-schedule).

You can [perform bulk actions on the chaos experiments](/docs/chaos-engineering/use-harness-ce/experiments/edit-chaos-experiment#bulk-update-cron-schedules). For example, you can choose multiple chaos experiments and add them to the pipeline for sequential execution.
- **Orchestrate Via Portal**

#### Orchestrate Via CLI
HCE-CLI, a command line interface is provided for seamless execution of chaos experiments from automation scripts or from pipeline. For more information, go to [HCE CLI](/docs/chaos-engineering/api-reference/hce-cli).
Harness chaos portal (aka the control plane) allows you to run an experiment with the **Run** button. You can stop an experiment execution with the **Stop** button in the [portal](https://app.harness.io).

#### Orchestrate Via GameDays
The chaos control place provides a native [Gameday feature](/docs/chaos-engineering/use-harness-ce/GameDay) using which chaos experiments can be planned and executed.
You can [perform bulk actions on the chaos experiments](/docs/chaos-engineering/use-harness-ce/experiments/edit-chaos-experiment#bulk-update-cron-schedules). For example, you can choose multiple chaos experiments and add them to the pipeline for sequential execution.

- **Orchestrate Via CLI**

HCE-CLI, a command line interface is provided for seamless execution of chaos experiments from automation scripts or from pipeline. For more information, go to [HCE CLI](/docs/chaos-engineering/api-reference/hce-cli).

- **Orchestrate Via GameDays**

The chaos control place provides a native [Gameday feature](/docs/chaos-engineering/use-harness-ce/GameDay) using which chaos experiments can be planned and executed.

---

## Scaling Harness Chaos Engineering
For the Kubernetes targets - it is easier to onboard chaos capabilities to your applications on a new Kubernetes cluster using the agentless model. Once the [Harness delegate is deployed and configured](/docs/platform/delegates/delegate-concepts/delegate-overview#install-a-delegate), you can onboard chaos to a new Kubernetes cluster by [adding a connector](/docs/platform/connectors/cloud-providers/add-a-kubernetes-cluster-connector) and running an [automated chaos onboarding wizard](/docs/chaos-engineering/getting-started/onboarding/) that discovers the resources and creates initial set of chaos experiments.

![Scaling with Harness Chaos Engineering](./static/architecture/scalingchaos.png)
![Scaling with Harness Chaos Engineering](./static/architecture/scalingchaos.png)
4 changes: 2 additions & 2 deletions docs/chaos-engineering/concepts/explore-features.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Harness Chaos Engineering Features
sidebar_label: Explore Features
sidebar_position: 6
sidebar_position: 8
description: Explore all the capabilities of Harness Chaos Engineering
---

Expand Down Expand Up @@ -69,7 +69,7 @@ For more information on infrastructure logs, go to [Infrastructure Logs](/docs/c

### Application Map

It is a resource on the Harness Platform (also known as the control plane) that binds multiple interacting [discovered services](/docs/chaos-engineering/use-harness-ce/service-discovery) into a single object, thereby allowing the users to act (test, monitor, and so on) on a group of services.
It is a resource on the Harness Platform (also known as the control plane) that binds multiple interacting [discovered services](/docs/platform/service-discovery) into a single object, thereby allowing the users to act (test, monitor, and so on) on a group of services.

Application maps help:
- Test and monitor a group of services.
Expand Down
Loading