Skip to content

Commit

Permalink
chore: Refactors user guide pages (#270)
Browse files Browse the repository at this point in the history
Signed-off-by: neelanjan00 <[email protected]>
  • Loading branch information
neelanjan00 committed Sep 19, 2024
1 parent ceb8a67 commit d25b7fc
Show file tree
Hide file tree
Showing 78 changed files with 363 additions and 380 deletions.
2 changes: 1 addition & 1 deletion website/docs/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A very high level overview of the entire Litmus architecture with the objective

### [Control Plane](chaos-control-plane.md)

Consists of micro-services responsible for the functioning of the ChaosCenter, the web based portal used for creating, scheduling, and monitoring chaos scenarios.
Consists of micro-services responsible for the functioning of the ChaosCenter, the web based portal used for creating, scheduling, and monitoring chaos experiments.

### [Execution Plane](chaos-execution-plane.md)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/concepts/chaos-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The term **Chaos Scenario/Workflow** has been changed to **Chaos Experiment**.

## Prerequisites

The following should be required before creating a Chaos Experiment:
The following are required before creating a Chaos Experiment:

- [ChaosCenter](../getting-started/resources.md#chaoscenter)
- [Chaos Infrastructure](../getting-started/resources.md#chaosagents)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/integrations/grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Chaos Engineering is the discipline of experimenting on a system to build confid

## Before you begin

The following should be required before integrating Grafana with litmus 2.0:
The following are required before integrating Grafana with litmus 2.0:

- [Prometheus TSDB](https://prometheus.io/)
- [Prometheus Integration](prometheus.md)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/integrations/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LitmusChaos facilitates real-time monitoring for events and metrics using it’s

## Before you begin

The following should be required before integrating Prometheus in litmus 2.0:
The following are required before integrating Prometheus in litmus 2.0:

- [Prometheus TSDB](https://prometheus.io/)
- [Probes](../concepts/probes.md)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/user-guides/accept-invite.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Once the invitation is received, you can take a look at invitation project name,

<img src={require('../assets/user-guides/teaming/accept-invite/step-1.png').default} />

Once accepted, you can switch to the project using the side nav as shown below:
Once accepted, you can switch to the project using the side navigating as shown below:

<img src={require('../assets/user-guides/teaming/accept-invite/step-2.png').default} />
20 changes: 11 additions & 9 deletions website/docs/user-guides/account-settings.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
---
id: account-settings
title: Account Settings
sidebar_label: Account Settings
title: Account settings
sidebar_label: Account settings
---

---

Under the account settings, you can change your personal details such as the email, name, and password.

> Note: The username can’t be changed as it is unique.
:::note
The username can’t be changed as it is unique.
:::

To navigate to the accounts page, click on the user avatar on the bottom left of the nav-bar:
To navigate to the accounts page, click on the user avatar on the bottom left of the navbar:

<figure>
<img src={require('../assets/user-guides/my-account/step-1.png').default} alt="avatar nav" />
</figure>

## Edit Personal Details
## Edit personal details

Click the edit icon to open the edit modal:

<figure>
<img src={require('../assets/user-guides/my-account/step-2.png').default} alt="edit icon" />
</figure>

Enter your name and your email address in the following text fields and click on the `Confirm` button to save the new details.
Enter your name and email address in the following text fields and click on the **Confirm** button to save the new details.

<figure>
<img src={require('../assets/user-guides/my-account/step-3.png').default} alt="edit information" />
</figure>

## Change Password
## Change password

On the same page, you can change your password by clicking on the `Change Password` button.
On the same page, you can change your password by clicking on the **Change Password** button.

<figure>
<img src={require('../assets/user-guides/my-account/step-4.png').default} alt="edit information" />
</figure>

To update your password enter your current password as well as the new password you wish to set and click **Confirm**
To update your password enter your current password as well as the new password you wish to set and select **Confirm**.

<figure>
<img src={require('../assets/user-guides/my-account/step-5.png').default} alt="edit information" />
Expand Down
2 changes: 1 addition & 1 deletion website/docs/user-guides/analyze-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ On clicking on a bar, more details about the chaos scenario run represented by t

## Learn more

- [Compare Chaos Scenarios](comparative-analysis.md)
- [Compare Chaos Experiments](comparative-analysis.md)
- [Manage Application Dashboard](manage-app-dashboard.md)
- [Configure Datasource](configure-datasource.md)
14 changes: 7 additions & 7 deletions website/docs/user-guides/change-project-name.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
id: change-project-name
title: Changing Project Name
sidebar_label: Change Project Name
title: Changing project name
sidebar_label: Change project name
---

---

Owners have the ability to change the name of their project if they wish to do so.
Owners have the ability to change the name of their project.

## Before you begin

The concept of `Projects` is discussed [here](../concepts/projects.md) and will help you build a foundational understanding of what projects mean in the ChaosCenter.
The concept of **Projects** is discussed [here](../concepts/projects.md) and will help you build a foundational understanding of what projects mean in the ChaosCenter.

## Steps

### 1. Go to `Account setting`
### 1. Go to **Account setting**

Go to the `Overview` section of settings and scroll to the `Your Projects` section:
Go to the **Overview** section of settings and scroll to the **Your Projects** section:

<img src={require('../assets/user-guides/managing-projects/change-project-name/step-1.png').default} width="1000" height="500" />

Expand All @@ -28,7 +28,7 @@ Click options icon to open the options menu and click on the edit option (demons

### 3. Replace name

Once in the editing mode, type out the name you want to replace the current name with, and click on the `Confirm` button.
Once in the editing mode, type out the name you want to replace the current name with, and click on the **Confirm** button.

<img src={require('../assets/user-guides/managing-projects/change-project-name/step-3.png').default} />

Expand Down
44 changes: 23 additions & 21 deletions website/docs/user-guides/chaoscenter-oauth-dex-installation.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
id: chaoscenter-oauth-dex-installation
title: ChaosCenter with OAuth2 Login Support
sidebar_label: OAuth2 Support using Dex
title: ChaosCenter with OAuth2 login support
sidebar_label: OAuth2 support using Dex
---

---

# Prerequisites
## Prerequisites

Before deploying LitmusChaos, make sure the following items are there
Before deploying LitmusChaos, make sure the following items are there:

- Kubernetes 1.17 or later

- A Persistent volume of 20GB

:::note
Recommend to have a Persistent volume(PV) of 20GB, You can start with 1GB for test purposes as well. This PV is used as persistent storage to store the chaos config and chaos-metrics in the Portal. By default, litmus install would use the default storage class to allocate the PV. Provide this value
Although it is recommended to have a Persistent Volume(PV) of 20GB, you can start with 1GB for test purposes as well. This PV is used as persistent storage to store the chaos config and chaos-metrics in ChaosCenter. By default, Litmus would use the default storage class to allocate the PV.
:::

- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
Expand All @@ -28,9 +28,9 @@ Before deploying LitmusChaos, make sure the following items are there

## Deploy Dex OIDC provider

In order to enable OAuth2 and to be able to login via Google and GitHub, litmus uses [Dex OIDC](https://dexidp.io/)
In order to enable OAuth2 and to be able to login via Google and GitHub, litmus uses [Dex OIDC](https://dexidp.io/).

Make sure you have your Google and GitHub Client credentials ready, if you do not have them, you can generate one yourself
Make sure you have your Google and GitHub client credentials ready. If you do not have them, you can generate one yourself:

- [Guide to generating Google Oauth Client Credentials](https://support.google.com/cloud/answer/6158849?hl=en#zippy=)
- [Guide to generating GitHub OAuth Client Credentials](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app)
Expand Down Expand Up @@ -78,7 +78,9 @@ curl https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/d
redirectURI: http://<NODE_IP>:32000/callback # Replace your NODE_IP here
```
**Note: The Dex OIDC provider runs at `NODE_IP:32000` by default**
:::info
The Dex OIDC provider runs at `NODE_IP:32000` by default
:::

After the configuration, deploy the Dex deployment using the following command:

Expand All @@ -94,41 +96,41 @@ kubectl get pods -n litmus

<span style={{color: 'green'}}><b>Expected Output</b></span>

```bash
```
NAME READY STATUS RESTARTS AGE
litmusportal-dex-server-7f7658b57-lbbxc 1/1 Running 0 107s
litmusportal-frontend-74d456746f-56v9x 1/1 Running 0 5m57s
litmusportal-server-9c4d85f57-5r6km 2/2 Running 0 5m57s
mongo-0 1/1 Running 0 5m57s
```

### Configuring `chaos-litmus-auth-server` to enable Dex features
### Configuring authentication server to enable Dex features

To set up Dex, we would require to modify our litmusportal-server a bit in order to communicate with Dex. This will be achieved by adding some environment variables
To set up Dex, the backend server needs to be modified to communicate with Dex. This can be achieved by adding some environment variables:

- `OIDC_ISSUER`: The place where the Dex OIDC is hosted, i.e `NODE_IP:32000` or `https://dex.yourdomain.com`
- `DEX_ENABLED`: This variable enables dex features in the litmusportal-server
- `DEX_OAUTH_CALLBACK_URL`: This is the url that will be called back after user completes thier OAuth, this will be the litmusportal-frontend service
- `DEX_OAUTH_CLIENT_ID`: This parameter is defined in the `dex-deployment.yaml` file the defaults being `LitmusPortalAuthBackend`
- `DEX_OAUTH_CLIENT_SECRET`: This parameter is defined in the `dex-deployment.yaml` file the defaults being `ZXhhbXBsZS1hcHAtc2VjcmV0`
- `OIDC_ISSUER`: The address where the Dex OIDC is hosted, i.e. `NODE_IP:32000` or `https://dex.yourdomain.com`.
- `DEX_ENABLED`: Toggle Dex features in the backend server.
- `DEX_OAUTH_CALLBACK_URL`: The URL to be called back after user completes OAuth verification, this will be the frontend service.
- `DEX_OAUTH_CLIENT_ID`: This parameter is defined in the `dex-deployment.yaml` file, defaults to `LitmusPortalAuthBackend`.
- `DEX_OAUTH_CLIENT_SECRET`: This parameter is defined in the `dex-deployment.yaml`, defaults to `ZXhhbXBsZS1hcHAtc2VjcmV0`.

Set your variables using
Set the environment variables using the following command:

```bash
kubectl set env deployment/chaos-litmus-auth-server -n litmus --containers="auth-server" DEX_ENABLED=true OIDC_ISSUER=<REPLACE_NODE_IP>:32000 DEX_OAUTH_CALLBACK_URL=https://<REPLACE_FRONTEND_URL>/auth/dex/callback DEX_OAUTH_CLIENT_ID=LitmusPortalAuthBackend DEX_OAUTH_CLIENT_SECRET=ZXhhbXBsZS1hcHAtc2VjcmV0
```

Your chaos-litmus-auth-server pod(s) will be restarted and Dex features will be enabled!
After this, your authentication server pod(s) will be restarted and Dex features will be enabled.

### Verifying if OAuth2 is enabled

Run the following command to check the env variables of the `auth-server`
Run the following command to check the environment variables for the authentication server.

```bash
kubectl describe deployment litmusportal-server -n litmus auth-server
```

Under `auth-server`, verify if the `DEX_ENABLED` variables are set
Under `auth-server`, verify if the `DEX_ENABLED` variables are set.

<span style={{color: 'green'}}><b>Expected Output</b></span>

Expand All @@ -151,7 +153,7 @@ Under `auth-server`, verify if the `DEX_ENABLED` variables are set
Mounts: <none>
```

Go to http://litmusportal-frontend-service/auth/dex/login, you should be prompted with Google or GitHub login
Go to http://litmusportal-frontend-service/auth/dex/login, you should be prompted with Google or GitHub login.

![litmus-oauth-image](https://user-images.githubusercontent.com/31009634/135559389-c8cdf53c-76cf-4f9d-acaa-99014540f9cf.png)

Expand Down
30 changes: 15 additions & 15 deletions website/docs/user-guides/construct-experiment.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
id: construct-experiment
title: Construct Chaos Scenario YAML without ChaosCenter
sidebar_label: Construct Chaos Scenario YAML
title: Construct chaos experiment YAML without ChaosCenter
sidebar_label: Construct chaos experiment YAML
---

---

**Chaos Scenario** is a set of different operations coupled together to achieve desired chaos imapact on a Kubernetes Cluster. <br/>
A basic chaos scenario consists of these steps:
**Chaos Experiment** is a set of different operations coupled together to achieve desired chaos impact on a Kubernetes Cluster.

1. Install ChaosExperiment
2. Install ChaosEngine
3. Revert Chaos
A basic chaos experiment consists of these steps:
1. Install ChaosExperiment CR
2. Install ChaosEngine CR
3. Cleanup Chaos resources

## Before we begin

To construct a Chaos Scenario without ChaosCenter, make sure you are aware of [Chaos Scenario](../concepts/chaos-workflow.md), [ChaosEngine CR](../glossary.md) and the different steps present in it.
To construct a Chaos Experiment without ChaosCenter, make sure you are aware of [Chaos Experiment](../concepts/chaos-workflow.md), [ChaosEngine CR](../glossary.md) and the different steps present in it.

## Steps to Construct a Chaos Scenario
## Steps to construct a chaos experiment

LitmusChaos leverages the popular chaos scenario and GitOps tool **Argo** to achieve this goal. Argo enables the orchestration of different chaos scenarios together in the form of chaos scenario which is extremly simple and efficient to use.<br/>
LitmusChaos leverages the popular GitOps tool **Argo** to achieve this goal. Argo enables the orchestration of different chaos faults together in the form of a single chaos experiment which is extremely simple and efficient to setup and use.

The structure of a chaos scenario is similar to that of a Kubernetes Object. It consists of the mandatory fields like `apiVersion`, `kind`, `metadata`, `spec`.
The structure of a chaos experiment is similar to that of a Kubernetes Object. It consists of the mandatory fields like `apiVersion`, `kind`, `metadata`, `spec`.

Few additional terms in an Argo chaos scenarios are:
Few additional terms in an Argo chaos experiments are:

1. **Template** : It consists of different steps with their specific operations.

Expand All @@ -39,7 +39,7 @@ Few additional terms in an Argo chaos scenarios are:
template: revert-chaos
```
2. **Steps** : It is a single step inside a chaos scenario which runs a container based on the input parameters.
2. **Steps** : It is a single step inside a chaos experiment which runs a container based on the input parameters.
These can also be sequenced parallely.
```yaml
Expand All @@ -54,7 +54,7 @@ steps:
template: revert-chaos
```
3. **Entrypoint** : The first step that executes in a chaos scenario is called its entrypoint.
3. **Entrypoint** : The first step that executes in a chaos experiment is called its entrypoint.
```yaml
entrypoint: custom-chaos
Expand All @@ -78,7 +78,7 @@ Here, the template with the name `custom-chaos` will be executed first.
message: |...
```

Once the chaos scenario is constructed, it should look like this:
Once the chaos experiment is constructed, it should look like this:

```yaml
apiVersion: argoproj.io/v1alpha1
Expand Down
4 changes: 2 additions & 2 deletions website/docs/user-guides/create-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ You can learn about the concept of chaos environments [here](../concepts/infrast

## 1. Go to the Environments section

Navigate to the `/environments` page (Environments on the left nav), and click on the `New Environment` button
Navigate to the `/environments` page (**Environments** sidebar option on the left nav), and click on the **New Environment** button

<img src={require('../assets/user-guides/environment/create-environment/step-1.png').default} />

## 2. Add Environment details

Add the details of the environment to be created such as name, description, tags, as well as the type of environment, i.e. `Pre-Production` and `Production`, these are meant to help further categorize the environments you are working with.
Add the details of the environment to be created such as name, description, tags, as well as the type of environment, i.e. **Pre-Production** and **Production**, these are meant to help further categorize the environments you are working with.

<img src={require('../assets/user-guides/environment/create-environment/step-2.png').default} />

Expand Down
Loading

0 comments on commit d25b7fc

Please sign in to comment.