Dockerfile setup to include Jmeter plugins

1,904 views
Skip to first unread message

charekc

unread,
Mar 20, 2017, 4:45:00 PM3/20/17
to jmeter-plugins
Hi,
I want to create a dockerfile for a jmeter server image that has plugins setup.
For plugins, the documentation talks about downloading plugins-manager.jar,  putting it into lib/ext and using the UI to select plugins.
Are all plugins available by wget and where should they be saved and how is jmeter configured to use them?
I have seen some dockerfiles that use plugins but they seem out of date. 
Can someone share some pointers on creating a dockerfile (for Jmeter3) with latest plugins.

Thanks

Andrey Pokhilko

unread,
Mar 20, 2017, 4:48:17 PM3/20/17
to jmeter-...@googlegroups.com

Hi,

Did you see this? https://jmeter-plugins.org/wiki/PluginsManagerAutomated/

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrey Pokhilko

unread,
Mar 20, 2017, 4:51:43 PM3/20/17
to jmeter-...@googlegroups.com

Btw, this Docker image has pretty latest JMeter with some plugins: https://hub.docker.com/r/undera/taurus/

Andrey Pokhilko

On 20.03.2017 23:45, charekc wrote:

Vincent Daburon

unread,
Mar 21, 2017, 9:40:00 AM3/21/17
to jmeter-plugins
Hi,
The main difficulty is to have the PluginsManager runnable
Extract from my Dockerfile

ENV JMETER_VERSION=3.0
ENV JMETER_PATH=/opt/jmeter_jp
ENV PLUGINS_PATH=$JMETER_PATH/plugins

....


# get the PluginsManagerCMD.sh from the jar (the PluginsManagerCMD.sh is in the jar)
RUN cd $JMETER_PATH && \
    java -cp apache-jmeter-$JMETER_VERSION/lib/ext/jmeter-plugins-manager-0.10.jar org.jmeterplugins.repository.PluginManagerCMDInstaller

RUN cd $JMETER_PATH/apache-jmeter-$JMETER_VERSION/bin && \
    chmod u+x PluginsManagerCMD.sh

# a selection of usefull plugins from jmeter-plugins.org
ENV LIST_PLUGINS="jpgc-casutg=2.1,jpgc-csl=0.1,jpgc-dbmon=0.1,jpgc-dummy=0.1,jpgc-functions=2.0,jpgc-jmxmon=0.2,jpgc-perfmon=2.1,jpgc-graphs-basic=2.0,jpgc-graphs-additional=2.0,jpgc-graphs-dist=2.0,jpgc-graphs-vs=2.0,jpgc-cmd=2.1,jpgc-filterresults=2.1,jpgc-ggl=2.0,jpgc-mergeresults=2.0,jpgc-pde=0.1,jpgc-synthesis=2.0,jpgc-sts=2.2"

# Run the PluginsManager to download and install files (jars and scripts files)
RUN cd $JMETER_PATH/apache-jmeter-$JMETER_VERSION/bin && \
    JVM_ARGS="-Dhttps.proxyHost=$ARG_https_proxyHost -Dhttps.proxyPort=$ARG_https_proxyPort" ./PluginsManagerCMD.sh install $LIST_PLUGINS && \
    JVM_ARGS="-Dhttps.proxyHost=$ARG_https_proxyHost -Dhttps.proxyPort=$ARG_https_proxyPort" ./PluginsManagerCMD.sh status

Regards

Vincent D.

charekc

unread,
Mar 22, 2017, 11:12:41 PM3/22/17
to jmeter-plugins
Thanks for all the replies. I got my dockerfile to work to include plugins. This what I used:

FROM ubuntu:latest
ENV IP 127.0.0.1
RUN apt-get update && apt-get install -y nmon default-jdk apt-transport-https wget apt-utils
RUN tar zxvf apache-jmeter-3.1.tgz
RUN wget -P /apache-jmeter-3.1/lib/ext --trust-server-names https://jmeter-plugins.org/get/
RUN wget -O /apache-jmeter-3.1/lib/cmdrunner-2.0.jar  "http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/2.0/cmdrunner-2.0.jar"
RUN java -cp /apache-jmeter-3.1/lib/ext/jmeter-plugins-manager-*.jar org.jmeterplugins.repository.PluginManagerCMDInstaller 
RUN /apache-jmeter-3.1/bin/PluginsManagerCMD.sh install jpgc-casutg,jpgc-prmctl,jpgc-graphs-basic,jpgc-graphs-additional,jpgc-tst
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]

My docker-entrypoint.sh ->
#!/bin/bash
JMETER_LOG="jmeter-server.log" && touch $JMETER_LOG && tail -f $JMETER_LOG &
exec /apache-jmeter-3.1/bin/jmeter-server -Dserver_port=1099 -Djava.rmi.server.hostname=$LOCALIP -Dserver.rmi.localport=50000

Invocation of docker image (I called it jmeter-slave). LocalIP is the ip addr of the host which runs the jmeter-slave docker ->
docker run -d -e LOCALIP='X.X.X.X'  --net=host jmeter-slave 

Calling a script to the  jmeter-slave
./jmeter.sh -n -t Test.jmx -RX.X.X.X
Reply all
Reply to author
Forward
0 new messages