➜ Create a single node OKD cluster with minishift (some experiments require multi node)
➜ Deploy the Demo Microservice and Install Litmus
- Kubernetes/kubectl
- VirtualBox
- minishift
hyperkit
anddocker-machine-driver-hyperkit
Note: I am using this demo microservice
-
Run minishift start command
minishift start #if you run into errors skip startup checks minishift config set skip-startup-checks true
-
Display path needed for
oc
binaryminishift oc-env #add output path to PATH environment variable eval $(minishift oc-env) #admin loging oc login -u system:admin
-
minishift start
outputs info to connect to the web console. Follow the prompt to get to the web dashboard Note: OKD prompts you to create a project, these projects act as clusters/namespaces in Kubernetes. Create a new project in the dashboard namedokd-cluster
-
In the terminal set the context to the project you created
oc project okd-cluster
-
Deploy the microservice to the cluster
oc apply -f gcp-microservice.yaml #check status oc get pods -n okd-cluster
-
Access web frontend with external ip
oc port-forward deployment/frontend 8080:8080
-
Deploy Litmus ChaosOperator
oc apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.9.0.yaml
-
Install Litmus Experiments
curl -sL https://github.com/litmuschaos/chaos-charts/archive/1.9.0.tar.gz -o litmus.tar.gz tar -zxvf litmus.tar.gz rm litmus.tar.gz find chaos-charts-1.9.0 -name experiments.yaml | grep generic | xargs oc apply -n okd-cluster -f
-
Create Service Account
oc create -f rbac.yaml
-
Delete any existing Chaos engines in the namespace
oc delete chaosengine okd-chaos -n okd-cluster
-
Run the experiment and watch
oc create -f litmus/pod-delete.yaml -n okd-cluster oc get pods -n okd-cluster --watch
-
Observe Results (Takes a few seconds for command to turnover, results initially in
await
state)oc describe chaosengine okd-chaos -n okd-cluster oc describe chaosresult okd-chaos-pod-delete -n okd-cluster #to save results to file: oc describe chaosengine okd-chaos -n okd-cluster > litmus-results/chaosengine-pod-delete.txt oc describe chaosresult okd-chaos-pod-delete -n okd-cluster > litmus-results/chaosresult-pod-delete.txt
-
Uninstall and clean up
oc delete -f https://litmuschaos.github.io/litmus/litmus-operator-v1.9.0.yaml oc delete chaosengine --all -n okd-cluster oc delete chaosengine --all -n litmus oc delete namespaces okd-cluster minishift stop minishift delete