[chore] Restructuring Beta Docs (#29)

* [chore] Resturcturing Beta Docs
* Delete tempfiles
* Update d0-observe.md
* Corrections
Signed-off-by: ajeshbaby <ajesh@chaosnative.com>
This commit is contained in:
Ajesh Baby 2021-04-07 09:10:57 +05:30 committed by GitHub
parent 92cf264306
commit 37e9530519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 291 additions and 25 deletions

View File

@ -1,7 +1,7 @@
---
id: agent-install
title: Agent Install
sidebar_label: Agent
title: Litmus Chaos Agent Install
sidebar_label: Chaos Agent
---
In Litmus the Agents can be classified as two types

View File

@ -0,0 +1,26 @@
---
id: agent-uninstall
title: Litmus Chaos Agent Uninstall
sidebar_label: Chaos Agent
---
As part of uninstalling agent components, we need to perform two steps
1. Disconnect the Agent from Portal
- Login to Chaos Control Plane
- Click on Agent
- Click on the Disconnect icon on the required Chaos Agent which needs to be disconnected
- On the above operation it would remove the subscriber component from Chaos Agent and removes the connectivity between the Chaos Agent and Chaos Control Plane.
**Note** If the Chaos Agent is not reachable it would remove only the entry from the database of the Chaos control plane
2. Remove the Chaos Agent components from the system manually
```bash
kubectl delete chaosengine,chaosexperiments,chaosresults --all -A
kubectl delete ns litmus
```

View File

@ -0,0 +1,39 @@
---
id: create-workflow
title: How to Create a Sample Workflow
sidebar_label: Create Workflow
---
---
Click on the **Schedule your first workflow** button on the home page to get started. It will take you to the workflow page where you can choose or design your own workflow by doing the following steps:
### 1. Choose Target Agent
You have to select a cluster type. There are two types of clusters:
- Internal Cluster (Self Cluster)
- External Clusters that are available on the targets screen.
After Selecting the cluster, you can continue by clicking on **Select and Continue**.
```
Note:
You may have to wait for the cluster to be ready, after which you can move forward by again clicking on “Select and
Continue”. Newly created users by the admin cant schedule a workflow, As non-admin users, you will get a message No Cluster Registered With Your Project ID, Please Wait… if you try to create a workflow.
```
### 2. Choose a Workflow
Next, you need to choose/design the workflow, you will be given a collection of cards grouped as:
- **Predefined Workflow** : These are some workflows that are provided by default, these are already developed and can be tweaked by adding new environment variables according to the requirements of the user. After Selecting a predefined workflow you can choose to change the name and description of the selected workflow by clicking on “Edit Workflow Name”.
### 3. Tune Workflow (Optional)
The next step is tuning the workflow, this section is common for both custom or predefined workflows. You will be given an Editor to check the YAML syntax and also will be able to edit the content in the editor itself. Once the necessary changes have been done, click on Next to move to the next page.
### 4. Reliability Score (Optional)
Here, you can set the points for all the experiments present in the selected workflow. These points will affect the Resilience Weights of application to be used with chaos experiment. The weights have been pre-selected as 10 for each test for you. However, you may review and modify the weightage again. The weights are relative to each other which you can change. The successful outcome of each test carries a certain weight. After selecting weights click on the Next Button.

View File

@ -34,7 +34,7 @@ Next, you need to choose/design the workflow, you will be given a collection of
- **Custom Workflow**: If you are using a Custom workflow you would be given the option to select an experiment, and customize the same. In this section, if you can also **upload** a custom workflow manifest or construct a new one using **experiments from MyHub** with the following steps.
Create the workflow by selecting your hub, followed by selecting the experiment and giving the namespace where the workflow has to be scheduled.
You can also tune the chaos engine for the experiment by adding new env variables and click add experiment.
You can add more experiments and after that, you can also alter the sequence by dragging the selected experiment. Once done, click on **Finish adding experiments** which generates a custom workflow manifest with all the changes that the you have added.
You can add more experiments and after that, you can also alter the sequence by dragging the selected experiment. Once done, click on **Finish adding experiments** which generates a custom workflow manifest with all the changes that you have added.
### 3. Tune Workflow

43
website/docs/d0-create.md Normal file
View File

@ -0,0 +1,43 @@
---
id: d0-create
title: How to create the workflow
sidebar_label: Create Workflow
---
---
Click on the **Schedule your first workflow** button on the home page to get started. It will take you to the workflow page where you can choose or design your own workflow by doing the following steps:
### 1. Choose Target Cluster
You have to select a cluster type. There are two types of clusters:
- Internal Cluster (Self Cluster)
- External Clusters that are available on the targets screen.
After Selecting the cluster, you can continue by clicking on **Select and Continue**.
```
Note:
You may have to wait for the cluster to be ready, after which you can move forward by again clicking on “Select and
Continue”. Newly created users by the admin cant schedule a workflow, As non-admin users, you will get a message No Cluster Registered With Your Project ID, Please Wait… if you try to create a workflow.
```
### 2. Choose a Workflow
Next, you need to choose/design the workflow, you will be given a collection of cards grouped as:
- **Predefined Workflow** : These are some workflows that are provided by default, these are already developed and can be tweaked by adding new environment variables according to the requirements of the user. After Selecting a predefined workflow you can choose to change the name and description of the selected workflow by clicking on “Edit Workflow Name”.
- **Custom Workflow**: If you are using a Custom workflow you would be given the option to select an experiment, and customize the same. In this section, if you can also **upload** a custom workflow manifest or construct a new one using **experiments from MyHub** with the following steps.
Create the workflow by selecting your hub, followed by selecting the experiment and giving the namespace where the workflow has to be scheduled.
You can also tune the chaos engine for the experiment by adding new env variables and click add experiment.
You can add more experiments and after that, you can also alter the sequence by dragging the selected experiment. Once done, click on **Finish adding experiments** which generates a custom workflow manifest with all the changes that you have added.
### 3. Tune Workflow
The next step is tuning the workflow, this section is common for both custom or predefined workflows. You will be given an Editor to check the YAML syntax and also will be able to edit the content in the editor itself. Once the necessary changes have been done, click on Next to move to the next page.
### 4. Reliability Score
Here, you can set the points for all the experiments present in the selected workflow. These points will affect the Resilience Weights of application to be used with chaos experiment. The weights have been pre-selected as 10 for each test for you. However, you may review and modify the weightage again. The weights are relative to each other which you can change. The successful outcome of each test carries a certain weight. After selecting weights click on the Next Button.

View File

@ -0,0 +1,42 @@
---
id: d0-observe
title: How to Observe/Track a Workflow
sidebar_label: Observe Workflow
---
## Observe a Workflow
---
After scheduling a workflow, the user can track the status of the workflow from the Browse Workflow section. The status that is currently displayed are :
- Failed
- Running
- Completed
### 1. Workflow Analysis
The user can analyze a workflow using two methods:
#### a. Visualize the workflow graph
After scheduling a workflow, the user can click on the **Show the workflow** option to see the real-time graph of the workflow.
<figure>
<img src={require('./assets/experiment-graph.png').default} width="800" />
<i>Fig 1 : Graph of Kube Proxy Chaos workflow with chaos logs and chaos result of node-cpu-hog experiment.</i>
</figure>
The graph consists of useful information such as :
- Phase of individual nodes.
- Total time taken for the nodes to execute.
- Structure of the experiments (Serial or Parallel experiments).
- **Logs of individual nodes**: The user can click on the nodes to get the logs of that particular step. If the revert-chaos step is disabled, the complete logs are available which include the runner pod logs and the chaos logs.
- **Chaos Results** : Once the experiment completes, the Chaos Results are also available alongside the logs. The Chaos results are directly fetched from the ChaosResult CRD.
#### b. Analytics from the workflow table
Once the workflow execution completes, the user can click the **Show the analytics** option which opens up a time series graph of the workflow. This graph can be crucial to analyse the Cron Workflows. Each bar in the graph represents one run of the workflow.
On hovering over the bar, the user can view the following information related to the workflow run:
- Resilience Score
- Passed Tests
- Failed Tests
On clicking the bar, a table is shown below the graph which displays all the experiments present in the workflow run and their individual result points. These result points are then used to calculate the **Resilience Score** of the workflow which is displayed at the end of the table.

View File

@ -0,0 +1,22 @@
---
id: d1-schedule
title: How to Schedule a Workflow
sidebar_label: Schedule workflow
---
## Workflow Scheduling
---
### 1. Scheduling
After selecting the reliability scores for the tests, the user can now schedule the workflows. The default option in this screen is **Schedule Now**. With this option the user can run a workflow immediately once the workflow creation is completed. The second option available to the user is **Schedule Later**. With this option, the user can schedule the workflow at any time in the future. When this option is selected , the kind of the workflow changes from **Workflow** to **CronWorkflow** with a Cron syntax added in the workflow manifest. The following options are available to the user for scheduling a workflow later:
- Every Hour
- Every Day
- Every Week
- Every Month
### 2. Verify and Commit
After adding the schedules, the user can see the verify and commit screen where all the details of the workflow are present such as the workflow name, the target cluster, workflow manifest, test weights etc. Once the user finishes configuring the workflow, it can be started by selecting the **Finish** button.

30
website/docs/d1-update.md Normal file
View File

@ -0,0 +1,30 @@
---
id: d1-update
title: How to Update a Workflow
sidebar_label: Update Workflow
---
## Update a Workflow
---
After scheduling a workflow, the user can update the scheduled configuration of the workflow by clicking on Schedules tab.
Here the user can view several options like:
- Re-Run schedule
- Edit Schedule
- Delete Schedule
- Download Manifest
### 1. Re-Run Schedule
This option allows the user to re-run a workflow with the same configuration as earlier. This option is only available when the workflow is scheduled once.
### 2. Edit Schedule
This option allows the user to edit the schedule configuration of the workflow. The user can either disable the workflow or change the Cron Syntax by changing the scheduled timings.
The disable workflow option adds a label **suspend: true** that disables any scheduled workflow.
This option is only available if the workflow is a Cron Workflow i.e a recurring workflow.
### 3. Delete Schedule
This option allows the user to delete a scheduled workflow. This is an irreversible process and once the delete option is selected, all the workflow configuration and the schedules are deleted from the portal.
### 4. Download Manifest
This option allows the user to download the manifest of the workflow. The manifest consists of all the configurations that the user has added while workflow creation. The user can then alter changes in this manifest and upload it with the portal to schedule a new workflow.

View File

@ -12,7 +12,9 @@ sidebar_label: Pre-requisites
- Persistent volume of 20GB
Recommend to have a Persistent volume(PV) of 20GB, You can start with 1GB for test purpose as well. This PV is used as a 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
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
- Helm3 or Kubectl
## Getting Started
@ -21,11 +23,9 @@ Running chaos on your application involves the following steps:
[Install Litmus](litmus-install)
[How to Create a Workflow](create)
[How to Create and Run a Workflow](create-workflow)
[Run Chaos](observe)
[Observe ChaosResults](observe)
[Observe ChaosResults](observe-workflow)
<hr/>

View File

@ -1,18 +1,19 @@
---
id: litmus-install
title: How to install Litmus
sidebar_label: Litmus
title: Litmus Chaos Control Plane
sidebar_label: Control Plane
---
---
<iframe width="560" height="315" src="https://www.youtube.com/embed/rOrKegj5ePI" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
### Pre-requisites
- Kubernetes 1.15 or later.
- Persistent volume of 20GB
Recommend to have a Persistent volume(PV) of 20GB, You can start with 1GB for test purpose as well. This PV is used as a 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
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
- Helm3 or Kubectl

View File

@ -0,0 +1,17 @@
---
id: litmus-uninstall
title: Litmus Chaos Control Plane Uninstall
sidebar_label: Control Plane
---
---
### **Uninstallon of Litmus Control Plane**
The helm chart uninstall installs the control plane components
```bash
helm uninstall litmuschaos --namespace litmus
```

View File

@ -0,0 +1,33 @@
---
id: observe-workflow
title: How to Observe/Track a Workflow
sidebar_label: Observe Workflow
---
## Observe a Workflow
---
After scheduling a workflow, the user can track the status of the workflow from the Browse Workflow section. The status that is currently displayed are :
- Failed
- Running
- Completed
### 1. Workflow Analysis
The user can analyze a workflow using two methods:
#### a. Visualize the workflow graph
After scheduling a workflow, the user can click on the **Show the workflow** option to see the real-time graph of the workflow.
<figure>
<img src={require('./assets/experiment-graph.png').default} width="800" />
<i>Fig 1 : Graph of Kube Proxy Chaos workflow with chaos logs and chaos result of node-cpu-hog experiment.</i>
</figure>
The graph consists of useful information such as :
- Phase of individual nodes.
- Total time taken for the nodes to execute.
- Structure of the experiments (Serial or Parallel experiments).
- **Logs of individual nodes**: The user can click on the nodes to get the logs of that particular step. If the revert-chaos step is disabled, the complete logs are available which include the runner pod logs and the chaos logs.
- **Chaos Results** : Once the experiment completes, the Chaos Results are also available alongside the logs. The Chaos results are directly fetched from the ChaosResult CRD.

View File

@ -8,10 +8,10 @@ sidebar_label: Observe
---
After scheduling a workflow, the user can track the status of the workflow from the Browse Workflow section. The status that are currently displayed are :
After scheduling a workflow, the user can track the status of the workflow from the Browse Workflow section. The status that is currently displayed are :
- Failed
- Running
- Succeeded
- Completed
### 1. Workflow Analysis

View File

@ -12,7 +12,7 @@ sidebar_label: Schedule
After selecting the reliability scores for the tests, the user can now schedule the workflows. The default option in this screen is **Schedule Now**. With this option the user can run a workflow immediately once the workflow creation is completed. The second option available to the user is **Schedule Later**. With this option, the user can schedule the workflow at any time in the future. When this option is selected , the kind of the workflow changes from **Workflow** to **CronWorkflow** with a Cron syntax added in the workflow manifest. The following options are available to the user for scheduling a workflow later:
- Every Hours
- Every Hour
- Every Day
- Every Week
- Every Month

View File

@ -19,7 +19,7 @@ Here the user can view several options like:
This option allows the user to re-run a workflow with the same configuration as earlier. This option is only available when the workflow is scheduled once.
### 2. Edit Schedule
This option allows the user to edit the schedule configuration of the workflow. The user can either disable the workflow or change the Cron Syntax by changing the schedule timings.
This option allows the user to edit the schedule configuration of the workflow. The user can either disable the workflow or change the Cron Syntax by changing the scheduled timings.
The disable workflow option adds a label **suspend: true** that disables any scheduled workflow.
This option is only available if the workflow is a Cron Workflow i.e a recurring workflow.

View File

@ -8,29 +8,42 @@ module.exports = {
"Getting Started": [
"getstarted",
{
Installation: ["litmus-install", "agent-install"],
"Installation" : [ "litmus-install", "agent-install" ],
},
"create-workflow",
"observe-workflow",
{
"How To": ["create", "schedule", "observe", "update"],
"Uninstallation" : [ "agent-uninstall", "litmus-uninstall" ],
},
],
Features: [
"gitops",
"settings",
"myhub",
"User Guide": [
{
"Day 0": ["d0-create", "d0-observe"],
},
{
"Day 1": ["d1-schedule", "d1-update", "settings"],
},
{
"Day 2": ["myhub", "gitops", "probes"],
},
],
// Features: [
// "gitops",
// "settings",
// "myhub",
// "settings",
// "analytics",
// "myhub",
// "external-agents"
],
Concepts: [
"probes",
//],
//Concepts: [
//"probes",
// "cross-cloud-control",
// "litmusctl",
// "crds",
// "rbac",
// "service-acounts",
],
// ],
Advanced: ["admin-mode", "namespaced-mode", "litmus-psp"],
},
};