Skip to content

Commit 906a186

Browse files
authored
Updated installation steps for litmus (#274)
* Updated installation steps for litmus Signed-off-by: Saranya-jena <[email protected]> * updated docs Signed-off-by: Saranya-jena <[email protected]> * fixed issues with sidebar Signed-off-by: Saranya-jena <[email protected]> * fixed broken links Signed-off-by: Saranya-jena <[email protected]> --------- Signed-off-by: Saranya-jena <[email protected]>
1 parent d125098 commit 906a186

14 files changed

+363
-541
lines changed

website/docs/architecture/chaos-control-plane.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Chaos control plane consists of micro-services responsible for the functioning o
3232

3333
## Standard Chaos Control Plane Flow
3434

35-
1. The User logs in to the ChaosCenter using a valid login credential. A default project is created for the user on initial login. Every user is a part of a project and has a role assigned to them. To schedule a chaos experiment, the user needs to have an Editor or Owner role assigned in the project.
35+
1. The User logs in to the ChaosCenter using a valid login credential. A default project is created for the user on initial login. Every user is a part of a project and has a role assigned to them. To schedule a chaos experiment, the user needs to have an Owner role assigned in the project.
3636
2. The user uploads a Chaos Experiment manifest using the ChaosCenter, which is received by the Backend Server.
3737
3. Backend Server stores the manifest in the Database and also sends it to the Chaos Infrastructure.
3838
4. Chaos Infrastructure uses the Chaos Experiment manifest to inject chaos into the target resources. The steps of the Chaos Experiment execution can be visualized using the ChaosCenter.

website/docs/concepts/teaming.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ The ChaosCenter has a built in teaming feature to facilitate collaboration betwe
1010

1111
## Project level roles
1212

13-
Each user has a default project created on user creation by the admin for which they maintain a project level `Owner` access. Every `Owner` has the ability to invite other users into their project with different permission levels, namely `Editor`, and `Viewer`.
13+
Each user has a default project created on user creation by the admin for which they maintain a project level `Owner` access. Every `Owner` has the ability to invite other users into their project with different permission levels, namely `Executor`, and `Viewer`.
1414

1515
Teaming is based on the following principles and each user can have one of the 3 project roles:
1616

17-
- **Owner:** One who created the project and owns it. Only the owner has permission to manage(invite or remove) the members in his/her project. The owner can schedule chaos experiments, update and delete chaos experiments.
18-
- **Editor:** Members invited with the editor role can do everything an owner can except for managing the project.
17+
- **Owner:** One who created the project and owns it. Only the owner has permission to manage(invite or remove) the members in his/her project. The owner can create resources such as infrastructures, probes, hubs, experiments, etc, schedule chaos experiments, update and delete chaos experiments.They have both create and execute perimissions.
18+
- **Executor:** Members invited with the executor role only have execute and view permissions which allow them to run/stop experiments, use probes etc, they don't have any create/delete permissions.
1919
- **Viewer:** Members having a viewer role can only view the analytics related to the chaos experiments and the chaos experiments themselves, but are not given permission to schedule chaos experiments in the project.
2020

2121
## Role privileges
@@ -26,15 +26,15 @@ Teaming is based on the following principles and each user can have one of the 3
2626

2727
- Invite other users for the following roles:
2828
- Viewer
29-
- Editor
29+
- Executor
3030
- View the list of team members with other details including their role in the project, email-id, date-time of joining the project team.
3131
- Rename your project.
3232
- Remove a member from your project.
3333
- Check the status of the invitation you sent to other members.
3434
- Edit the user role in case the invitation is pending.
3535
- Cancel the invitation.
3636

37-
**_As a Viewer or Editor you can:_**
37+
**_As a Viewer or Executor you can:_**
3838

3939
- Check and Accept/Decline the received invitations.
4040
- Switch and browse any project you are a member of.

website/docs/getting-started/installation.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: installation
3-
title: ChaosCenter cluster scope installation
3+
title: ChaosCenter installation
44
sidebar_label: Installation
55
---
66

@@ -100,10 +100,62 @@ Visit https://docs.litmuschaos.io to find more info.
100100

101101
> **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.
102102
103-
### **Install Litmus using kubectl**
103+
## **Install Litmus using kubectl**
104104

105105
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).
106106

107+
### **Install mongo**
108+
109+
```bash
110+
helm repo add bitnami https://charts.bitnami.com/bitnami
111+
```
112+
113+
Mongo Values
114+
115+
```bash
116+
auth:
117+
enabled: true
118+
rootPassword: "1234"
119+
# -- existingSecret Existing secret with MongoDB(&reg;) credentials (keys: `mongodb-passwords`, `mongodb-root-password`, `mongodb-metrics-password`, ` mongodb-replica-set-key`)
120+
existingSecret: ""
121+
architecture: replicaset
122+
replicaCount: 3
123+
persistence:
124+
enabled: true
125+
volumePermissions:
126+
enabled: true
127+
metrics:
128+
enabled: false
129+
prometheusRule:
130+
enabled: false
131+
132+
# bitnami/mongodb is not yet supported on ARM.
133+
# Using unofficial tools to build bitnami/mongodb (arm64 support)
134+
# more info: https://github.com/ZCube/bitnami-compat
135+
#image:
136+
# registry: ghcr.io/zcube
137+
# repository: bitnami-compat/mongodb
138+
# tag: 6.0.5
139+
```
140+
141+
```bash
142+
helm install my-release bitnami/mongodb --values mongo-values.yml -n <NAMESPACE> --create-namespace
143+
```
144+
145+
Litmus supports for HTTP and HTTPS mode of installation.
146+
147+
### Basic installation (HTTP based and allows all origins)
148+
149+
Applying the manifest file will install all the required service account configuration and ChaosCenter in namespaced scope.
150+
151+
```bash
152+
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/chaoscenter/manifests/litmus-getting-started.yaml -n <NAMESPACE>
153+
```
154+
155+
### Advanced installation (HTTPS based and CORS rules apply)
156+
157+
For advanced installation visit [here](../user-guides/chaoscenter-advanced-installation.md)
158+
107159
---
108160

109161
## **Verify your installation**
@@ -182,6 +234,9 @@ http://172.17.0.3:31846/
182234

183235
> 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)
184236
237+
238+
**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.
239+
185240
You should be able to see the Login Page of Litmus ChaosCenter. The **default credentials** are
186241

187242
```yaml
@@ -197,7 +252,7 @@ By default you are assigned with a default project with Owner permissions.
197252
198253
## Learn more
199254
200-
- [Install ChaosCenter in Namespace Scope](../user-guides/chaoscenter-namespace-scope-installation.md)
255+
- [Install ChaosCenter with HTTPS](../user-guides/chaoscenter-advanced-installation.md)
201256
- [Connect External Chaos Infrastructures to ChaosCenter](../user-guides/chaos-infrastructure-installation.md)
202257
- [Setup Endpoints and Access ChaosCenter without Ingress](../user-guides/setup-without-ingress.md)
203258
- [Setup Endpoints and Access ChaosCenter with Ingress](../user-guides/setup-with-ingress.md)
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
---
2+
id: chaoscenter-advanced-installation
3+
title: ChaosCenter Advanced Installation
4+
sidebar_label: Setup with HTTPS
5+
---
6+
7+
---
8+
9+
## Prerequisites
10+
11+
- Kubernetes 1.17 or later
12+
13+
- A Persistent volume of 20GB
14+
15+
:::note
16+
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
17+
:::
18+
19+
- [Helm3](https://v3.helm.sh/) or [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
20+
21+
## Installation
22+
23+
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.
24+
25+
Users choosing the self-hosted option can refer to our Install and Configure docs for installing alternate versions and more detailed instructions.
26+
27+
import Tabs from '@theme/Tabs';
28+
import TabItem from '@theme/TabItem';
29+
30+
<Tabs>
31+
<TabItem value="self-hosted" label="Self-Hosted" default>
32+
Installation of Self-Hosted Litmus can be done using either of the below methods:
33+
<li><a href="#install-litmus-using-helm">Helm3</a> chart</li>
34+
<li><a href="#install-litmus-using-kubectl">Kubectl</a> yaml spec file</li>
35+
<br/>
36+
Refer to the below details for Self-Hosted Litmus installation.
37+
</TabItem>
38+
<TabItem value="hosted" label="Hosted (Beta)">
39+
<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.
40+
<br/><br/>
41+
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.
42+
</TabItem>
43+
</Tabs>
44+
45+
### Install Litmus using Helm
46+
47+
The helm chart will install all the required service account configuration and ChaosCenter.
48+
49+
The following steps will help you install Litmus ChaosCenter via helm.
50+
51+
#### Step-1: Add the litmus helm repository
52+
53+
```bash
54+
helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
55+
helm repo list
56+
```
57+
58+
#### Step-2: Create the namespace on which you want to install Litmus ChaosCenter
59+
60+
- The ChaosCenter can be placed in any namespace, but for this scenario we are choose `litmus` as the namespace.
61+
62+
```bash
63+
kubectl create ns litmus
64+
```
65+
66+
#### Step-3: Install Litmus ChaosCenter
67+
68+
```bash
69+
helm install chaos litmuschaos/litmus --namespace=litmus --set portal.frontend.service.type=NodePort
70+
```
71+
72+
> **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`.
73+
74+
- 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.
75+
76+
```bash
77+
helm install chaos litmuschaos/litmus --namespace=litmus \
78+
--set portal.frontend.service.type=NodePort \
79+
--set mongodb.image.registry=<put_registry> \
80+
--set mongodb.image.repository=<put_image_repository> \
81+
--set mongodb.image.tag=<put_image_tag>
82+
```
83+
84+
<span style={{color: 'green'}}><b>Expected Output</b></span>
85+
86+
```
87+
NAME: chaos
88+
LAST DEPLOYED: Tue Jun 15 19:20:09 2021
89+
NAMESPACE: litmus
90+
STATUS: deployed
91+
REVISION: 1
92+
TEST SUITE: None
93+
NOTES:
94+
Thank you for installing litmus 😀
95+
96+
Your release is named chaos and its installed to namespace: litmus.
97+
98+
Visit https://docs.litmuschaos.io to find more info.
99+
```
100+
101+
> **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.
102+
103+
## **Install Litmus using kubectl**
104+
105+
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).
106+
107+
### **Install mongo**
108+
109+
```bash
110+
helm repo add bitnami https://charts.bitnami.com/bitnami
111+
```
112+
113+
Mongo Values
114+
115+
```bash
116+
auth:
117+
enabled: true
118+
rootPassword: "1234"
119+
# -- existingSecret Existing secret with MongoDB(&reg;) credentials (keys: `mongodb-passwords`, `mongodb-root-password`, `mongodb-metrics-password`, ` mongodb-replica-set-key`)
120+
existingSecret: ""
121+
architecture: replicaset
122+
replicaCount: 3
123+
persistence:
124+
enabled: true
125+
volumePermissions:
126+
enabled: true
127+
metrics:
128+
enabled: false
129+
prometheusRule:
130+
enabled: false
131+
132+
# bitnami/mongodb is not yet supported on ARM.
133+
# Using unofficial tools to build bitnami/mongodb (arm64 support)
134+
# more info: https://github.com/ZCube/bitnami-compat
135+
#image:
136+
# registry: ghcr.io/zcube
137+
# repository: bitnami-compat/mongodb
138+
# tag: 6.0.5
139+
```
140+
141+
```bash
142+
helm install my-release bitnami/mongodb --values mongo-values.yml -n <NAMESPACE> --create-namespace
143+
```
144+
145+
Litmus supports for HTTP and HTTPS mode of installation.
146+
147+
### Advanced installation (HTTPS based and CORS rules apply)
148+
149+
1. Generate TLS certificates: You can provide your own certificates or can generate using [this](https://github.com/litmuschaos/litmus/blob/master/chaoscenter/mtls-helper.sh) bash script.
150+
151+
2. Create secret
152+
153+
```bash
154+
kubectl create secret generic tls-secret --from-file=ca.crt=ca.crt --from-file=tls.crt=tls.crt --from-file=tls.key=tls.key -n <NAMESPCACE>
155+
```
156+
3. Applying the manifest file will install all the required service account configuration and ChaosCenter in namespaced scope.
157+
158+
```bash
159+
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/chaoscenter/manifests/litmus-installation.yaml -n <NAMESPACE>
160+
```
161+
162+
---
163+
164+
## **Verify your installation**
165+
166+
#### **Verify if the frontend, server, and database pods are running**
167+
168+
- Check the pods in the namespace where you installed Litmus:
169+
170+
```bash
171+
kubectl get pods -n litmus
172+
```
173+
174+
<span style={{color: 'green'}}><b>Expected Output</b></span>
175+
176+
```bash
177+
NAME READY STATUS RESTARTS AGE
178+
litmusportal-server-6fd57cc89-6w5pn 1/1 Running 0 57s
179+
litmusportal-auth-server-7b596fff9-5s6g5 1/1 Running 0 57s
180+
litmusportal-frontend-55974fcf59-cxxrf 1/1 Running 0 58s
181+
my-release-mongodb-0 1/1 Running 0 63s
182+
my-release-mongodb-1 1/1 Running 0 63s
183+
my-release-mongodb-2 1/1 Running 0 62s
184+
my-release-mongodb-arbiter-0 1/1 Running 0 64s
185+
186+
```
187+
188+
- Check the services running in the namespace where you installed Litmus:
189+
190+
```bash
191+
kubectl get svc -n litmus
192+
```
193+
194+
<span style={{color: 'green'}}><b>Expected Output</b></span>
195+
196+
```bash
197+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
198+
chaos-exporter ClusterIP 10.68.45.7 <none> 8080/TCP 23h
199+
litmusportal-auth-server-service NodePort 10.68.34.91 <none> 9003:32368/TCP,3030:31051/TCP 23h
200+
litmusportal-frontend-service NodePort 10.68.43.68 <none> 9091:30070/TCP 23h
201+
litmusportal-server-service NodePort 10.68.33.242 <none> 9002:32455/TCP,8000:30722/TCP 23h
202+
my-release-mongodb-arbiter-headless ClusterIP None <none> 27017/TCP 23h
203+
my-release-mongodb-headless ClusterIP None <none> 27017/TCP 23h
204+
workflow-controller-metrics ClusterIP 10.68.33.65 <none> 9090/TCP 23h
205+
```
206+
207+
---
208+
209+
## **Accessing the ChaosCenter**
210+
211+
To setup and login to ChaosCenter expand the available services just created and copy the `PORT` of the `litmusportal-frontend-service` service
212+
213+
```bash
214+
kubectl get svc -n litmus
215+
```
216+
217+
<span style={{color: 'green'}}><b>Expected Output</b></span>
218+
219+
```bash
220+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
221+
litmusportal-frontend-service NodePort 10.43.79.17 <none> 9091:31846/TCP 102s
222+
litmusportal-server-service NodePort 10.43.30.54 <none> 9002:31245/TCP,8000:32714/TCP 101s
223+
litmusportal-auth-server-service NodePort 10.43.81.108 <none> 9003:32618/TCP,3030:31899/TCP 101s
224+
mongo-service ClusterIP 10.43.227.10 <none> 27017/TCP 101s
225+
mongo-headless-service ClusterIP None <none> 27017/TCP 101s
226+
```
227+
228+
> **Note**: In this case, the PORT for `litmusportal-frontend-service` is `31846`. Yours will be different.
229+
230+
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.
231+
232+
For example:
233+
234+
```yaml
235+
https://172.17.0.3:31846/
236+
```
237+
238+
> 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)
239+
240+
241+
**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.
242+
243+
You should be able to see the Login Page of Litmus ChaosCenter. The **default credentials** are
244+
245+
```yaml
246+
Username: admin
247+
Password: litmus
248+
```
249+
250+
<img src={require('../assets/login.png').default} width="800" />
251+
252+
By default you are assigned with a default project with Owner permissions.
253+
254+
<img src={require('../assets/landing-page.png').default} width="800" />
255+
256+
## Learn more
257+
258+
- [Install ChaosCenter with HTTP](../getting-started/installation.md)
259+
- [Setup Endpoints and Access ChaosCenter without Ingress](setup-without-ingress.md)
260+
- [Setup Endpoints and Access ChaosCenter with Ingress](setup-with-ingress.md)

0 commit comments

Comments
 (0)