forked from harness/developer-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'harness:main' into main
- Loading branch information
Showing
222 changed files
with
8,139 additions
and
3,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ | |
|
||
# production | ||
/build | ||
|
||
**/assets | ||
**/static | ||
**/images |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
# name: textlint | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# pull_request: | ||
# types: | ||
# - opened | ||
# - synchronize | ||
# - reopened | ||
# branches: | ||
# - main | ||
|
||
# jobs: | ||
# build: | ||
# if: github.repository == 'harness/developer-hub' | ||
# runs-on: ubuntu-latest | ||
|
||
# strategy: | ||
# matrix: | ||
# node-version: [18.x] | ||
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# cache: 'yarn' | ||
# # - continue-on-error: true | ||
# - run: yarn | ||
# # - run: npm run build --if-present | ||
# - run: yarn lint:textlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 94 additions & 30 deletions
124
docs/chaos-engineering/configure-chaos-experiments/chaos-hubs/add-chaos-hub.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,125 @@ | ||
--- | ||
title: Add a chaos hub | ||
title: Add a custom chaos hub | ||
sidebar_position: 5 | ||
--- | ||
|
||
Chaos Hub is a collection experiment templates and faults using which new chaos experiments are created. While you get a default Enterprise Chaos Hub, which offers a wide array of templates and faults out of the box, you can also add a custom Chaos Hub to maintain and distribute private faults and experiments within your organization. | ||
A chaos hub is a collection of experiment templates and faults you can use to launch chaos experiments. CE provides a default **Enterprise Chaos Hub** that includes a wide array of templates and faults out of the box. You can also add your own custom chaos hubs to maintain and share private experiments and faults within your organization. | ||
|
||
To get started, ensure that you have your custom Chaos Hub in a Git repository, such as GitHub, as follows: | ||
![Private Hub](./static/add-chaos-hub/private-hub.png) | ||
There are several reasons for adding a custom chaos hub. A custom hub lets you: | ||
|
||
Next, head to the **Chaos Hubs** page. This page lists all the chaos hubs that are presently available. To add the private hub, select **New Hub**. | ||
* Add custom experiments suited to specific needs in your organization. | ||
|
||
![Chaos Hubs](./static/add-chaos-hub/chaos-hubs.png) | ||
* Share your experiments with others in your Harness project or in other Harness projects—you can add the same custom hub(s) to many projects. | ||
|
||
Provide a name for the hub. Optionally, a description and tags can also be added. Select **Next**. | ||
* Maintain and upgrade experiments in one place so those you share your hubs with always have the latest version. | ||
|
||
Now, we need to add a Chaos Hub connector i.e. a Git connector for syncing the custom Chaos Hub repository. Under **Chaos Hub Connector** you'll find the existing Git connectors listed under the Project, Organization, and Account scope. Select **New Connector**. | ||
* Provide secure access to your custom experiments. | ||
|
||
![Existing Connectors](./static/add-chaos-hub/existing-connectors.png) | ||
This topic shows how to add and connect a custom chaos hub. | ||
|
||
Choose **GitHub Connector**. Add a name for the connector. Optionally, a description and tags can also be added. Select **Next**. | ||
## Prerequisites | ||
|
||
For URL type, select **Repository**. You can also select **Account** in case you want to create a Account scoped GitHub connector, which may be used for connecting multiple Chaos Hubs from a single GitHub account. | ||
1. Be sure you have a Git repository for your custom chaos hub, where you will store experiments and faults. The repository must include two folders: `experiments` and `faults`. Here's an example repo: | ||
|
||
The connection type can be **HTTP**. Lastly, provide the custom Chaos Hub repository URL. Alternatively, if you need to provide an account URL, in case URL Type was selected as **Account**. Also, provide any Test Repository name from your GitHub account to validate the credentials. | ||
![Private Hub](./static/add-chaos-hub/private-hub.png) | ||
|
||
Then, select **Next**. | ||
1. Generate a personal access token [from GitHub](https://github.com/settings/tokens) to access and sync your repository with Harness. The token must have at least the **repo** scope. | ||
|
||
![Add Connector Details](./static/add-chaos-hub/add-connector-details.png) | ||
![GitHub New personal access token (classic) screen](./static/add-chaos-hub/github-access-token.png) | ||
|
||
For Credentials, Username and Token can be used for authenticating with GitHub. Under **Username**, provide your GitHub username as plain text. Next, a GitHub Personal Access Token needs to be provided as a Secret. Select **Create or Select a Secret**. | ||
|
||
You'll be able to view all the Secrets in the Project, Organization, and Account scope. Select **New Secret Text**. | ||
## Add a custom chaos hub | ||
|
||
![Add Secret](./static/add-chaos-hub/add-secret.png) | ||
To add a custom chaos hub: | ||
|
||
To add the secret, provide the secret name. Optionally, a description and tags can also be added. Then, provide the PAT under **Secret Value**. In case you haven't already created a GitHub PAT, provided that you're logged in to GitHub, head over to [GitHub Tokens](https://github.com/settings/tokens) and generate a new token (classic). Please ensure that the token at least has a **repo** scope. Finally, select **Save**. | ||
1. In your Harness project, navigate to the **Chaos > ChaosHubs**, and then select **+ New ChaosHub**. | ||
|
||
![New Secret](./static/add-chaos-hub/new-secret.png) | ||
1. Enter a **Name** for the hub and, optionally, add a **Description** and **Tags**. | ||
|
||
This would add your GitHub repo connector and initialize the PAT for authentication. Select **Continue**. | ||
1. Select **Continue**. | ||
|
||
![Add Credentials](./static/add-chaos-hub/add-credentials.png) | ||
1. On the Git Connection screen, add a new Git connector to access and sync your repository with Harness. | ||
|
||
Select **Connect through Harness Platform** for the connectivity mode. Finally, select **Save and Continue**. | ||
![Git Connection screen](./static/add-chaos-hub/initial-git-connection-screen.png) | ||
|
||
This should prompt a connection test, which validates that Harness is able to access the Git repository with the given configuration. Select **Finish**. | ||
1. Select the field **ChaosHub Connector**. This displays existing Git connectors listed under separate tabs for Project, Organization, and Account scopes. | ||
|
||
![GitHub Connection Test](./static/add-chaos-hub/github-connection-test.png) | ||
![Existing Connectors](./static/add-chaos-hub/existing-connectors.png) | ||
|
||
This concludes the process of adding the Chaos Hub connector. For the **Hub Repository Branch**, provide the repository branch in which the Chaos Hub files exist. Lastly, select **Connect Hub**. | ||
1. Select **New Connector**, and then choose **GitHub Connector**. | ||
|
||
![Git Connection](./static/add-chaos-hub/git-connection.png) | ||
1. In the Overview screen, enter a **Name** and optional description and tags, and then select **Continue**. | ||
|
||
This should prompt a connection test, which validates that the custom Chaos Hub is properly setup. Select **Finish**. | ||
The Details screen is displayed. | ||
|
||
![Hub Connection Test](./static/add-chaos-hub/hub-connection-test.png) | ||
![Add Connector Details](./static/add-chaos-hub/add-connector-details.png) | ||
|
||
You've now added your custom Chaos Hub. You can browse the Experiments and Faults available as part of it by selecting it. | ||
1. In the Details screen, for **URL Type**, select **Repository**. | ||
|
||
![Private Hub Added](./static/add-chaos-hub/private-hub-added.png) | ||
You can select **Account** instead if you want to create an account-scoped GitHub connector. This may be used for connecting multiple Chaos Hubs from a single GitHub account. | ||
|
||
1. For **Connection Type**, select **HTTP**. | ||
|
||
1. In **GitHub Repository URL**, enter the URL of your custom chaos hub repository. | ||
|
||
If you selected **Account** for **URL Type**, fill out these fields instead: | ||
|
||
* In **GitHub Account URL**, enter the account URL for your custom chaos hub repository. | ||
|
||
* In **Test Repository**, enter any repository name from your GitHub account to validate the connection. | ||
|
||
1. Select **Continue**. | ||
|
||
The Credentials screen is displayed. | ||
|
||
![Credentials screen](./static/add-chaos-hub/github-con-credentials.png) | ||
|
||
1. On the Credentials screen, enter the **Username** (in plain text) for authenticating with your GitHub repo. | ||
|
||
1. In **Personal Access Token**, select **Create or Select a Secret**. | ||
|
||
This displays all the secrets in separate tabs for Project, Organization, and Account scopes. | ||
|
||
![Add Secret](./static/add-chaos-hub/add-secret.png) | ||
|
||
1. Select **New Secret Text**. | ||
|
||
![New Secret](./static/add-chaos-hub/new-secret.png) | ||
|
||
1. In the Add new Encrypted Text screen, fill out the fields as follows: | ||
|
||
1. In **Secret Name**, enter a name for this secret. | ||
1. In **Secret Value**, enter a personal access token (PAT) generated from [GitHub](https://github.com/settings/tokens). | ||
|
||
Ensure that the token has at least a [**repo**](#prerequisites) scope. | ||
|
||
1. Select **Save**, and then on the Credentials screen, select **Continue**. | ||
|
||
![Add Credentials](./static/add-chaos-hub/add-credentials.png) | ||
|
||
This adds your GitHub repo connector and initializes the PAT for authentication. | ||
|
||
1. In the Connect to provider screen, select **Connect through Harness Platform**, and then select **Save and Continue**. | ||
|
||
This starts a connection test, which validates that Harness is able to access the Git repository with the given configuration. | ||
|
||
![GitHub Connection Test](./static/add-chaos-hub/github-connection-test.png) | ||
|
||
1. When the test is successful, select **Finish**. | ||
|
||
The Git Connection screen is displayed. | ||
|
||
![Git Connection](./static/add-chaos-hub/git-connection.png) | ||
|
||
1. In **Hub Repository Branch**, enter the repository branch in which the Chaos Hub files exist. | ||
1. Select **Connect Hub**, and then select **Finish**. | ||
|
||
Your new custom chaos hub appears in the **ChaosHubs** page. | ||
|
||
:::info note | ||
To share your custom chaos hub with another Harness project, add the hub to the other project, using the same procedure above. | ||
::: | ||
|
||
## Next steps | ||
|
||
Now you can add and launch experiments in your custom chaos hub, or add YAML fault and experiment definitions directly in your chaos hub GitHub repo, and then sync it with Harness. Head to [Manage custom chaos hubs](/docs/chaos-engineering/configure-chaos-experiments/chaos-hubs/manage-hub) for details. |
97 changes: 97 additions & 0 deletions
97
docs/chaos-engineering/configure-chaos-experiments/chaos-hubs/manage-hub.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
title: Manage custom chaos hubs | ||
sidebar_position: 10 | ||
--- | ||
|
||
This topic shows how to save and manage experiments in your custom chaos hub(s), and how to sync your chaos hub GitHub repo with Harness. Go to [Add a custom chaos hub](/docs/chaos-engineering/configure-chaos-experiments/chaos-hubs/add-chaos-hub) for setup instructions. | ||
|
||
## View chaos hubs | ||
|
||
The experiments you see in various chaos hubs are actually templates from which you can launch the experiments after specifying some details. | ||
|
||
To view the default and custom chaos hubs: | ||
|
||
1. In Harness, navigate to **Chaos > ChaosHubs**. | ||
|
||
This page lists the default Enterprise Chaos Hub, and any custom chaos hubs. | ||
|
||
![ChaosHubs page with default and custom hubs highlighted](./static/manage-hub/custom-default-chaoshubs.png) | ||
|
||
1. Select the chaos hub 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. | ||
|
||
![Viewing experiments in a chaos hub, with an experiment tag/filter circled](./static/manage-hub/view-chaos-hub.png) | ||
|
||
The experiments below are in the default Enterprise Chaos Hub. They are organized by platform/technology. | ||
|
||
![Enterprise ChaosHub](./static/manage-hub/default-chaos-hub.png) | ||
|
||
|
||
## Add experiments to a custom chaos hub | ||
|
||
When you add an experiment to a custom chaos hub, it's saved as a template from which you can [launch](#launch-an-experiment-from-a-custom-chaos-hub) the experiment after specifying some details. | ||
|
||
|
||
To add an experiment to a custom chaos hub: | ||
|
||
1. [Create an experiment](/docs/chaos-engineering/configure-chaos-experiments/experiments/construct-and-run-custom-chaos-experiments) as usual. | ||
|
||
1. In the Chaos Experiments page, find the experiment you want to add to a custom chaos hub, select the **More options** icon (**⋮**), and then select **Add to ChaosHub**. | ||
|
||
![More options menu, showing **Add to ChaosHub** for an experiment](./static/manage-hub/menu-add-to-chaos-hub.png) | ||
|
||
1. 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. | ||
|
||
![Save to ChaosHub screen](./static/manage-hub/save-to-chaos-hub-dialog.png) | ||
|
||
:::tip | ||
Including **Experiment Category Tag(s)** helps organize your experiments. When you [view](#view-chaos-hubs) the custom chaos hub, you can see all experiments as well as experiments grouped by tag. | ||
::: | ||
|
||
1. Select the **Hub** field, choose the custom chaos hub you want to add the experiment to, and then select **Apply**. | ||
|
||
1. Select **Save**. | ||
|
||
This saves your experiment as a template in a custom chaos hub. | ||
|
||
:::info note | ||
You can also save an experiment as a template to a custom chaos hub when [creating the experiment](/docs/chaos-engineering/configure-chaos-experiments/experiments/construct-and-run-custom-chaos-experiments) 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 chaos hub. | ||
|
||
![Experiment details screen with Save and Add to ChaosHub options circled](./static/manage-hub/experiment-save-to-hub.png) | ||
::: | ||
|
||
## Sync Harness with a chaos hub Git repository | ||
|
||
When you [connect a custom chaos hub](/docs/chaos-engineering/configure-chaos-experiments/chaos-hubs/add-chaos-hub), 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 chaos hub's git repo with Harness: | ||
|
||
1. In Harness, navigate to **Chaos > ChaosHubs**. | ||
1. Select the **More options** icon (**⋮**) for the hub you want to sync, and then select **Sync Hub**. | ||
|
||
![The **More options** icon (**⋮**) for a custom hub](./static/manage-hub/chaos-hub-menu.png) | ||
|
||
## Launch an experiment from a chaos hub | ||
|
||
You can launch experiments from the default Enterprise Chaos Hub or from custom hubs. | ||
|
||
:::info note | ||
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 select to run them. | ||
::: | ||
|
||
To launch an experiment from a chaos hub: | ||
|
||
1. In Harness, navigate to **Chaos > ChaosHubs**, and then select the hub you want. | ||
1. Find the experiment you want to launch, and then select **Launch Experiment**. | ||
1. Select a chaos infrastructure, and then select **Next**. | ||
|
||
You can change the infrastructure type if necessary. | ||
|
||
![Select a Chaos Infrastructure partial screenshot showing infrastructure fields](./static/manage-hub/launch-select-chaos-infra.png) | ||
|
||
Chaos Studio is displayed when you select **Next**. | ||
|
||
1. In Chaos Studio, select **Save**, and then select **Run**. |
Binary file modified
BIN
-449 KB
(13%)
...ring/configure-chaos-experiments/chaos-hubs/static/add-chaos-hub/add-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8.54 KB
(100%)
...igure-chaos-experiments/chaos-hubs/static/add-chaos-hub/existing-connectors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+124 KB
...igure-chaos-experiments/chaos-hubs/static/add-chaos-hub/github-access-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.4 KB
...re-chaos-experiments/chaos-hubs/static/add-chaos-hub/github-con-credentials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.4 KB
...s-experiments/chaos-hubs/static/add-chaos-hub/initial-git-connection-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-468 KB
(12%)
...ing/configure-chaos-experiments/chaos-hubs/static/add-chaos-hub/private-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.6 KB
...ing/configure-chaos-experiments/chaos-hubs/static/manage-hub/chaos-hub-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.8 KB
...ure-chaos-experiments/chaos-hubs/static/manage-hub/custom-default-chaoshubs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 KB
.../configure-chaos-experiments/chaos-hubs/static/manage-hub/default-chaos-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68.7 KB
...igure-chaos-experiments/chaos-hubs/static/manage-hub/experiment-save-to-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.2 KB
...re-chaos-experiments/chaos-hubs/static/manage-hub/launch-select-chaos-infra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.3 KB
...figure-chaos-experiments/chaos-hubs/static/manage-hub/menu-add-to-chaos-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.2 KB
...ure-chaos-experiments/chaos-hubs/static/manage-hub/save-to-chaos-hub-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+66.3 KB
...ing/configure-chaos-experiments/chaos-hubs/static/manage-hub/view-chaos-hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.