Coder Social home page Coder Social logo

ai-collaboratory / gatling-testbed Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 0.0 9.13 MB

This Gatling Testbed is a performance testing application that periodically runs a battery of tests simulating the use of a test system. The results are indexed into Elasticsearch for later analysis and presentation.

Home Page: http://drastic-testbed.umd.edu

License: Apache License 2.0

Scala 90.84% Shell 4.97% Dockerfile 4.19%
browndog gatling testing

gatling-testbed's Introduction

Overview

This Gatling Testbed is a performance testing application that periodically runs a battery of tests simulating the use of a test system. The results are indexed into Elasticsearch for later analysis and presentation.

The Testbed samples the diverse files in the CI-BER collections to gather test data that reflects real world case studies. Each simulation targets a particular kind of user of the service. Simulations consist of many tests that are run in parallel to simulate web-scale server load.

The testbed was designed for testing Brown Dog services and for testing Fedora on distributed systems (Trellis and DRAS-TIC Fedora).

Current Technologies

  • Simulations defined in Gatling.io framework
  • Results in Elasticsearch indices via logstash:
  • Gatling RUNS, USERS, GROUPS, REQUESTS are all indexed.
  • Cron wakes up each hour to setup/run next test battery. (Subject to change)

Simulations in Development

  • On-demand conversion to a web format
  • Walk hierarchy to random file
  • Obtain list of conversions
  • Compare with browser acceptable formats
  • Verify migration path exists and works to support the Archivematica preservation policy
  • https://www.archivematica.org/wiki/Media_type_preservation_plans
  • Data set will reflect the most frequently occurring formats in CI-BER collection
  • Note: A better data set would contain most frequently occuring subformats as identified by a characterization tool.

Setting up in a Dev environment

Install Docker

Install Docker (see: https://docs.docker.com/install/overview/)

If you are running docker on a Linux machine you can configure the following optional post install steps:

  • Manage Docker as a non-root user
  • Configure Docker to start on boot

See: https://docs.docker.com/install/linux/linux-postinstall/ for more information on these setups.

Setting up Network

Create a separate docker network for the containers:

docker network create performance-net

Setting up Elastic Search

docker pull elasticsearch:6.8.2

docker run -d -p 9200:9200 -p 9300:9300 -it -h elasticsearch -e "discovery.type=single-node" -v es-data:/usr/share/elasticsearch/data --name elasticsearch --rm --net performance-net elasticsearch:6.8.2

curl http://localhost:9200/

Create an Index (This will be created later when the tests are run so this step can be skipped)
curl -X PUT http://localhost:9200/drastic-solid-server-results

Optional Step

docker run -d  -p 5601:5601 -h kibana --name kibana --rm --net performance-net kibana:6.7.1

http://localhost:5601

Create test data and index it in Elasticsearch with Logstash

docker build --tag=drastic/sample-data sampleData/

docker run -e ELASTICSEARCH_URL="http://elasticsearch:9200" -d -v nfs-ciber:/export/ciber --rm --net performance-net drastic/sample-data:latest

Setup Cassandra container and load schema needed for Trellis

Run the following commands:

docker pull trellisldp/trellis-cassandra-init:0.8.1-SNAPSHOT

docker run --name cassandra -p 9042:9042 --network performance-net --rm -d trellisldp/trellis-cassandra-init:0.8.1-SNAPSHOT

docker exec -i cassandra cqlsh -f /load.cql

Note: you need to wait for cassandra to full start before you run the script or else you will get errors.

Checking the schema in the Cassandra container

docker run -it --network performance-net --rm cassandra cqlsh cassandra

cqlsh> USE trellis;
cqlsh> DESCRIBE tables;

Running Trellis Cassandra LDP Server

Start the trellis container:

docker run -e CASSANDRA_CONTACT_ADDRESS="cassandra" -e CASSANDRA_CONTACT_PORT="9042" --name trellis -p 6060:8080 --net performance-net --rm trellisldp/trellis-cassandra:0.8.1-SNAPSHOT

MetricBeat

docker build --build-arg configFile=metricbeat-env.yml --tag=drastic/metricbeat metricbeat/

docker run -d --name metricbeat -e ELASTICSEARCH_URL="http://elasticsearch:9200" --rm --net performance-net --volume=/var/run/docker.sock:/var/run/docker.sock drastic/metricbeat

Build the Test Bed

This builds the project and create a docker image containing the Gatling test suites:

The Test Bed has a dependency on a small library that is used for searching for sample test data from Elasticsearch.

clone [email protected]:UMD-DRASTIC/ciber-sampling.git
cd ciber-sampling
mvn clean install

Then you can build the Test bed.

mvn clean install

Start the testbed container

./run.sh -s "http://trellis:8080/

Setting up Grafana

Install and run Grafana:

docker build --tag=drastic/grafana grafana/

docker run -d --name grafana -p 3000:3000 -e ELASTICSEARCH_URL="http://elasticsearch:9200" --rm --net performance-net drastic/grafana

http://localhost:3000

gatling-testbed's People

Contributors

gregjan avatar jholleran avatar gatos-jd avatar pmcb55 avatar

Stargazers

Aaron Coburn avatar

Watchers

 avatar James Cloos avatar Aaron Coburn avatar  avatar Bing Zhang avatar

gatling-testbed's Issues

Setting up the testbed locally with Docker Compose

Currently there are a lot of containers to startup for setting up the testbed locally. This could be simplified with a docker-compose.yml file that would start Elasticsearch, Metricbeat, & Grafana.

DRAST-IC License

Hi Greg, what is the License for this code? Can you add a License file to this repo?

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.