YEGOR MAKSYMCHUK «Using Kubernetes for organization performance tests»
1. Using kubernetes for organization performance tests
Jmeter, Gatling, Docker, Kubernetes, Cloud and your Mind
2. Who am I
Yehor Maksymchuk
https://github.com/YegorMaksymchuk
https://qastudy.online/ TBD
https://github.com/QAStudyOnline
3. Agenda
● Typical problems in performance test organisation
● Smart solutions “I hope it is smart :)”
● Problems what can be faced with Kubernetes and Containers services
○ Project setup
○ Build
○ Orchestration and deployment
○ Result analysis
● Summary and Q&A session
4. Typical problems in performance test organisation
1. What should be covered by Performance test - out of scope and
project related
2. Where and When I will run my performance test or who will pay for
infrastructure?
3. How I can collect and analyze results form multi load executors?
5. Where and When I will run my performance test or who will
pay for infrastructure?
Most common issue what I I have seen on projects look like:
Performance test engineer: I need big and huge VM or buy me Blazemeter!!
PM: Hmm…. Hey DevOps and Infra how can we manage it?
DevOps and Infra: We do not have VM we Containerless Serverless Microserviceless ….
PM: Oh my God budget ….
Consultant: Stop, lets use Kubernetes or Container Services
6. How I can collect and analyze results form multi load
executors?
Performance test engineer: Oh no…. I need two weeks to write custom python
scripts to aggregate result and one week to analysis it !!
PM: Oh my God budget!!
DevOps and Infra and Dev: maybe it is needed for him, in any case we have our
dashboards and alarms. so we can relax.
PM: How we can improve it?
Consultant: Crafted one-project scripts are not needed, let's use dashboards and
build-in tools functionality (also we can setup Grafana + InfluxDb to monitor test in
real time)
7. Example with Jmeter and AWS ECS
1. Deploy via CloudFormation (Terraform)
2. Results will be stored in AWS S3 bucket
3. Jmeter can aggregate results with
a. MergeResult plugin
b. Standard report based on merged
results fiel
c. Setup Grafana and Influxdb and
connect your test
8. Project setup: simple with Jmeter
1)Dockerfile - build our image
with all in one
2)entrypoint.sh - run test in
container
3)test.jmx - our test what read
environment variable
4)kubejob.yaml - Kubernetes job
deployment.
5)Just change USERS_COUNT to
change amount of virtual users
6)change parallelism to
increase amount of pods
12. How to combine all reports in one (aggregate it)?
1. You have to copy all simulation.log files from each executor in one folder
2. Install gatling as app
3. Execute:
${GATLING_HOME}/bin/gatling.sh -ro ${PATH_TO_ALL_SIMULATIONS_LOG_FOLDER}
13. Issues what can be faced?
1. Simulation.log file not accessible after pod complete? - setup pod with
volume and mount result folder from executor to pod with persistent volume.
2. Our Ingress or Load Balancer is a bottleneck ? - call in your test not a
ingress but directly your kubernetes service ip.
3. This solution use do not provide full picture because will use a cluster
resources and some hardware resources will be locked by load
generator pods! - yes, but you can start ASAP do not spent money on extra
infrastructure and provide easy to use tool for Dev and Ops (DevOps) team!
4. How integrate with CI? - just setup a kubectl and go in easy shell script!