Skip to content

Latest commit

 

History

History
122 lines (84 loc) · 3.28 KB

File metadata and controls

122 lines (84 loc) · 3.28 KB

TODOS

Create a single node OKD cluster with minishift (some experiments require multi node)

Deploy the Demo Microservice and Install Litmus

Run Experiments and Observe

Requirements

Note: I am using this demo microservice

Create OKD cluster with minishift

  1. Run minishift start command

    minishift start
    #if you run into errors skip startup checks
    minishift config set skip-startup-checks true
  2. Display path needed for oc binary

    minishift oc-env
    #add output path to PATH environment variable
    eval $(minishift oc-env)
    #admin loging 
    oc login -u system:admin
  3. 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 named okd-cluster

Deploy Demo Microservice and Install Litmus

  1. In the terminal set the context to the project you created

    oc project okd-cluster
  2. Deploy the microservice to the cluster

    oc apply -f gcp-microservice.yaml
    #check status
    oc get pods -n okd-cluster
  3. Access web frontend with external ip

     oc port-forward deployment/frontend 8080:8080
  4. Deploy Litmus ChaosOperator

    oc apply -f https://litmuschaos.github.io/litmus/litmus-operator-v1.9.0.yaml
  5. 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
  6. Create Service Account

    oc create -f rbac.yaml

Run experiments and observe

  1. Delete any existing Chaos engines in the namespace

    oc delete chaosengine okd-chaos -n okd-cluster
  2. Run the experiment and watch

    oc create -f litmus/pod-delete.yaml -n okd-cluster
    
    oc get pods -n okd-cluster --watch
  3. 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
  4. 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