id | title | sidebar_label |
---|---|---|
installation |
ChaosCenter Cluster Scope Installation |
Installation |
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 :::
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. Alternatively, users looking for some more flexibility can install Litmus into their own Kubernetes cluster.
Users choosing the self-hosted option can refer to our Install and Configure docs for installing alternate versions and more detailed instructions.
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Installation of Self-Hosted Litmus can be done using either of the below methods:Refer to the below details for Self-Hosted Litmus installation. Harness 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 Harness Chaos Engineering SaaS. Harness Chaos Engineering SaaS executes your Chaos Scenarios 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 delegate.
To get started with Harness Chaos Engineering SaaS, visit Harness Chaos Engineering SaaS and register for free. You can skip the below installation steps.
The helm chart will install all the required service account configuration and ChaosCenter.
The following steps will help you install Litmus ChaosCenter via helm.
helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
helm repo list
- The ChaosCenter can be placed in any namespace, but for this scenario we are choose
litmus
as the namespace.
kubectl create ns litmus
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 usekubectl port-forward svc/chaos-litmus-frontend-service 9091:9091
. Then you can use your browser and open127.0.0.1:9091
.
<span style={{color: 'green'}}>Expected Output
NAME: chaos
LAST DEPLOYED: Tue Jun 15 19:20:09 2021
NAMESPACE: litmus
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing litmus 😀
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.
Applying the manifest file will install all the required service account configuration and ChaosCenter.
kubectl apply -f https://litmuschaos.github.io/litmus/3.0.0-beta8/litmus-3.0.0-beta8.yaml
-
Check the pods in the namespace where you installed Litmus:
kubectl get pods -n litmus
<span style={{color: 'green'}}>Expected Output
NAME READY STATUS RESTARTS AGE litmusportal-server-6fd57cc89-6w5pn 1/1 Running 0 57s litmusportal-auth-server-7b596fff9-5s6g5 1/1 Running 0 57s mongo-0 1/1 Running 0 57s litmusportal-frontend-55974fcf59-cxxrf 1/1 Running 0 58s
-
Check the services running in the namespace where you installed Litmus:
kubectl get svc -n litmus
<span style={{color: 'green'}}>Expected Output
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE litmusportal-frontend-service NodePort 10.43.79.17 <none> 9091:31846/TCP 102s litmusportal-server-service NodePort 10.43.30.54 <none> 9002:31245/TCP,8000:32714/TCP 101s litmusportal-auth-server-service NodePort 10.43.81.108 <none> 9003:32618/TCP,3030:31899/TCP 101s mongo-service ClusterIP 10.43.227.10 <none> 27017/TCP 101s mongo-headless-service ClusterIP None <none> 27017/TCP 101s
To setup and login to ChaosCenter expand the available services just created and copy the PORT
of the litmusportal-frontend-service
service
kubectl get svc -n litmus
<span style={{color: 'green'}}>Expected Output
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
litmusportal-frontend-service NodePort 10.43.79.17 <none> 9091:31846/TCP 102s
litmusportal-server-service NodePort 10.43.30.54 <none> 9002:31245/TCP,8000:32714/TCP 101s
litmusportal-auth-server-service NodePort 10.43.81.108 <none> 9003:32618/TCP,3030:31899/TCP 101s
mongo-service ClusterIP 10.43.227.10 <none> 27017/TCP 101s
mongo-headless-service ClusterIP None <none> 27017/TCP 101s
Note: In this case, the PORT for
litmusportal-frontend-service
is30385
. Yours will be different.
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.
For example:
http://172.17.0.3:30385/
Where
172.17.0.3
is my NodeIP and30385
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
You should be able to see the Login Page of Litmus ChaosCenter. The default credentials are
Username: admin
Password: litmus
<img src={require('../assets/login.png').default} width="800" />
By default you are assigned with a default project with Owner permissions.
<img src={require('../assets/landing-page.png').default} width="800" />
Once the project is created, the cluster is automatically registered as a chaos target via installation of Chaos Delegate. This is represented as Self Chaos Delegate in ChaosCenter.
kubectl get pods -n litmus
NAME READY STATUS RESTARTS AGE
chaos-exporter-547b59d887-4dm58 1/1 Running 0 5m27s
chaos-operator-ce-84ddc8f5d7-l8c6d 1/1 Running 0 5m27s
event-tracker-5bc478cbd7-xlflb 1/1 Running 0 5m28s
litmusportal-frontend-97c8bf86b-mx89w 1/1 Running 0 15m
litmusportal-server-6fd57cc89-6w5pn 1/1 Running 0 15m
litmusportal-auth-server-7b596fff9-5s6g5 1/1 Running 0 15m
mongo-0 1/1 Running 0 15m
subscriber-958948965-qbx29 1/1 Running 0 5m30s
workflow-controller-78fc7b6c6-w82m7 1/1 Running 0 5m32s