Giter VIP home page Giter VIP logo

sa-jericho's Introduction

Jericho

SA-Jericho

Build Status

Slides

The slides are created with GitPitch and can be previewed here. If you don't want to use the publicly available container you can spawn your own GitPitch instance with this Docker Container. The repository includes a script which starts the container with the minimal required configuration.

Note that the script uses the tinier GitPitch container which does not include PDF export support!

What is Jericho?

Jericho is Gatling in Docker containers. Why it is called Jericho? You know...everything needs a name and Jericho sounds cool, doesn't it?

Jericho is designed to scale out by running multiple containers. It consists of 3 parts:

Jericho Deployment

ICNDB clone

The repository contains a demo application as test case for the Jericho. It's a clone of the Internet Chuck Norris Database (ICNDB).

The easiest way to start the ICNDB is starting the docker-compose.yml file. It defines the required PostgreSQL database service and configures both services through environment variables.

The ICNDB clone is also available as Docker image.

Jericho

Jericho Attacker

The Dockerfile for the attacker image is located under JerichoGatling/2.3.0-attacker/. The folder contains the script attack.sh which controls the attack node.

When the attack node is started, the attack.sh script is started and starts a Gatling process with a few parameters. The following options are set:

  • -nr to disable the generation of an HTML report on the attack node
  • on to rename the output directory to the hostname (id) of the container
  • -m to suppress required inputs

The -m-Switch requires that in the folder /opt/gatling/user-files/simulations is just one simulation file!

Simulation files

Docker-Compose

If you're running Jericho within Docker-Compose you can just mount your simulation file to the folder /opt/gatling/user-files/simulations and thats it!

Docker Swarm

If you want to run Jericho within Docker Swarm the easiest way to get a simulation file into all attack nodes is to create a config file (docker config create <name> <path/to/file>) and mount the configuration afterwards into the attack nodes. That can be accomplished like in the given docker-compose-attacker-stack.yml:

configs:
    - source: RandomJokeSimulation
      target: /opt/gatling/user-files/simulations/RandomJokeSimulation.scala

remember to declare the config variable in the global scope of the file:

configs:
  RandomJokeSimulation:
    external: true

Shared volumes

Jericho needs some shared volumes:

  • One volume shared between the attack nodes and the reporter to get the gatling simulation logs to the reporter
  • One volume shared between the reporter node and the report viewer to get the generated HTML report into a web root folder

The volume shared between attack nodes and reporter (let's call it gatling-logs) has to be mounted to the folder /opt/gatling/shared-results on all attack nodes and to the folder /opt/gatling/results on the reporter node. There's a special folder shared-results because the log files have to be renamed before they're getting shared to avoid filename conflicts resulting in loosing results from one node.

The volume shared between the reporter node and the report viewer has to be mounted to the folder /opt/gatling/html-out on the reporter node and to the folder /usr/share/nginx/html if you're using nginx as web server.

Docker-Compose

If you want to run Jericho within Docker-Compose you'll have no problems by just declaring the volumes in the global scope of your Docker-Compose file:

volumes:
  gatling-logs:
  gatling-results:

Because the containers are running on the same host, the "in memory" volumes are shared across all containers.

Docker Swarm

If you want to run Jericho within Docker Swarm you have 2 options:

  • run all containers on the same node (e.g. placement constraints on a node id or a master node if you have just one)
  • create volumes which are shared across all hosts (in the sample Stack config this is accomplished by declaring NFS volumes)

sa-jericho's People

Contributors

prskr avatar thomas-mildner avatar simokutlin avatar

Stargazers

Michael Frank avatar  avatar Tobias Jonas avatar

Watchers

James Cloos avatar Sebastian Weißenbacher avatar  avatar  avatar  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.