Edit me

Kruize Remote Monitoring Demo

Goal

The goal of this demo is to demonstrate the workflow of Kruize in Remote monitoring mode and project the recommendations generated by kruize on grafana dashboard. The demo script creates experiments using the Kruize Remote Monitoring REST APIs for the specified deployment in a namespace and updates the results containing the resource usage metrics for the deployment. It then fetches and displays the Kruize recommendations for each of the experiments created.

Steps

This demo does the following:

  • Clones the required git repositories
  • Installs minikube and prometheus (If the cluster type is minikube)
  • Installs kruize and initializes the thanos and grafana containers
  • Creates an experiment by posting the input json to Kruize Monitoring REST APIs, updates the results for the experiments and fetches the Kruize recommendations
  • Metric results along with the recommendations are backfilled in thanos and launches grafana in the browser
  • User can login to grafana and search for pronosana-dashboard to view the cpu and memory recommendations provided by Kruize

Note: The thanos and grafana related steps above will be invoked only on specifying –visualize option, which is yet to be implemented completely.

Pre-req

To run the test on minikube cluster, it expects minikube to be installed with atleast 8 CPUs and 16384MB Memory. WARNING: The script deletes any existing minikube cluster.

How do I run it?

# Run the Kruize monitoring demo using the below command:
$ ./remote_monitoring_demo.sh

Where values for demo.py are:
usage: ./remote_monitoring_demo.sh [ -c ] : cluster type. Supported types - minikube, openshift. Default is minikube
                            [ -o ] : Kruize docker image, optional
                            [ -u ] : Kruize UI image, optional
                            
# If you want to restart only kruize with the specified docker image
$ ./remote_monitoring_demo.sh -r -o [kruize image]

# To terminate the demo
$ ./remote_monitoring_demo.sh -t