Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content edit #280

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 63 additions & 55 deletions website/versioned_docs/version-3.9.1/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,33 @@ sidebar_label: Installation
## Prerequisites

- Kubernetes 1.17 or later
- A persistent volume of 20GB
- [Helm3](https://v3.helm.sh/) or [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)

- 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
:::tip
Litmus recommends you have a persistent volume (PV) of 20GB. You can start with 1GB for test purposes. This PV is used as persistent storage to store the chaos configuration and other chaos metrics in the portal. By default, the `litmus install` command uses the default storage class to allocate the PV.
:::

- [Helm3](https://v3.helm.sh/) or [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)

## Installation

Users looking to use Litmus for the first time have two options available to them today. One way is to use a hosted Litmus service like [Harness Chaos Engineering SaaS](https://app.harness.io/auth/#/signin). Alternatively, users looking for some more flexibility can install Litmus into their own Kubernetes cluster.
If you are a first time Litmus user, you can install Litmus in two ways:

Users choosing the self-hosted option can refer to our Install and Configure docs for installing alternate versions and more detailed instructions.
- Use a hosted Litmus service like [Harness Chaos Engineering SaaS](https://app.harness.io/auth/#/signin). Go to [install hosted service] to know more.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
**OR**

<Tabs>
<TabItem value="self-hosted" label="Self-Hosted" default>
Installation of Self-Hosted Litmus can be done using either of the below methods:
<li><a href="#install-litmus-using-helm">Helm3</a> chart</li>
<li><a href="#install-litmus-using-kubectl">Kubectl</a> yaml spec file</li>
<br/>
Refer to the below details for Self-Hosted Litmus installation.
</TabItem>
<TabItem value="hosted" label="Hosted (Beta)">
<a href="https://harness.io/">Harness</a> offers a free service for community members which makes getting started with Litmus easy. Create an account to get started. Once logged in, create a new hosted control plane and connect to it via the up CLI. Litmus can be used as a hosted cloud service using <a href="https://app.harness.io/auth/#/signin">Harness Chaos Engineering SaaS</a>. Harness Chaos Engineering SaaS executes your Chaos Experiments in the cloud by managing all your Chaos Control Plane components, while the Chaos Execution Plane components exist on your Kubernetes cluster as part of an external chaos infrastructure.
<br/><br/>
To get started with Harness Chaos Engineering SaaS, visit <a href="https://developer.harness.io/docs/chaos-engineering/get-started/learn-more-free-plan">Harness Chaos Engineering SaaS</a> and register for free. You can skip the below installation steps.
</TabItem>
</Tabs>
- Install Litmus in your Kubernetes cluster. Go to [self-hosted service] to know more.

:::note
With 3.9.0 release, Cluster scope installation is deprecated. Now Namespaced mode is the only supported and standard installation mode.
If you wish to install Litmus in your Kubernetes cluster (that is, self-hosted), Install and Configure docs for installing alternate versions and more detailed instructions.

## Self-hosted service

You can install self-hosted Litmus in two ways:
- Using [Helm](#install-litmus-using-helm).
- Using [kubectl YAML spec file](#install-litmus-using-kubectl).

:::tip
With the 3.9.0 release, cluster scope installation has been deprecated. Only namespaced scope is supported and is the standard installation mode.
:::

### Install Litmus using Helm
Expand All @@ -52,30 +44,37 @@ The helm chart will install all the required service account configuration and C

The following steps will help you install Litmus ChaosCenter via helm.

#### Step-1: Add the litmus helm repository
#### 1. Add the Litmus Helm repository

Execute the below commands on your terminal.

```bash
helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
helm repo list
```

#### Step-2: Create the namespace on which you want to install Litmus ChaosCenter
#### 2. Create the namespace where you want to install Litmus ChaosCenter

- The ChaosCenter can be placed in any namespace, but for this scenario we are choose `litmus` as the namespace.
You can place ChaosCenter in any namespace, but for this case, choose `litmus` as the namespace.

```bash
kubectl create ns litmus
```

#### Step-3: Install Litmus ChaosCenter
#### 3. Install Litmus ChaosCenter

Execute the below command on your terminal.

```bash
helm install chaos litmuschaos/litmus --namespace=litmus --set portal.frontend.service.type=NodePort
```

> **Note:** If your Kubernetes cluster isn't local, you may want not to expose Litmus via `NodePort`. If so, remove `--set portal.frontend.service.type=NodePort` option. To connect to Litmus UI from your laptop, you can use `port-forward svc/chaos-litmus-frontend-service 9091:9091`. Then you can use your browser and open `127.0.0.1:9091`.
:::info note
- your Kubernetes cluster isn't local, you may want not to expose Litmus via `NodePort`. In that case, remove `--set portal.frontend.service.type=NodePort` option.
- To connect to Litmus UI from your laptop, you can use `port-forward svc/chaos-litmus-frontend-service 9091:9091`. And open `127.0.0.1:9091` on your browser.
:::

- Litmus helm chart depends on `bitnami/mongodb` [helm chart](https://github.com/bitnami/charts/tree/main/bitnami/mongodb), which uses a mongodb image not supported on ARM. If you want to install Litmus on an ARM-based server, please replace the default one with your custom mongodb arm image as shown below.
Litmus helm chart depends on `bitnami/mongodb` [Helm chart](https://github.com/bitnami/charts/tree/main/bitnami/mongodb), which uses a MongoDB image that is not supported on ARM. If you want to install Litmus on an ARM-based server, replace the default with your custom MongoDB ARM image as shown below.

```bash
helm install chaos litmuschaos/litmus --namespace=litmus \
Expand All @@ -102,19 +101,21 @@ Your release is named chaos and its installed to namespace: litmus.
Visit https://docs.litmuschaos.io to find more info.
```

> **Note:** Litmus uses Kubernetes CRDs to define chaos intent. Helm3 handles CRDs better than Helm2. Before you start running a chaos experiment, verify if Litmus is installed correctly.
:::tip
Litmus uses Kubernetes CRDs to define the chaos intent. Helm3 handles CRDs better than Helm2. Before you run a chaos experiment, verify if Litmus is installed correctly.
:::

## **Install Litmus using kubectl**
### Install Litmus using kubectl

In this method the users need to install mongo first via helm and then apply the installation manifest. Follow the instructions [here](https://github.com/litmuschaos/litmus/tree/master/chaoscenter#installation-steps-for-litmus-300-beta9).
You need to install Mongo via helm and apply the installation manifest. Go to [installation instructions for Litmus Beta](https://github.com/litmuschaos/litmus/tree/master/chaoscenter#installation-steps-for-litmus-300-beta9).

### **Install mongo**
#### Install Mongo

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
```

Mongo Values
Mongo values

```bash
auth:
Expand Down Expand Up @@ -146,26 +147,31 @@ metrics:
helm install my-release bitnami/mongodb --values mongo-values.yml -n <NAMESPACE> --create-namespace
```

Litmus supports for HTTP and HTTPS mode of installation.
Litmus supports HTTP and HTTPS mode of installation.

### Basic installation (HTTP based and allows all origins)
### Basic installation (HTTP-based and allows all origins)

Applying the manifest file will install all the required service account configuration and ChaosCenter in namespaced scope.
Applying the manifest file installs all the required service account configuration and ChaosCenter in the namespaced scope.

```bash
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/3.9.1/litmus-getting-started.yaml -n <NAMESPACE>
```

### Advanced installation (HTTPS based and CORS rules apply)
### Advanced installation (HTTPS-based and CORS rules apply)

For advanced installation visit [here](../user-guides/chaoscenter-advanced-installation.md)
For advanced installation visit [advanced installation](../user-guides/chaoscenter-advanced-installation.md)

---
## Hosted (beta) service

[Harness](https://harness.io/) offers a free service for community members which makes getting started with Litmus easy. Create an account to get started. Once you log in, create a new hosted control plane and connect to it via the CLI.

You can use Litmus as a hosted cloud service using [Harness Chaos Engineering SaaS](https://app.harness.io/auth/#/signin). Harness Chaos Engineering SaaS executes your chaos experiments in the cloud by managing all your chaos control plane components. The chaos execution plane components exist on your Kubernetes cluster as part of an external chaos infrastructure.

## **Verify your installation**
To get started with Harness Chaos Engineering SaaS, go to [Harness developer hub](https://developer.harness.io/docs/chaos-engineering/get-started/learn-more-free-plan) and register for free.

#### **Verify if the frontend, server, and database pods are running**
## Verify your installation

- Verify if the frontend, server, and database pods are running
- Check the pods in the namespace where you installed Litmus:

```bash
Expand Down Expand Up @@ -205,11 +211,9 @@ For advanced installation visit [here](../user-guides/chaoscenter-advanced-insta
workflow-controller-metrics ClusterIP 10.68.33.65 <none> 9090/TCP 23h
```

---

## **Accessing the ChaosCenter**
## Access the ChaosCenter

To setup and login to ChaosCenter expand the available services just created and copy the `PORT` of the `litmusportal-frontend-service` service
To setup and login to ChaosCenter, expand the available services you created and copy the `PORT` of the `litmusportal-frontend-service` service.

```bash
kubectl get svc -n litmus
Expand All @@ -226,21 +230,25 @@ mongo-service ClusterIP 10.43.227.10 <none> 2701
mongo-headless-service ClusterIP None <none> 27017/TCP 101s
```

> **Note**: In this case, the PORT for `litmusportal-frontend-service` is `31846`. Yours will be different.
:::note
In this case, the PORT for `litmusportal-frontend-service` is `31846`. Your port will be a different one.
:::

Once you have the PORT copied in your clipboard, simply use your IP and PORT in this manner `<NODEIP>:<PORT>` to access the Litmus ChaosCenter.
Once you copy the PORT to your clipboard, use your IP and PORT in the following manner: `<NODEIP>:<PORT>` to access the Litmus ChaosCenter.

For example:

```yaml
http://172.17.0.3:31846/
```

> Where `172.17.0.3` is my NodeIP and `31846` is the frontend service PORT. If using a LoadBalancer, the only change would be to provide a `<LoadBalancerIP>:<PORT>`. [Learn more about how to access ChaosCenter with LoadBalancer](../user-guides/setup-without-ingress.md#with-loadbalancer)
> Where `172.17.0.3` is your NodeIP and `31846` is the frontend service PORT. If you are using a LoadBalancer, provide a `<LoadBalancerIP>:<PORT>`. [Learn more about how to access ChaosCenter with LoadBalancer](../user-guides/setup-without-ingress.md#with-loadbalancer)

**NOTE:** With advanced installation CORS rules are applied, once manifest is applied frontend loadbalancer IP needs to be added in the `ALLOWED_ORIGINS` environment in both auth and graphql server deployment.
:::info note
With advanced installation, CORS rules are applied. Once the manifest is applied, the frontend LoadBalancer IP needs to be added to the `ALLOWED_ORIGINS` environment in both `auth` and `graphql` server deployment.
:::

You should be able to see the Login Page of Litmus ChaosCenter. The **default credentials** are
You will see the login page of Litmus ChaosCenter. The **default credentials** are:

```yaml
Username: admin
Expand All @@ -249,7 +257,7 @@ Password: litmus

<img src={require('../assets/login.png').default} width="800" />

By default you are assigned with a default project with Owner permissions.
By default, you are assigned to a default project with **owner** permissions.

<img src={require('../assets/landing-page.png').default} width="800" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ sidebar_label: Resources
---

## ChaosCenter
ChaosCenter is a unified pane that controls all the functions provided by Litmus. It can be used for managing the entire lifecycle of the chaos experiments, including all the components within.
ChaosCenter is a unified pane that controls all the functions Litmus provides. You can use ChaosCenter to manage the entire lifecycle of the chaos experiments, including the components within.

ChaosCenter comes pre-packaged as a part of LitmusChaos installation and can be easily accessed via [Ingress](../user-guides/setup-with-ingress.md), [NodePort](../user-guides/setup-without-ingress.md#with-nodeport) or [LoadBalancer](../user-guides/setup-without-ingress.md#with-loadbalancer). Since Litmus has Cross-Cloud support, you get seamless access to the ChaosCenter irrespectively of where you deploy it.
ChaosCenter comes pre-packaged as a part of LitmusChaos installation and you can easily access it via [ingress](../user-guides/setup-with-ingress.md), [NodePort](../user-guides/setup-without-ingress.md#with-nodeport) or [LoadBalancer](../user-guides/setup-without-ingress.md#with-loadbalancer). Since Litmus has cross-cloud support, you get seamless access to the ChaosCenter regardless of where you deploy it.

ChaosCenter gives you access to a plethora of features, the major ones include:
ChaosCenter gives you a plethora of features, that include:

- **Chaos experiment creation**
- From templates, custom experiments from scratch (using ChaosHubs), from pre-created YAMLs
Expand All @@ -27,13 +27,13 @@ ChaosCenter gives you access to a plethora of features, the major ones include:
- Allowing image addition from custom image server (both public and private)
- Measure and analyze the Resilience Score of each chaos scenario

## Chaos Infrastructures
Chaos infrastructure is a service that runs in your target environment and aids Litmus in accessing and injecting chaos to your target environment. There should always be at least one or more than one chaos infrastructure connected to the ChaosCenter to execute an experiment.
## Chaos Infrastructure
Chaos infrastructure is a service that runs in your target environment and aids Litmus in accessing and injecting chaos into your target environment. To execute an experiment, you need at least one chaos infrastructure connected to the ChaosCenter.

## Types of Chaos Infrastructures
## Types of Chaos Infrastructure

In Litmus, chaos infrastructures can be classified into two types:
In Litmus, you can classify chaos infrastructure into two types:

- **Self Chaos Infrastructures:** A Chaos Infrastructure that is connected to the same cluster and namespace where the ChaosCenter is deployed. It can be used to target the workloads executing on that cluster only.
- **Self chaos infrastructure:** A chaos infrastructure that is connected to the same cluster and namespace where the ChaosCenter is deployed. You can use this to target the workloads executing on that cluster only.

- **External Chaos Infrastructures:** A Chaos Infrastructure that is connected to a remote Kubernetes cluster. ChaosCenter can be operated in a cross-cloud manner, which allows connecting multiple External Chaos Infrastructure to the same ChaosCenter with the help of the [litmusctl](../litmusctl/installation.md) CLI. Once connected you can manage, monitor, observe and induce chaos from the ChaosCenter to the respective External Chaos Infrastructures.
- **External chaos infrastructure:** A chaos infrastructure connected to a remote Kubernetes cluster. You can operate ChaosCenter in a cross-cloud manner, connecting multiple external chaos infrastructures to the same ChaosCenter with the help of the [litmusctl](../litmusctl/installation.md) CLI. Once connected you can manage, monitor, observe, and induce chaos from the ChaosCenter to the respective external chaos infrastructures.
Loading
Loading