Artillery Operator for Kubernetes preview
As an SRE, you’d like to be helpful. But, you have SLOs to monitor and a long list of apps to look after. Self-service to the rescue!
With self-service, you empower your developers to get stuff done. While you keep an eye on the big picture making sure apps are within performance and availability thresholds.
If you’re running on Kubernetes, the Artillery Operator can be the load testing piece of that self-service puzzle.
Using it, your developers can run (distributed) load tests as first class citizens on Kubernetes.
These load tests are based on CRDs and utilise existing Artillery test scripts. Meaning, you can interact with them via kubectl, and they can be monitored with Kubernetes UI tools like any other Kubernetes object.
How does it work?
For the SRE
Simply deploy the Artillery Operator to a Kubernetes cluster.
For the Developer
Provided the Operator has already been deployed, you create a Load Test custom resource and deploy it to the cluster.
This is a simple YAML file similar to a Kubernetes manifest. The file describes a load test, the number of required workers to run in parallel. And, access to the Artillery test script.
As an aside, you’ll need to package your test script as a ConfigMap. Then, deploy it to your cluster in the correct namespace. It is now available to the Load Test custom resource when it is deployed.
If this sounds laborious, don’t fret, just follow this example, and you will be set.
Documentation and examples
Check out the README. Everything you need should be there.
Bonus: aggregated test reports on Prometheus
SREs, yup, you get this one for free. That is, if you have a Prometheus instance already up and running in your stack.
Your developers will just have to update their Load Test’s test script to point to a Prometheus Pushgateway. Then every worker will publish its test reports to Prometheus.
You can then set up the necessary monitoring/alerts to ensure performance and availability are at acceptable levels.
This example documents all the details.
By the way, the Operator relies on the artillery-publish-metrics plugin to do all the heavy lifting. So, if you want to, you can swap publishing to Prometheus with any other supported target, including Datadog or others.
Feedback
Please bear in mind that this is an Early Alpha release.
We still haven’t implemented all the existing test script features yet. We also might have a few kinks to iron out.
Your feedback, bug reports and any suggestions at all are most welcome.