Re: Looking for a buildpack to run JMeter on CF


Daniel Mikusa
 

On Mon, Jul 18, 2016 at 2:42 AM, Daniel Jones <
daniel.jones(a)engineerbetter.com> wrote:

Hi Manglu,

Does your Cloud Foundry use Diego, and is Docker support
<https://docs.pivotal.io/pivotalcf/1-7/concepts/docker.html#push-docker>
enabled? For what I assume is a one-off task, creating a Docker image with
JMeter in will be a lot easier than crafting a buildpack.

I'm curious - what's your use-case for JMeter on Cloud Foundry?
+1


On Mon, Jul 18, 2016 at 1:04 AM, Manglu Balasubramanian <manglu(a)gmail.com>
wrote:

Hi

I haven't created buildpacks in the past (and only understand this
concept in theory).

I wanted to run JMeter on CF and i have the need to run the jmeter.sh.
Though JMeter is a java app and has a JAR which packages the artefacts, i
can't run it like a Java application and have this need to run jmeter.sh.
Why not? What happens when you try this? What fails.

Have you tried manually setting a command? You can set the `-c` arg to `cf
push` and it should run the command exactly as you tell it.



I tried to comprehend the Java Build pack to see how it runs the scripts
file for Tomcat, however I am lost and need help in figuring things out.

Here is how, conceptully I think it should work.

In the detect script, I should be looking for the presence of jmeter.sh
file.
What are you trying to push? The jmeter jars or are you trying to push a
test plan? It would probably be easier to push a test plan which is just a
small xml file and then have the build pack download the latest jmeter
binary for you.

THe compile script doesn't need to do anything fanciful

This could download the Jmeter binary for you.


while the release script should using the "jmeter.sh" for the start up of
the droplet.
Yes. While probably obvious I just want to point out there's no GUI, so
you'd need to run the cli only commands. You should also run jmeter in
some way that it keeps running forever. If jmeter exits, for example when
a test plan finishes, CF (the v2 API) will interpret this as the
application crashing and it will restart the app which may not be expected
/ wanted.

Appreciate if someone could point me to docs that could help me in
comprehending the Java Build pack better so that I can fork this and create
a build pack for me to run jmeter.
I think the "Extending" section here is probably a good start:
https://github.com/cloudfoundry/java-buildpack#additional-documentation

Dan

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.