GithubHelp home page GithubHelp logo

aschiffler / docker-jmeter-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pablomfg/docker-jmeter-server

0.0 0.0 0.0 110 KB

Docker image for Apache JMeter-server

License: MIT License

Shell 54.09% Dockerfile 45.91%

docker-jmeter-server's Introduction

Open in GitHub Codespaces

(You will need a github account to do so)

docker-jmeter-mqtt

Docker image for Apache JMeter with included MQTT extension (Fixed Version from https://github.com/xmeter-net/mqtt-jmeter/raw/master/Download/v2.0.2/mqtt-xmeter-fuse-2.0.2-jar-with-dependencies.jar ).

This Docker image can be run as the jmeter command.

**JMeter has been updated to 5.6.

Building

With the script build.sh the Docker image can be build from the Dockerfile but this is not really necessary as you may use your own docker build commandline.

Build Options

Build arguments (see build.sh) with default values if not passed to build:

  • JMETER_VERSION - JMeter version, default 5.4. Use as env variable to build with another version: export JMETER_VERSION=5.4
  • IMAGE_TIMEZONE - timezone of Docker image, default "Europe/Amsterdam". Use as env variable to build with another timezone: export IMAGE_TIMEZONE="Europe/Berlin"

Running

The Docker image will accept the same parameters as jmeter itself, assuming you run JMeter non-GUI with -n.

There is a shorthand run.sh command.

User Defined Variables

This is a standard facility of JMeter: settings in a JMX test script may be defined symbolically and substituted at runtime via the commandline. These are called JMeter User Defined Variables or UDVs.

See test.sh and the trivial test plan for an example of UDVs passed to the Docker image via run.sh.

See also: https://www.novatec-gmbh.de/en/blog/how-to-pass-command-line-properties-to-a-jmeter-testplan/

Adjust Java Memory Options

By default, JMeter reads out the available memory from the host machine and uses a fixed value of 80% of it as a maximum. If this causes Issues, there is the option to use environment variables to adjust the JVM memory Parameters:

JVM_XMN to adjust maximum nursery size

JVM_XMS to adjust initial heap size

JVM_XMX to adjust maximum heap size

All three use values in Megabyte range.

Specifics

The Docker image built from the Dockerfile inherits from the Alpine Linux distribution:

"Alpine Linux is built around musl libc and busybox. This makes it smaller and more resource efficient than traditional GNU/Linux distributions. A container requires no more than 8 MB and a minimal installation to disk requires around 130 MB of storage. Not only do you get a fully-fledged Linux environment but a large selection of packages from the repository."

See https://hub.docker.com/_/alpine/ for Alpine Docker images.

The Docker image will install (via Alpine apk) several required packages most specificly the OpenJDK Java JRE. JMeter is installed by simply downloading/unpacking a .tgz archive from http://mirror.serversupportforum.de/apache/jmeter/binaries within the Docker image.

A generic entrypoint.sh is copied into the Docker image and will be the script that is run when the Docker container is run. The entrypoint.sh simply calls jmeter passing all argumets provided to the Docker container, see run.sh script:

sudo docker run --name ${NAME} -i -v ${WORK_DIR}:${WORK_DIR} -w ${WORK_DIR} ${IMAGE} $@

Credits

Thanks to https://github.com/hauptmedia/docker-jmeter, https://github.com/pablomfg/docker-jmeter-server and https://github.com/hhcordero/docker-jmeter-server for providing the Dockerfiles that inspired me. @wilsonmar for contributing detailed instructions. Others that tested/reported after version updates.

docker-jmeter-server's People

Contributors

justb4 avatar aschiffler avatar wilsonmar avatar zhangsean avatar davidmpaz avatar mpielvitori avatar askalski85 avatar kareemshahin avatar rpherrera avatar amauryortega avatar andrelramos avatar darius-m avatar dynamic-gravity avatar typekpb avatar gifflet avatar anasoid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.