diff --git a/.wordlist.txt b/.wordlist.txt index 3e4ba67..1ef574d 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -55,6 +55,7 @@ ArgoCD argoproj argowf args +atleast AUT auth AUTH @@ -696,6 +697,7 @@ workflowtemplates xcvc wp yaml +YAMLs yml zk Zokeeper @@ -707,6 +709,7 @@ Worklfow LitmusPortal abc litmusctl +LitmusCTL subcommand Litmusctl gz diff --git a/website/docs/getstarted.md b/website/docs/getstarted.md deleted file mode 100644 index 68e21b4..0000000 --- a/website/docs/getstarted.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -id: getstarted -title: Getting Started with Litmus -sidebar_label: Pre-requisites ---- - ---- - -## 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 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 - -Running chaos on your application involves the following steps: - -[Install Litmus](litmus-install-cluster-mode) - -[How to Create and Run a Workflow](create-workflow) - -[Observe ChaosResults](observe-workflow) - -
- -## Join our community - -If you have not joined our community, do join us [here](https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN). diff --git a/website/docs/getting-started-agents.md b/website/docs/getting-started-agents.md new file mode 100644 index 0000000..2170de3 --- /dev/null +++ b/website/docs/getting-started-agents.md @@ -0,0 +1,18 @@ +--- +id: agents +title: Agents +sidebar_label: Agents +--- + +An Agent in Litmus is nothing but the target cluster where Chaos would be injected via Litmus. There should always be atleast one or more than one Agents connected to the Litmus Control Plane. Each individual Agent can be chosen to be the Target Agent for Chaos Injection. + +## Types of Agent + +In Litmus the Agents can be classified into two types + +- Self Agent +- External Agent + +As part of the Litmus installation, a Self Agent would be registered as a default Agent in the Control Plane. The same cluster where Litmus is installed is chosen as the Self Agent by the installer. From the Control Plane you can now induce chaos into this Self Agent and observe the results. + +Since the Chaos Control Plane is Cross Cloud, you can connect multiple external Kubernetes agents to the same with the help of the command line utility litmusctl. Once connected you can manage, monitor, observe and induce chaos from the Control Plane to the respective agent. diff --git a/website/docs/getting-started-basic-requirements.md b/website/docs/getting-started-basic-requirements.md new file mode 100644 index 0000000..2c2b97e --- /dev/null +++ b/website/docs/getting-started-basic-requirements.md @@ -0,0 +1,15 @@ +--- +id: basic-requirements +title: Prerequisites +sidebar_label: Basic Requirements +--- + +Before deploying LitmusChaos, make sure the following items are there + +- Kubernetes 1.15 or later + +- A Persistent volume of 20GB + + >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](https://v3.helm.sh/) or [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) diff --git a/website/docs/getting-started-chaos-agent.md b/website/docs/getting-started-chaos-agent.md new file mode 100644 index 0000000..9f8c179 --- /dev/null +++ b/website/docs/getting-started-chaos-agent.md @@ -0,0 +1,7 @@ +--- +id: agent-install +title: Agent Installation +sidebar_label: Agent Install +--- + +## Coming Soon diff --git a/website/docs/getting-started-chaos-control-plane.md b/website/docs/getting-started-chaos-control-plane.md new file mode 100644 index 0000000..81d5b94 --- /dev/null +++ b/website/docs/getting-started-chaos-control-plane.md @@ -0,0 +1,51 @@ +--- +id: chaos-control-plane +title: Chaos Control Plane +sidebar_label: Chaos Control Plane +--- + +--- + +The **Chaos Control Plane** is a single source of truth to control all the different Chaos Activities happening around Litmus. From the Control Plane you get the freedom to manage every single part of Litmus and shape your workflows exactly the way you want it. + +The **Control Plane comes pre-packaged** as a part of LitmusChaos installation and can be easily accessed via Ingress, NodePort or LoadBalancer. Since Litmus has Cross-Cloud support, you get seamless access to the Plane irrespective of where you deploy it. + +>[Get a broader view of which Platforms are supported by Litmus](https://github.com/litmuschaos/litmus/tree/master/litmus-portal#platforms-support) + +The Chaos Control Plane gives you access to a plethora of features, the major ones include +- Workflow Creation + + + +- Users & Teams + + + +- Monitoring & Observability + + + +- Workflow Management + + + diff --git a/website/docs/getting-started-cluster-scope-installation.md b/website/docs/getting-started-cluster-scope-installation.md new file mode 100644 index 0000000..873efb7 --- /dev/null +++ b/website/docs/getting-started-cluster-scope-installation.md @@ -0,0 +1,166 @@ +--- +id: cluster-scope-installation +title: Litmus Cluster Scope Installation +sidebar_label: Cluster Scope +--- + +--- + +## Prerequisites + +Before deploying LitmusChaos, make sure the [prerequisites](basic-requirements) are met. + +## Installation + +Installation of Litmus can be done using either of the below methods + +- [Helm3](#install-litmus-using-helm) chart +- [Kubectl](#install-litmus-using-kubectl) yaml spec file + +### Install Litmus using Helm + +The helm chart will install all the required service account configuration and chaos control plane. + +The following steps will help you install litmus via helm. + +#### Step-1: Add the litmus helm repository + +```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 + +- The litmus infra components will be placed in this namespace. + +> The chaos control plane can be placed in any namespace, in this case we are using `litmus` as the namespace of our choice. + +```bash +kubectl create ns +``` + +#### Step-3: Install the litmus chaos control plane + +```bash +helm install chaos litmuschaos/litmus-2-0-0-beta --namespace= --devel +``` + +Expected Output + +``` +NAME: chaos +LAST DEPLOYED: Tue Jun 15 19:20:09 2021 +NAMESPACE: +STATUS: deployed +REVISION: 1 +TEST SUITE: None +NOTES: +Thank you for installing litmus-2-0-0-beta 😀 + +Your release is named chaos and its installed to namespace: litmus. + +Visit https://docs.litmuschaos.io/docs/getstarted/ 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. + +### **Install Litmus using kubectl ** + +#### **Create the namespace on which you want to install Litmus** + +```bash +kubectl create ns +``` + +#### **Install Litmus** + +Applying the manifest file will install all the required service account configuration and chaos control plane. + +```bash +kubectl apply -f https://litmuschaos.github.io/litmus/2.0.0-Beta/litmus-2.0.0-Beta.yaml -n +``` + +--- + +## **Verify your installation** + +**Verify if the frontend, server, and database pods are running** + +- Check the pods in the namespace where you installed Litmus: + + ```bash + kubectl get pods -n + ``` + + Expected Output + + ```bash + NAME READY STATUS RESTARTS AGE + litmusportal-frontend-97c8bf86b-mx89w 1/1 Running 2 6m24s + litmusportal-server-5cfbfc88cc-m6c5j 2/2 Running 2 6m19s + mongo-0 1/1 Running 0 6m16s + ``` + +- Check the services running in the namespace where you installed Litmus: + + ```bash + kubectl get svc -n + ``` + + Expected Output + + ```bash + NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE + litmusportal-frontend-service NodePort 10.100.105.154 9091:30229/TCP 7m14s + litmusportal-server-service NodePort 10.100.150.175 9002:30479/TCP,9003:31949/TCP 7m8s + mongo-service ClusterIP 10.100.226.179 27017/TCP 7m6s + ``` + +## Resources + +#### Videos + + + +#### Blogs + + + + + + + + + +
+ + +
+
+ Getting Started with Litmus 2.0 in Google Kubernetes Engine +
+
+
+ + +
+
+ Getting Started with LitmusChaos 2.0 in Azure Kubernetes Service +
+
+
+ + +
+
+ Get Started with LitmusChaos in Minutes +
+
+
+ +## Learn More + +- [Install Litmus in Namespace Scope](namespace-scope-installation) +- [Setup Endpoints and Access Litmus without Ingress](setup-without-ingress) +- [Setup Endpoints and Access Litmus with Ingress](setup-with-ingress) diff --git a/website/docs/getting-started-learning-litmus.md b/website/docs/getting-started-learning-litmus.md new file mode 100644 index 0000000..f9d1b14 --- /dev/null +++ b/website/docs/getting-started-learning-litmus.md @@ -0,0 +1,7 @@ +--- +id: learning-litmus +title: Various Ways of Learning Litmus +sidebar_label: Learning Litmus +--- + +## Coming Soon diff --git a/website/docs/agent-installation.md b/website/docs/getting-started-litmusctl.md similarity index 88% rename from website/docs/agent-installation.md rename to website/docs/getting-started-litmusctl.md index 83f543e..193a4c6 100644 --- a/website/docs/agent-installation.md +++ b/website/docs/getting-started-litmusctl.md @@ -1,29 +1,20 @@ --- -id: agent-install -title: Litmus Chaos Agent Install -sidebar_label: Chaos Agent +id: litmusctl +title: LitmusCTL +sidebar_label: LitmusCTL --- -In Litmus the Agents can be classified as two types - -- Self Agent -- External Agent - -As part of Litmus installation by default, a self cluster would be registered as Agent in the Portal. From Portal you induce chaos into self cluster and observe the results from the Portal. - -As you are aware by now, Portal is a Cross Cloud Chaos Control plane. That is you can connect multiple external kubernetes agents to this portal. Once connected you can manage the chaos from the Portal that is you can induce chaos into this agent from the Portal and observe the results from the Portal. Using the command line utility _litmusctl_ you can connect the external agents to the Portal. - -# Litmusctl +## Litmusctl Litmusctl is a command line interface to manage LitmusPortal services. -## Requirements +### Requirements The litmusctl CLI requires the following things: - Kubeconfig - litmusctl needs the kubeconfig of the k8s cluster where we need to connect litmus agents. The CLI currently uses the default path of kubeconfig i.e. `~/.kube/config`. -## Installation +### Installation To install the latest version of litmusctl follow the below steps: @@ -77,7 +68,7 @@ chmod +x litmusctl sudo mv litmusctl /usr/local/bin/litmusctl ``` -## Basic Commands +### Basic Commands litmusctl CLI command has the following structure: @@ -91,7 +82,7 @@ To get the version of the litmusctl CLI: litmusctl version ``` -### Connecting an agent +#### Connecting an agent To connect Litmus Chaos agent: @@ -102,9 +93,10 @@ litmusctl agent connect Next, you need to enter LitmusPortal details to login into your LitmusPortal account. Fields to be filled in: **LitmusPortal UI URL:** Enter the URL used to access the Litmus Portal UI. -Example, http://172.17.0.2:31696/ -**Username:** Enter your LitmusPortal username. +> For Example `http://172.17.0.2:31696/` + +**Username:** Enter your LitmusPortal username.
**Password:** Enter your LitmusPortal password. ```bash @@ -144,7 +136,6 @@ Next, select the installation mode. In case the selected mode was a Cluster ther Next, enter the details of the new agent. -Fields to filled in: **Agent Name:** Enter the name for the new agent. **Agent Description:** Fill in details about the agent. diff --git a/website/docs/litmus-installation-namespace.md b/website/docs/getting-started-namespace-scope-installation.md similarity index 55% rename from website/docs/litmus-installation-namespace.md rename to website/docs/getting-started-namespace-scope-installation.md index e4a1495..eecec1e 100644 --- a/website/docs/litmus-installation-namespace.md +++ b/website/docs/getting-started-namespace-scope-installation.md @@ -1,29 +1,23 @@ --- -id: litmus-install-namespace-mode -title: Litmus Chaos Control Plane (Namespace Mode) -sidebar_label: Control Plane (Namespace Mode) +id: namespace-scope-installation +title: Litmus Namespace Scope Installation +sidebar_label: Namespace Scope --- --- - +## Prerequisites -## Pre-requisites - -- Kubernetes 1.15 or later. - ​ -- 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 would use the default storage class to allocate the PV. - -- Helm3 or Kubectl +Before deploying LitmusChaos, make sure the [prerequisites](basic-requirements) are met. ## Installation Installation of Litmus can be done using either of the below methods -- [Helm3](#helm_install) chart or -- [Kubectl](#kubectl_install) yaml spec file +- [Helm3](#install-litmus-using-helm) chart +- [Kubectl](#install-litmus-using-kubectl) yaml spec file -### **Install Litmus using Helm ** +### **Install Litmus using Helm ** The helm chart will install all the required service account configuration and chaos control plane. @@ -36,20 +30,41 @@ helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/ helm repo list ``` -#### Step-2: Create the litmus namespace +#### Step-2: Create the namespace on which you want to install Litmus [Required only if namespace isn't there] -- The litmus infra components will be placed in this namespace. - -**Note**: The chaos control plane can be placed in any namespace, though it is typically placed in "litmus". +The Litmus infra components will be placed in this namespace. ```bash -kubectl create ns litmus +kubectl create ns ``` -#### Step-3: Install the litmus chaos control plane +> The chaos control plane can be placed in any namespace, though it is typically placed in `litmus`. Ignore if you already have the namespace where you want to install Litmus created. + +#### Step-3: Install the required Litmus CRDs + +The cluster-admin or an equivalent user with the right permissions are required to install the CRDs upfront. ```bash -helm install chaos litmuschaos/litmus-2-0-0-beta --namespace=litmus --devel --set portalScope=namespace +kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/litmus-portal-crds.yml +``` + +Expected Output + +```bash +customresourcedefinition.apiextensions.k8s.io/clusterworkflowtemplates.argoproj.io created +customresourcedefinition.apiextensions.k8s.io/cronworkflows.argoproj.io created +customresourcedefinition.apiextensions.k8s.io/workflows.argoproj.io created +customresourcedefinition.apiextensions.k8s.io/workflowtemplates.argoproj.io created +customresourcedefinition.apiextensions.k8s.io/chaosengines.litmuschaos.io created +customresourcedefinition.apiextensions.k8s.io/chaosexperiments.litmuschaos.io created +customresourcedefinition.apiextensions.k8s.io/chaosresults.litmuschaos.io created +customresourcedefinition.apiextensions.k8s.io/eventtrackerpolicies.eventtracker.litmuschaos.io created +``` + +#### Step-4: Install the litmus chaos control plane + +```bash +helm install chaos litmuschaos/litmus-2-0-0-beta --namespace= --devel --set portalScope=namespace ``` Expected Output @@ -57,14 +72,14 @@ helm install chaos litmuschaos/litmus-2-0-0-beta --namespace=litmus --devel --se ```bash NAME: chaos LAST DEPLOYED: Tue Jun 15 19:20:09 2021 -NAMESPACE: litmus +NAMESPACE: STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Thank you for installing litmus-2-0-0-beta 😀 -Your release is named chaos and its installed to namespace: litmus. +Your release is named chaos and its installed to namespace: . Visit https://docs.litmuschaos.io/docs/getstarted/ to find more info. @@ -72,40 +87,27 @@ Visit https://docs.litmuschaos.io/docs/getstarted/ 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. -- The cluster-admin or an equivalent user with the right permissions are required to install them CRDs upfront. To apply LitmusCRDs: +### **Install Litmus using kubectl ** -```bash -kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/litmus-portal-crds.yml -``` - -Expected Output - -```bash -customresourcedefinition.apiextensions.k8s.io/clusterworkflowtemplates.argoproj.io created -customresourcedefinition.apiextensions.k8s.io/cronworkflows.argoproj.io created -customresourcedefinition.apiextensions.k8s.io/workflows.argoproj.io created -customresourcedefinition.apiextensions.k8s.io/workflowtemplates.argoproj.io created -customresourcedefinition.apiextensions.k8s.io/chaosengines.litmuschaos.io created -customresourcedefinition.apiextensions.k8s.io/chaosexperiments.litmuschaos.io created -customresourcedefinition.apiextensions.k8s.io/chaosresults.litmuschaos.io created -customresourcedefinition.apiextensions.k8s.io/eventtrackerpolicies.eventtracker.litmuschaos.io created -``` - -### **Install Litmus using kubectl ** - -#### **Install Litmus** - -- Set the namespace on which you want to install litmus. +#### **Set the namespace on which you want to install Litmus** ```bash export LITMUS_PORTAL_NAMESPACE="" kubectl get ns ${LITMUS_PORTAL_NAMESPACE} -# If the namespace is not already present -# then create the target namespace -kubectl create ns ${LITMUS_PORTAL_NAMESPACE} ``` -- The cluster-admin or an equivalent user with the right permissions are required to install them CRDs upfront. To apply LitmusCRDs: +> If the namespace is not already present then create the target namespace `kubectl create ns ${LITMUS_PORTAL_NAMESPACE}` or `kubectl create ns ` + +Expected Output + +```bash +NAME STATUS AGE + Active 79m +``` + +#### **Install the required Litmus CRDs** + +The cluster-admin or an equivalent user with the right permissions are required to install the CRDs upfront. ```bash kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/litmus-portal-crds.yml @@ -124,16 +126,19 @@ customresourcedefinition.apiextensions.k8s.io/chaosresults.litmuschaos.io create customresourcedefinition.apiextensions.k8s.io/eventtrackerpolicies.eventtracker.litmuschaos.io created ``` -- Replace namespace with the target namespace. +#### **Install Litmus** + +Applying the manifest file will install all the required service account configuration and chaos control plane. ```bash -export LITMUS_PORTAL_NAMESPACE="" curl https://raw.githubusercontent.com/litmuschaos/litmus/master/docs/2.0.0-Beta/litmus-namespaced-2.0.0-Beta.yaml --output litmus-portal-namespaced-K8s-template.yml envsubst < litmus-portal-namespaced-K8s-template.yml > ${LITMUS_PORTAL_NAMESPACE}-ns-scoped-litmus-portal-manifest.yml kubectl apply -f ${LITMUS_PORTAL_NAMESPACE}-ns-scoped-litmus-portal-manifest.yml -n ${LITMUS_PORTAL_NAMESPACE} ``` +> You need to export the namespace in order for the above step to work `export LITMUS_PORTAL_NAMESPACE=""`. Ignore if already done in the first step. + Expected Output ```bash @@ -149,18 +154,20 @@ statefulset.apps/mongo created service/mongo-service created ``` +--- + ## **Verify your installation** **Verify if the frontend, server, and database pods are running** -- Check the pods in litmus namespace: +- Check the pods in the namespace where you installed Litmus: ```bash - kubectl get pods -n litmus + kubectl get pods -n ``` Expected Output - + ```bash NAME READY STATUS RESTARTS AGE litmusportal-frontend-97c8bf86b-mx89w 1/1 Running 2 6m24s @@ -168,10 +175,10 @@ service/mongo-service created mongo-0 1/1 Running 0 6m16s ``` -- Check the services running in litmus namespace: +- Check the services running in the namespace where you installed Litmus: ```bash - kubectl get svc -n litmus + kubectl get svc -n ``` Expected Output @@ -183,44 +190,50 @@ service/mongo-service created mongo-service ClusterIP 10.100.226.179 27017/TCP 7m6s ``` -
+## Resources -## **Setup the Portal** +#### Videos -To setup and login to Litmus Portal expand the available services just created and copy the `PORT` of the `litmusportal-frontend-service` service + -```bash -kubectl get svc -n litmus -``` +#### Blogs -Expected Output + + + + + + + + +
+ + +
+
+ Getting Started with Litmus 2.0 in Google Kubernetes Engine +
+
+
+ + +
+
+ Getting Started with LitmusChaos 2.0 in Azure Kubernetes Service +
+
+
+ + +
+
+ Get Started with LitmusChaos in Minutes +
+
+
-```bash -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -chaos-litmus-portal-mongo ClusterIP 10.104.107.117 27017/TCP 2m -litmusportal-frontend-service NodePort 10.101.81.70 9091:30385/TCP 2m -litmusportal-server-service NodePort 10.108.151.79 9002:32456/TCP,9003:31160/TCP 2m -``` +## Learn More -> **Note**: In this case, the PORT for `litmusportal-frontend-service` is `30385`. Yours will be different. - -### **Accessing the Portal** - -Once you have the PORT copied in your clipboard, simply use your NodeIP and PORT in this manner `:` to access the portal. - -For example: - -```yaml -http://172.17.0.3:30385/ -``` - -> Where `172.17.0.3` is my NodeIP and `30385` is the frontend service PORT. You can also use a LoadBalancer if not NodePort, the only change would be to provide a `:` - -You should be able to see the Login Page of Litmus. The **default credentials** are - -```yaml -Username: admin -Password: litmus -``` - - +- [Install Litmus in Namespace Scope](namespace-scope-installation) +- [Setup Endpoints and Access Litmus without Ingress](setup-without-ingress) +- [Setup Endpoints and Access Litmus with Ingress](setup-with-ingress) diff --git a/website/docs/getting-started-run-your-first-workflow.md b/website/docs/getting-started-run-your-first-workflow.md new file mode 100644 index 0000000..157fa8e --- /dev/null +++ b/website/docs/getting-started-run-your-first-workflow.md @@ -0,0 +1,7 @@ +--- +id: run-your-first-workflow +title: Run your First Chaos Workflow in 5 minutes +sidebar_label: Run Your First Workflow +--- + +## Coming Soon diff --git a/website/docs/litmus-installation-with-ingress.md b/website/docs/getting-started-setup-with-ingress.md similarity index 50% rename from website/docs/litmus-installation-with-ingress.md rename to website/docs/getting-started-setup-with-ingress.md index 8b87680..04f2ff7 100644 --- a/website/docs/litmus-installation-with-ingress.md +++ b/website/docs/getting-started-setup-with-ingress.md @@ -1,36 +1,36 @@ --- -id: litmus-with-ingress +id: setup-with-ingress title: Install LitmusPortal with Ingress -sidebar_label: Litmus with Ingress +sidebar_label: Setup With Ingress --- --- -### Install LitmusPortal with Ingress +## Prerequisites + +Before setting up endpoint with Ingress make sure the [Litmus Chaos Control Plane](chaos-control-plane) is installed in either one of these scopes + +- [Cluster Scope](cluster-scope-installation) +- [Namespace Scope](namespace-scope-installation) + +## Install LitmusPortal with Ingress With Litmus-2.0.0-Beta3, LitmusPortal can be installed with ingress. In the following doc, we will use the Nginx ingress controller for ingress setup. -1. Install the litmus chaos control plane +1. By default, the service type is `NodePort`. For Ingress, we need to change the service type to `ClusterIP` in the following services. -```bash -kubectl apply -f https://litmuschaos.github.io/litmus/2.0.0-Beta/litmus-2.0.0-Beta.yaml -``` +- `litmusportal-frontend-service` +- `litmusportal-server-service` -2. By default, the service type is NodePort. For Ingress, we need to change the service type to ClusterIP in the following services. -* litmusportal-frontend-service -* litmusportal-server-service +2. Install Nginx Ingress Controller along with Kubernetes RBAC roles and bindings, please refer [here](https://kubernetes.github.io/ingress-nginx/deploy/#installation-guide) +> - If you're changing ingress name from **litmus-ingress** to a different name, make sure to update the **INGRESS_NAME** environment variable in the litmusportal-server deployment +> - Set the environment variable **INGRESS** as true in the litmusportal-server deployment. -3. Install Nginx Ingress Controller along with Kubernetes RBAC roles and bindings, please refer [here](https://kubernetes.github.io/ingress-nginx/deploy/#installation-guide) +### With HTTP -**Note:** -* If you're changing ingress name from **litmus-ingress** to a different name, make sure to update the **INGRESS_NAME** environment variable in the litmusportal-server deployment -* Set the environment variable **INGRESS** as true in the litmusportal-server deployment. - -#### With HTTP - -4. Sample litmus ingress manifest With HTTP +Sample litmus ingress manifest With HTTP ```yaml apiVersion: extensions/v1beta1 @@ -42,7 +42,7 @@ metadata: name: litmus-ingress spec: rules: - - host: "" + - host: '' http: paths: - backend: @@ -61,9 +61,9 @@ spec: kubectl apply -f -n ``` -#### With HTTPS +### With HTTPS -4. Install CertManager +1. Install CertManager ```bash kubectl create namespace cert-manager @@ -71,7 +71,7 @@ helm repo add jetstack https://charts.jetstack.io helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.3.0 --set installCRDs=true ``` -5. Install LetsEncrypt Cluster Issuer +2. Install LetsEncrypt Cluster Issuer ```yaml apiVersion: cert-manager.io/v1alpha2 @@ -90,7 +90,7 @@ spec: class: nginx ``` -6. Sample Litmus Portal Ingress Manifest with HTTPS +3. Sample Litmus Portal Ingress Manifest with HTTPS ```yaml apiVersion: extensions/v1beta1 @@ -106,7 +106,7 @@ metadata: namespace: litmus spec: rules: - - host: "" + - host: '' http: paths: - backend: @@ -121,9 +121,41 @@ spec: pathType: ImplementationSpecific tls: - hosts: - - "" + - '' secretName: litmuspreview-tls-secret ``` + ```bash kubectl apply -f -n ``` + +## Resources + + + + + + +
+ + +
+
+ AKS ingress with nginx and Key Vault certificates +
+
+
+ + +
+
+ Ingress +
+
+
+ +## Learn More + +- [Setup Endpoints and Access Litmus without Ingress](setup-without-ingress) +- [Install Litmus in Namespace Scope](namespace-scope-installation) +- [Install Litmus in Cluster Scope](cluster-scope-installation) diff --git a/website/docs/getting-started-setup-without-ingress.md b/website/docs/getting-started-setup-without-ingress.md new file mode 100644 index 0000000..727b517 --- /dev/null +++ b/website/docs/getting-started-setup-without-ingress.md @@ -0,0 +1,111 @@ +--- +id: setup-without-ingress +title: Setting up Endpoints without Ingress +sidebar_label: Setup without Ingress +--- + +## Prerequisites + +Before setting up endpoint with Ingress make sure the [Litmus Chaos Control Plane](chaos-control-plane) is installed in either one of these scopes + +- [Cluster Scope](cluster-scope-installation) +- [Namespace Scope](namespace-scope-installation) + +## **With NodePort** + +To setup and login to Litmus Portal expand the available services just created and copy the `PORT` of the `litmusportal-frontend-service` service + +```bash +kubectl get svc -n +``` + +Expected Output + +```bash +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +chaos-litmus-portal-mongo ClusterIP 10.104.107.117 27017/TCP 2m +litmusportal-frontend-service NodePort 10.101.81.70 9091:30385/TCP 2m +litmusportal-server-service NodePort 10.108.151.79 9002:32456/TCP,9003:31160/TCP 2m +``` + +> **Note**: In this case, the PORT for `litmusportal-frontend-service` is `30385`. Yours will be different. + +## **With LoadBalancer** + +To setup and login to Litmus Portal with LoadBalancer, patch the Frontend Service `litmusportal-frontend-service` and expose the External IP. + +```bash +kubectl patch svc litmusportal-frontend-service -p '{"spec": {"type": "LoadBalancer"}}' -n +``` + +Expected Output + +```bash +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +chaos-litmus-portal-mongo ClusterIP 10.104.107.117 27017/TCP 2m +litmusportal-frontend-service NodePort 10.101.81.70 9091:30385/TCP 2m +litmusportal-server-service NodePort 10.108.151.79 9002:32456/TCP,9003:31160/TCP 2m +``` + +## **Accessing the Portal** + +Once you have the PORT copied in your clipboard, simply use your IP and PORT in this manner `:` to access the portal. + +For example: + +```yaml +http://172.17.0.3:30385/ +``` + +> Where `172.17.0.3` is my NodeIP and `30385` is the frontend service PORT. If using a LoadBalancer, the only change would be to provide a `:` + +You should be able to see the Login Page of Litmus. The **default credentials** are + +```yaml +Username: admin +Password: litmus +``` + + + +## Resources + + + + + + + + + +
+ + +
+
+ NodePort +
+
+
+ + +
+
+ LoadBalancer +
+
+
+ + +
+
+ Ingress +
+
+
+ +## Learn More + +- [Setup Endpoints and Access Litmus with Ingress](setup-with-ingress) +- [Install Litmus in Namespace Scope](namespace-scope-installation) +- [Install Litmus in Cluster Scope](cluster-scope-installation) diff --git a/website/docs/litmus-installation-cluster.md b/website/docs/litmus-installation-cluster.md deleted file mode 100644 index 8386487..0000000 --- a/website/docs/litmus-installation-cluster.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -id: litmus-install-cluster-mode -title: Litmus Chaos Control Plane (Cluster Mode) -sidebar_label: Control Plane (Cluster Mode) ---- - ---- - - - -## Pre-requisites - -- Kubernetes 1.15 or later. - ​ -- 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 would use the default storage class to allocate the PV. - -- Helm3 or Kubectl - -## Installation - -Installation of Litmus can be done using either of the below methods - -- [Helm3](#helm_install) chart or -- [Kubectl](#kubectl_install) yaml spec file - -### Installation Steps - -The helm chart will install all the required service account configuration and chaos control plane. - -The following steps will help you install litmus via helm. - -#### Step-1: Add the litmus helm repository - -```bash -helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/ -helm repo list -``` - -#### Step-2: Create the litmus namespace - -- The litmus infra components will be placed in this namespace. - -**Note**: The chaos control plane can be placed in any namespace, though it is typically placed in "litmus". - -```bash -kubectl create ns litmus -``` - -#### Step-3: Install the litmus chaos control plane - -```bash -helm install chaos litmuschaos/litmus-2-0-0-beta --namespace=litmus --devel -``` - -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-2-0-0-beta 😀 - -Your release is named chaos and its installed to namespace: litmus. - -Visit https://docs.litmuschaos.io/docs/getstarted/ 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. - -### **Install Litmus using kubectl ** - -#### **Create a Litmus namespace in Kubernetes** - -```bash -kubectl create ns litmus -``` - -#### **Install Litmus** - -Applying the manifest file will install all the required service account configuration and chaos control plane. - -```bash -kubectl apply -f https://litmuschaos.github.io/litmus/2.0.0-Beta/litmus-2.0.0-Beta.yaml -``` - -## **Verify your installation** - -**Verify if the frontend, server, and database pod are running** - -```bash -kubectl get pods -n litmus -``` - -Expected Output - -```bash -chaos-litmus-portal-frontend-ff8b554dc-q5rl4 1/1 Running 0 2m6s -chaos-litmus-portal-mongo-6764cfdd59-c9r56 1/1 Running 0 2m6s -chaos-litmus-portal-server-5ffbccbfff-dknv8 2/2 Running 0 2m6s -``` - -## **Setup the Portal** - -To setup and login to Litmus Portal expand the available services just created and copy the `PORT` of the `litmusportal-frontend-service` service - -```bash -kubectl get svc -n litmus -``` - -Expected Output - -```bash -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -chaos-litmus-portal-mongo ClusterIP 10.104.107.117 27017/TCP 2m -litmusportal-frontend-service NodePort 10.101.81.70 9091:30385/TCP 2m -litmusportal-server-service NodePort 10.108.151.79 9002:32456/TCP,9003:31160/TCP 2m -``` - -> **Note**: In this case, the PORT for `litmusportal-frontend-service` is `30385`. Yours will be different. - -### **Accessing the Portal** - -Once you have the PORT copied in your clipboard, simply use your NodeIP and PORT in this manner `:` to access the portal. - -For example: - -```yaml -http://172.17.0.3:30385/ -``` - -> Where `172.17.0.3` is my NodeIP and `30385` is the frontend service PORT. You can also use a LoadBalancer if not NodePort, the only change would be to provide a `:` - -You should be able to see the Login Page of Litmus. The **default credentials** are - -```yaml -Username: admin -Password: litmus -``` - - diff --git a/website/sidebars.js b/website/sidebars.js index 213e937..e705547 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -8,20 +8,31 @@ module.exports = { // "feature-definition" ], 'Getting Started': [ - 'getstarted', { - Installation: [ - 'litmus-install-cluster-mode', - 'litmus-install-namespace-mode', - 'agent-install', - 'litmus-with-ingress' + Prerequisites: [ + 'basic-requirements', + { + Resources: ['chaos-control-plane', 'agents'] + } ] }, - 'create-workflow', - 'observe-workflow', { - Uninstallation: ['agent-uninstall', 'litmus-uninstall'] - } + Installation: [ + { + 'Control Plane': [ + 'cluster-scope-installation', + 'namespace-scope-installation', + 'setup-without-ingress', + 'setup-with-ingress' + ] + }, + { + 'Chaos Plane': ['agent-install', 'litmusctl'] + } + ] + }, + 'run-your-first-workflow', + 'learning-litmus' ], 'User Guide': [ { diff --git a/website/src/css/global.css b/website/src/css/global.css index c48fc3f..b2d7180 100644 --- a/website/src/css/global.css +++ b/website/src/css/global.css @@ -8,11 +8,11 @@ body { margin: 0; padding: 0; background: #f4f5f7; + font-size: 1.05rem; } a { text-decoration: none; - color: #000; } /* SVGs font work differenly than normal HTML elements. So this rule is required. */