Testing ActiveMQ on Openshift using the activemq-perf-plugin
August
24th,
2018
I have been meaning to write a blog post on this topic for a while. When on engagements and installing ActiveMQ on Openshift, I am often asked what is a quick way of testing out the install. Many times I would write a simple application using camel with a producer and consumer, however, this wouldn’t result in giving much on the statistics front.
In standalone installs of ActiveMQ I have used the perftest plugin which gives out some great statistics. In this article I will show how to quickly build an image on openshift in order to run jobs to test ActiveMQ.
The following will clone a git repo and create a new build in Openshift, this will create an image that has maven and the plugin dependencies pre-baked in that image. Once the build has finished it will be available for us to create Jobs using that image. The amq-perf-test-pvc is a shared persistent volume area where we will store the reports generated by the job.
To create a job we can run the following, where 172.30.1.1 is my minishift registry ip oc get svc/docker-registry -n default -o jsonpath='{.spec.clusterIP}') and amq is the namespace where I have built the amq-perf-test-job image. This job creates both a consumer and a producer.
Please note that all of the -D options on the command are configured ot suit my environment (including username and password for the ActiveMQ instance). All of the configuration parameters for the activemq-perf-maven-plugin
are documented at: http://activemq.apache.org/activemq-performance-module-users-manual.html
The results of the job are available from the pod logs:
Also, the report will be saved in the shared persistent storage. Below I show how to get this from minishift.
We can export the PV and see where on the filesystem the storage actually is, in this case, it’s in /var/lib/minishift/openshift.local.pv/pv0059 inside the minishift instance.