Skip to main content

Overview

This topic describes the typical steps to execute a chaos experiment, and delves into how you can deploy the HCE application in two different modes, that is, automated onboarding and guided onboarding.

Before you begin

tip

Currently, this feature is behind the feature flag CHAOS_V2_ENABLED. Contact Harness support to enable the feature.

Steps to create and execute a HCE experiment

You can execute a chaos experiment by:

  1. Fulfilling the resource requirements: In this step, you can create resources or get the required permissions to create the necessary resources.
  2. Adding an environment: A chaos experiment is performed within a chaos environment that houses the necessary infrastructure.
  3. Adding a chaos infrastructure: The required chaos infrastructure is created within a chaos environment.
  4. Validating the chaos infrastructure installation: Once you create your chaos infrastructure, ensure that it has been created in the right manner.
  5. Creating a demo application: You can either create a demo application or use your application on which you can execute chaos experiments.
  6. Creating and running a chaos experiment: Once you have set up your application, you can decide which resources to target and execute the chaos experiments on.

The steps mentioned earlier required some reading and exploring, but if you want a head start to your chaos journey, enter automated onboarding and guided onboarding. These onboarding methods will guide you in creating and executing chaos experiments with the click of a button, without the hassle of explicitly creating environment, infrastructure and other entities!

Automated and guided onboarding

You can execute chaos experiments without explicitly installing the environment or infrastructure or creating an experiment by specifying tunables.

  1. To get hands-on experience, navigate to the Chaos module and select Overview. Select Select a cluster, where you can choose between automated and guided onboarding.

  1. If you choose Yes, in a single step!, go to automated onboarding, and if you choose No, I will choose, go to guided onboarding.

tip
  • Previously, HCE provided a dedicated chaos infrastructure to execute chaos experiments. With the current updates, the chaos-runner is transient and you can execute chaos experiments by installing Harness delegate, thereby eliminating the need to install Harness chaos infrastructure and other additional components.
  • Go to Harness Delegate-driven infrastructure to know more.
  • Once you have installed Harness delegate, you can reuse it to execute experiments, discover services, create network maps and so on.

Prerequisites to automated and guided onboarding

HCE requires that you install a chaos infrastructure in your environment before using one of the onboarding methods (guided or automated). While using one of the onboarding methods, you can simply select the infrastructure (you installed earlier) for use by the chaos experiment.

tip

Once you use a chaos infrastructure for one of the onboarding methods, you need to create a new infrastructure for the second onboarding method. You can't use the same infrastructure more than once. The UI shows whether the infrastructure is already in use, if so, create a new one.

Steps to create an infrastructure for onboarding

  1. Navigate to Continuous Delivery & GitOps module.

  2. Select Environments.

  3. Select one of the environments you created earlier or create a new environment. In this section, you will understand how to use a previously created environment. Go to create a new environment to create a new environment.

  4. Select Infrastructure Definitions tab and select Infrastructure Definition. This opens the modal to create a new infrastructure.

  5. Provide a name, method to set up infrastructure, deployment type, infrastructure type, and cluster details such as connector and namespace. Other fields are not mandatory so you can skip specifying values for those. Select Save.

This creates a new infrastructure in the environment you specify.

Next steps