Manage custom ChaosHub
This section describes how to save and manage experiments in your custom chaoshub(s), and how to sync your ChaosHub GitHub repo with Harness. Go to Add a custom ChaosHub for setup instructions.
View ChaosHubs
The experiments you see in various ChaosHubs are actually templates from which you can launch the experiments after specifying some details.
To view the default and custom ChaosHub:
-
In Harness, navigate to Chaos > ChaosHubs.
This page lists the default Enterprise ChaosHub, and any custom ChaosHubs.
-
Select the ChaosHub you want to view.
The experiments below are in a custom hub. All experiments are displayed by default. You can select a tag (circled below) to see experiments with that tag applied.
The experiments below are in the default Enterprise ChaosHub. They are organized by platform/technology.
Add experiments to a custom ChaosHub
When you add an experiment to a custom ChaosHub, it's saved as a template from which you can launch the experiment after specifying some details.
To add an experiment to a custom ChaosHub:
-
Create an experiment as usual.
-
In the Chaos Experiments page, find the experiment you want to add to a custom ChaosHub, select the More options icon (⋮), and then select Add to ChaosHub.
-
In the Save to ChaosHub screen, verify the Name, Description and Experiment Category Tag.
To add a new tag, type its name and then press the Enter/Return key.
tipIncluding Experiment Category Tag(s) helps organize your experiments. When you view the custom ChaosHub, you can see all experiments as well as experiments grouped by tag.
-
Select the Hub field, choose the custom ChaosHub you want to add the experiment to, and then select Apply.
-
Select Save.
This saves your experiment as a template in a custom ChaosHub.
You can also save an experiment as a template to a custom ChaosHub when creating the experiment in Chaos Studio. The Save button saves the experiment itself so that it appears on the Chaos Experiments page. Selecting the down-arrow next to Save lets you add the experiment as a template to a custom ChaosHub.
Sync Harness with a ChaosHub Git repository
When you connect a custom ChaosHub, you can add and edit experiments in that hub in either Harness or the custom hub's GitHub repository. When you make changes in Harness, your repository is synced automatically. When you make changes in your repository, you must sync it with Harness using the UI.
To sync your custom ChaosHub's git repo with Harness:
-
In Harness, navigate to Chaos > ChaosHubs.
-
Select the More options icon (⋮) for the hub you want to sync, and then select Sync Hub.
Launch an experiment from a ChaosHub
You can launch experiments from the default Enterprise Chaos Hub or from custom hubs.
Launching the experiment from a hub is different from running an experiment from the Chaos Experiments page. The experiments in chaos hubs are actually templates, so when you launch them from a hub you must provide some additional details. The experiments in the Chaos Experiments page execute immediately, as configured, when you run them.
To launch an experiment from a chaos hub:
-
In Harness, navigate to Chaos > ChaosHubs.
-
Select the hub whose experiments you wish to launch.
-
Find the experiment you want to launch, and then select Launch Experiment.
-
Select a chaos infrastructure, and then select Next. You can change the infrastructure type if necessary.
-
This takes you to the Experiment Builder where you can select the faults in the experiment to configure them. You can add more faults or delete faults from the experiment, or update the sequence of faults.
-
Select Run to execute the experiment.
You can also save your customized experiment as a template in a chaos hub using the Save button.