Ubuntu image with the stress command
794
Source code on GitHub | Image on DockerHub
This is a docker container with the stress command line installed, and
a webserver that can run stress calls with options.
It was designed to help in testing and debugging auto scaling configurations.
Start the server:
$ docker run --rm -it -p 3000:3000 dannyben/stress-server
Use one of the endpoints below to run the stress command on the server.
--no-buffer in curl).timeout option set, otherwise, you might need to restart the server in order to stop the stress process.GET /stressThis is the primary endpoint. It accepts all the arguments accepted by the stress command line interface, as query string parameters. You may use either the long or short form.
For example, if you wish to perform this command:
$ stress -c 1 -m 1 --verbose -t 10
Use this URL:
$ curl --no-buffer "http://localhost:3000/stress?c=1&m=1&verbose=1&t=10"
Flags with a hyphen, like --dry-run may be expressed with either a hyphen (dry-run=1) or an underscore (dry_run=1)
GET /helpShow the output of stress --help:
$ curl http://localhost:3000/help
GET /raw/:optionsThis endpoint runs the stress command using options in the same syntax as you would normally provide them in the command line. When using curl or other HTTP client that does not like spaces in the URL, simply replace the spaces with a + sign.
For example, if you wish to perform this command:
$ stress -c 1 -m 1 --verbose -t 10
Use this URL:
$ curl --no-buffer "http://localhost:3000/raw/-c+1+-m+1+--verbose+-t+10"
To run the server in development:
$ bundle exec rackup -s thin -p 3000 -o 0.0.0.0
Or, if you have opcode:
$ op serve
To run the dockerized version of the server:
$ docker-compose up web
Content type
Image
Digest
sha256:ed0bf4a28…
Size
389.6 MB
Last updated
over 2 years ago
docker pull dannyben/stress-server