ZeroMagic / capstan

This project is for real workload benchmark for kubernetes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes capstan

Build Status codecov Go Report Card

Introduction

capstan is a benchmarker which contains series of workloads and testing tools for Kubernetes. You can obtain the performance data of each type workload in the specific configuration of Kubernetes cluster offered by different cloud offerings.

What is the scope of this project?

capstan aims to provide a series of workloads and testing tools for Kubernetes cluster:

  • Run every workload's testing cases.

  • Collect the testing results and the performance data of Kubernetes component and Kubernetes cluster.

  • Analysis and display the testing results.

  • Generate a testing report and performance report.

What is not in scope for this project?

Prerequisites Installation

  • Go: 1.9.3+
  • Helm

QuickStart

In the quickstart, we use the default config to run capstan. You can also specify your own config.

Prepare Kubernetes admin config file:

Copy the Kubernetes admin config file to the host path /etc/kubernetes/admin.conf

export KUBECONFIG=/etc/kubernetes/admin.conf

Install kubectl:

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

chmod +x ./kubectl

sudo mv ./kubectl /usr/local/bin/kubectl

Install helm

Here is helm installtion. After installtion, you should helm init.

Build capstan:

mkdir -p $GOPATH/src/github.com/ZJU-SEL
git clone https://github.com/ZJU-SEL/capstan.git $GOPATH/src/github.com/ZJU-SEL/capstan
cd $GOPATH/src/github.com/ZJU-SEL/capstan
make && make install

Deploy capstan:

# install Docker
apt-get install docker.io -y

# configure Prometheus
cat >/etc/capstan/prometheus/prometheus.yml <<EOF
global:
  scrape_interval: 15s
  scrape_timeout: 10s
scrape_configs:
  - job_name: 'pushgateway'
    static_configs:
      - targets: ['<Your-HostIP>:9091']
  - job_name: 'aliyun'
    static_configs:
      - targets: ['<Your-Kubernetes in aliyun-MasterIP>:31672','<Your-Kubernetes in aliyun-Node1IP>:31672','<Your-Kubernetes in aliyun-Node2IP>:31672',...]
  - job_name: 'gcp'
    static_configs:
      - targets: ['<Your-Kubernetes in gcp-MasterIP>:31672','<Your-Kubernetes in gcp-Node1IP>:31672','<Your-Kubernetes in gcp-Node2IP>:31672',...]
EOF

# deploy
sh $GOPATH/src/github.com/ZJU-SEL/capstan/deploy/quickstart.sh

Start capstan:

capstan --v=3 --logtostderr --config=/etc/capstan/config --kubeconfig=/etc/kubernetes/admin.conf &

Display

You can visit <Your-HostIP>:3000 to see Grafana. There is a default user "admin", and its password is "admin".

Documentation

Roadmap

  • Design the testing indicators(P0).
  • Design and Implement the framework of capstan(P0).
  • Use Prometheus and Grafana to analysis and display the testing results(P0).
  • Implement multiple workloads and testing tools(P1).
  • Implement the online ranking system(P2).

About

This project is for real workload benchmark for kubernetes.

License:Apache License 2.0


Languages

Language:Go 64.1%Language:Shell 16.6%Language:Python 9.6%Language:Makefile 6.4%Language:Smarty 3.3%