> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/3.0/troubleshooting-and-resources/training-and-certification/sandbox.md).

# Chaos Sandbox

{% hint style="warning" %}
**SANDBOX DEPRECATED**

The sandbox onboarding UI, certification banner, and related onboarding entry points have been removed from the Chaos Engineering module. This page is retained for reference only.
{% endhint %}

This tutorial guides you through an interactive session where you'll use the sample application **Podtato head** to execute a chaos experiment and enhance the application's resilience.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Before you start the tutorial, ensure you have a Harness account. Follow [these](#create-a-harness-account) steps to create one. Review the [onboarding flow diagram](/resilience-testing/troubleshooting-and-resources/training-and-certification/certification.md) to understand the process for obtaining the Harness Developer Certification.

#### Create a Harness account <a href="#create-a-harness-account" id="create-a-harness-account"></a>

1. Navigate to [app.harness.io](https://app.harness.io/auth/#/signin) and click **Sign up**.

   ![navigate](/files/PdHCZJVQ0xlMru5Yr8mY)
2. Select **Sign up with Email** and enter your work email and password.

   ![enter details](/files/71eeQPC5ok0LjQJMAZnu)
3. You will receive a verification email. Follow the link to access the page with various modules.

   ![verify](/files/TQ3qaifuUA4vQDcI9emf)

### High-level flow of control in a sandbox <a href="#high-level-flow-of-control-in-a-sandbox" id="high-level-flow-of-control-in-a-sandbox"></a>

The diagram below illustrates the high-level flow of control in a sandbox environment:

![control flow](/files/8tCmifYAW6lbScDsAX5J)

### Execute pod delete on the Podtato head app <a href="#execute-pod-delete-on-the-podtato-head-app" id="execute-pod-delete-on-the-podtato-head-app"></a>

After creating an account with Harness, select **Get Started** in the **Chaos Engineering** module.

![landing](/files/XuF7DtXy8TtXjlqkJWHz)

#### Create a sandbox <a href="#create-a-sandbox" id="create-a-sandbox"></a>

1. On the chaos module landing page, select **Create Sandbox**. Note that this is a **Zero Risk** operation!

   ![select module](/files/7R8GvH7NePbAilGz2Pn9)
2. This action creates a new environment where chaos experiments can be executed.

   ![env](/files/vLnAfWAf4yvLN1mUVzvF)
3. This takes you to the **Interactive learning** tab, where you click **Start**.

   ![start](/files/KpAbXEVXe1QlnMftlWNc)

{% hint style="info" %}

* Once you create a sandbox, it can't be deleted.
* All users within a sandbox can share the same sandbox.
* The first time you create a sandbox, the session starts automatically. Subsequent sessions must be explicitly started (Click **Start**).
* You are allocated 20 sessions (each 60 minutes) valid for 30 days from sandbox creation date.
* You can **Stop** and **Restart** the session,with unused time being added to your quota.
  {% endhint %}

#### Execute pod delete experiment <a href="#execute-pod-delete-experiment" id="execute-pod-delete-experiment"></a>

1. The experiment execution starts by creating the necessary clusters in the environment (that you created earlier). Once the clusters are ready, the sandbox creates the pod delete experiment. Click Next.

   ![exp created](/files/4DcbZkVu5Y5ksFnMeCpT)
2. Click **Run** to execute the pod delete experiment. The experiment creates resilience probes to check the availability of the Podtato app's left arm, which will be deleted during the experiment.

   ![exp runs](/files/0XYQGqOc9fdFq9cjfU9W)
3. The experiment deletes a pod (specifically, the left arm pod) and displays the resilience of the Podtato Head application.

   ![exp runs](/files/cey069Eq1nf6LVEnYnrF)

{% hint style="info" %}
The resilience score of 50 indicates that the experiment configured two probes with equal weight. If one probe fails, the score is 50.
{% endhint %}

4. This result shows that the Podtato Head app is not yet resilient. Click **Next** to proceed with configuring the application for improved resilience.

   ![click next](/files/gHv05aKxYPARHeNFuee3)

{% hint style="info" %}

* You can re-run the experiment.
* You can scale up the Podtato head app only once.
* You can delete the Podtato head left arm only once.
* You can re-run the experiment.
* The pod network loss experiment can only be executed after completing the pod delete experiment.
* Rollbacks to previous steps or experiments are not possible.
  {% endhint %}

#### Re-run to build resilience <a href="#re-run-to-build-resilience" id="re-run-to-build-resilience"></a>

1. You will see two commands on the screen. Click **Run** to execute these commands, which will create two replicas of the pod, enhancing its availability. This way, even if one pod is deleted, the application will continue functioning smoothly.

   ![improve resilience](/files/O1O0gmtyVtMPbObp57M7)
2. Click **Next**. Once the application is configured, select **Run** to re-run the experiment.

   ![improve resilience](/files/U1zcb0ZEQQF0J2FdH78J)
3. The pod delete experiment will be executed again. This time, you will see a resilience score of 100 %, indicating that the application remains functional even when a pod is deleted.

   ![improve score](/files/fj4ks47ZorEgrHXX0Ehu)

{% hint style="info" %}
A resilience score of 100 % means both probes, which were configured with equal weight, passed.

<img src="/files/TKhJHTuszv7c5WGlQQJt" alt="probe passed" data-size="original">
{% endhint %}

4. Click **Next** to proceed with the next experiment (pod network loss).

   ![execute next](/files/JmofJr0RCcV8x0gRz8Yb)

{% hint style="info" %}
Click **Run** to re-execute the sandbox session if you run out of time.

<img src="/files/X9WXs1joSCkGd9reSenX" alt="finish" data-size="original">
{% endhint %}

#### Perform the same steps for the next experiment <a href="#perform-the-same-steps-for-the-next-experiment" id="perform-the-same-steps-for-the-next-experiment"></a>

1. After completing the pod delete experiment, you can execute the pod network loss experiment. Follow the same steps as for the pod delete experiment. This experiment configures a probe to check the availability of the Podtato app's left arm, which is targeted.

   ![pod network loss](/files/vic1dF5diMrCHcVBkSwB)
2. Click **Next** to move to the last step of the hands-on lab.

   ![pod network done](/files/pcxtxp2USU57shJLzRHz)
3. You have now completed the chaos hands-on lab by executing two experiments and improving the resilience of the Podtato Head application. Click **Go to Harness University** or follow [this](/resilience-testing/troubleshooting-and-resources/training-and-certification/certification.md) tutorial to obtain the developer certification.

   ![pod network done](/files/2HSIUQaCoe53I1Dr5BfU)

### Create other experiments in sandbox <a href="#create-other-experiments-in-sandbox" id="create-other-experiments-in-sandbox"></a>

In addition to executing **pod delete** and **pod network loss** experiments, you can create other experiments in the sandbox.

* Navigate to your sandbox and select **Chaos Experiments** to view the experiments you've executed or are currently running.

  ![exp exec](/files/IhdqmpEhicTAAszNqAv3)
* Select **New experiment** and follow the steps to [create an experiment](/resilience-testing/chaos-testing/experiments.md).

### Next steps <a href="#next-steps" id="next-steps"></a>

* [Harness Chaos Engineering Developer Certification](/resilience-testing/troubleshooting-and-resources/training-and-certification/certification.md)
