Skip to content

Latest commit

 

History

History
105 lines (81 loc) · 5.19 KB

README.md

File metadata and controls

105 lines (81 loc) · 5.19 KB

Grafana Docker Compose

The Grafana docker compose consists of Grafana and prometheus docker images. The grafana docker compose contains the dashboards which can be directly deployed for the performance analytics.

if you are running SBK as docker image or as SBK as performance benchmarking application, this grafana docker compose can be used deploy the performance graphs.

As an example, just follow the below steps to see the performance graphs

  1. Run the grafana docker compose

    <SBK dir/grafana>% docker-compose up 
    
  2. login to grafana local host port 3000 with username admin and password admin

  3. In the dashboards' menu you choose the dashboard of the storage system on which you want to conduct the performance benchmarking.

  4. For example, if you are running the SBK performance benchmarking of file system as follows

     <SBK dir>% ./build/install/sbk/bin/sbk -class file -writers 1 -size 100 -seconds 60
    
  5. you can choose the File system dashboard to see the performance results graphs.

Grafana with kubernetes

  1. Update the prometheus mount path to your local /grafana/prometheus folder.

  2. Update the Grafana dashboards path to your local /grafana/dashboards folder.

  3. Update the Grafana provisioning path to your local /grafana/provisioning folder,

  4. Update the Grafana config file to you local /grafana/config.ini,

  5. Use the below command to run the grafana , prometheus pods and deployments

    <SBK dir/grafana>% kubectl apply -f grafana-deployment.yaml -f grafana-service.yaml -f prometheus-deployment.yaml -f  prometheus-service.yaml
      
    

    output is as follows:

    kmg@kmgs-MBP grafana % kubectl apply -f grafana-deployment.yaml -f grafana-service.yaml -f prometheus-deployment.yaml -f  prometheus-service.yaml 
    deployment.apps/grafana created
    service/grafana configured
    deployment.apps/prometheus created
    service/prometheus configured
    
  6. you can check the status of the deployments with the below command:

    kubectl get svc
    

    output is as follows:

    kmg@kmgs-MBP grafana % kubectl get svc                                                         
    NAME          TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
    grafana       ClusterIP      10.105.242.78   <none>        3000/TCP         37s
    kubernetes    ClusterIP      10.96.0.1       <none>        443/TCP          7m47s
    prometheus    ClusterIP      10.108.47.252   <none>        9090/TCP         37s   
    
  7. Note that, there is no external IP for grafana, in case if you have the grafana container's ip address to mapped to your localhost then use the below command:

    kubectl expose deployment grafana --type=LoadBalancer --name=grafana-ext
    

    the execution of above command is one time activity; if you delete and recreate the grafana service, you need not execute the above command again.

  8. Optionally you can expose the prometheus port too as follows

    kubectl expose deployment prometheus --type=LoadBalancer --name=prometheus-ext
    
  9. now, you will get the external IP address for grafana service. check the output as follows.

    kmg@kmgs-MBP grafana % kubectl get svc
    NAME          TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
    grafana       ClusterIP      10.105.242.78   <none>        3000/TCP         14m
    grafana-ext   LoadBalancer   10.97.215.174   localhost     3000:31011/TCP   14m
    kubernetes    ClusterIP      10.96.0.1       <none>        443/TCP          21m
    prometheus    ClusterIP      10.108.47.252   <none>        9090/TCP         14m 
    
  10. now you can log in to the grafana service grafana local host port 3000 with username 'admin' and password 'admin'.

Helper kubctl commands to clean the pods , deployment and services

kubectl delete --all pods 
kubectl delete --all deployments
kubectl delete --all namespaces 

Grafana and Prometheus with Node metrics

while running the grafana docker compose, if you are interested in profiling the system along with SBK metrics, you can use this dashboard : https://github.com/kmgowda/SBK/blob/master/grafana/dashboards/node-metrics.json.

But, you should run the node exporter to get the system metrics ; you can find the prometheus node exporter here : https://prometheus.io/docs/guides/node-exporter/

just run the node exporter, the prometheus settings are already configured with this docker compose: https://github.com/kmgowda/SBK/blob/master/grafana/docker-compose.yml