DEV Community

Discussion on: 10 Ansible Interview Questions

Collapse
 
singh1114 profile image
Ranvir Singh

Recently, one of my colleagues introduced me to an ansible. We used it for doing performance testing for some systems. Pretty much liked it. Here is the script. Let me know if you use something else for these types of testing.

config:
  target: "your website link"
  phases:
    - duration: 100
      arrivalRate: 10
      rampTo: 50
      name: "Warm up the application"
    - duration: 100
      arrivalRate: 20
      rampTo: 100
      name: "add load"
    - duration: 100
      arrivalRate: 30
      rampTo: 150
      name: "add real load"
    - duration: 100
      arrivalRate: 40
      rampTo: 200
      name: "realest load"
scenarios:
  - flow:
    - get:
        url: "endpoint"
Enter fullscreen mode Exit fullscreen mode
Collapse
 
abregman profile image
Arie Bregman

I usually prefer using Ansible only for configuration management although it is capable of executing any other type of tasks like provisioning or performance testing as you demonstrated but in long term, it becomes quite challenging maintaining such tasks within Ansible in my opinion.

Collapse
 
singh1114 profile image
Ranvir Singh

Totally agree, although it is good for quick performance testing.

Collapse
 
melezhik profile image
Alexey Melezhik

You may consider Sparrow6 - it's super flexible and extendable and it's a Raku DSL.