diff options
author | startxfr <clarue@startx.fr> | 2017-07-23 13:43:36 +0200 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2017-07-23 13:43:36 +0200 |
commit | baf7c43307fb29f5c19b237f418f4f1a59749c3c (patch) | |
tree | f62e6e621a29ef9c71c646efda880f06d44109fd /Bombs/cpu/README.md | |
parent | f499157f393a851909e733c9f259a71b619c0d84 (diff) | |
download | phpmyadmin-baf7c43307fb29f5c19b237f418f4f1a59749c3c.tar.gz phpmyadmin-baf7c43307fb29f5c19b237f418f4f1a59749c3c.tar.bz2 phpmyadmin-baf7c43307fb29f5c19b237f418f4f1a59749c3c.tar.xz phpmyadmin-baf7c43307fb29f5c19b237f418f4f1a59749c3c.zip |
adding openshift OS + Bomb for mem and cpu crash test on openshift
Diffstat (limited to 'Bombs/cpu/README.md')
-rw-r--r-- | Bombs/cpu/README.md | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Bombs/cpu/README.md b/Bombs/cpu/README.md new file mode 100644 index 0000000..1b7358d --- /dev/null +++ b/Bombs/cpu/README.md @@ -0,0 +1,69 @@ +# Docker Bomb Images : CPU + +Simple container used to bomb cpu usage for crash testing. !!! WARNING, starting this container will start flooding your CPU by default for 10sec. + +You can find information on this image and how to use it by visiting the [Dockerhub registry](https://github.com/startxfr/docker-images) + +| [![Build Status](https://travis-ci.org/startxfr/docker-images.svg?branch=openshift)](https://travis-ci.org/startxfr/docker-images) | [Dockerhub Registry](https://hub.docker.com/r/startx/openshift-bomb-cpu) | [Sources](https://github.com/startxfr/docker-images/Bombs/) | [STARTX Profile](https://github.com/startxfr) | +|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------| + +## Running from dockerhub registry + +* with `docker` you can run `docker run -it --name="centos" startx/openshift-bomb-cpu` from any docker host +* with `docker-compose` you can create a docker-compose.yml file with the following content +``` +fedora: + image: startx/openshift-bomb-cpu:latest + container_name: "os-ocp-bomb-cpu" + environment: + CONTAINER_TYPE: "bomb" + CONTAINER_SERVICE: "cpu" + CONTAINER_INSTANCE: "os-ocp-bomb-cpu" +``` + +## Using this image in your own container + +You can use this Dockerfile template to start a new personalized container based on this container + ``` +FROM startx/openshift-bomb-cpu:latest +#... your container specifications +CMD ["/bin/sx"] +``` + +## Environment variable + +| Variable | Type | Mandatory | Description | +|---------------------------|----------|-----------|--------------------------------------------------------------------------| +| CONTAINER_INSTANCE | `string` | `yes` | Container name. Should be uning to get fine grained log and application reporting +| CONTAINER_TYPE | `string` | `no` | Container family (os, service, application. could be enhanced +| CONTAINER_SERVICE | `string` | `no` | Define the type of service or application provided +| HOSTNAME | `auto` | `auto` | Container unique id automatically assigned by docker daemon at startup +| TEST_DURATION | `seconds`| `auto` | Running test duration (defautl = 10sec) + + +## For advanced users + +You you want to use this container and code to build and create locally this container. You can follow theses instructions to setup and working environment. + +This section will help you if you want to : +* Get latest version of this container Bombs +* Enhance container content by adding instruction in Dockefile before build step + +You must have a working environment with the source code of this repository. Read and follow [how to setup your working environment](https://github.com/startxfr/docker-images#setup-your-working-environment-mandatory) to get a working directory. The following instructions assume you are at the top level of your working directory. + +### Build & run a container using `docker` + +1. Jump into the container directory with `cd Bombs/cpu` +2. Build the container using `docker build -t bomb-cpu .` +3. Run this container + 1. Interactively with `docker run -it bomb-cpu`. If you add a last parameter (like `/bin/bash`) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex: `/bin/bash`, `/bin/ps -a`, `/bin/df -h`,...) + 2. As a daemon with `docker run -d bomb-cpu` + + +### Build & run a container using `docker-compose` + +1. Jump into the container directory with `cd Bombs/cpu` +2. Run this container + 1. Interactively with `docker-compose up` Startup logs appears and escaping this command stop the container + 2. As a daemon with `docker-compose up -d`. Container startup logs can be read using `docker-compose logs` + |