Skip to content

Commit

Permalink
Docker compose setup for local benchmarking
Browse files Browse the repository at this point in the history
Created a local docker-compose setup that allows to run the benchmarker in combination with InfluxDB and Grafana. All that is necessary is to define the benchmark config (see benchmark_config.yml.usegalaxyeu).
  • Loading branch information
AndreasSko committed Nov 26, 2019
1 parent c08c928 commit 58b2f80
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 3,251 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.7

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN pip uninstall bioblend -y
RUN git clone https://github.com/galaxyproject/bioblend.git && cd bioblend && python setup.py install

RUN cd / && git clone https://github.com/usegalaxy-eu/workflow-testing.git
56 changes: 56 additions & 0 deletions benchmark_config.yml.usegalaxyeu
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
galaxy:
url: "https://usegalaxy.eu"
# Check, if tools need to be installed when running GalaxyWorkflow (can be turned off after first benchmark-run)
shed_install: false
# Should Galaxy be configured to use the given Destinations or is everything already set?
configure_job_destinations: false
user_key: YOUR-REGULAR-USER-KEY

# Configure all the Destinations that should be benchmarked
destinations:
- name: YourDestinationName
type: Galaxy
galaxy_user_key: YOUR-USER-KEY-FOR-DESTINATION-USER

workflows:
- name: ard
type: Galaxy
path: /workflow-testing/sklearn/ard/ard.ga
timeout: 5000 # Optional. Workflow will be canceled after timeout.
- name: gromacs
type: Galaxy
path: /workflow-testing/training/computational-chemistry/gromacs/gromacs.ga
timeout: 5400
- name: mapping_by_sequencing
type: Galaxy
path: /workflow-testing/training/variant-analysis/mapping-by-sequencing/mapping_by_sequencing.ga
timeout: 5400
- name: adaboost
type: Galaxy
path: /workflow-testing/sklearn/adaboost/adaboost.ga
timeout: 1200
- name: ard
type: Galaxy
path: /workflow-testing/sklearn/ard/ard.ga
timeout: 1200

benchmarks:
- name: DestinationComparison
type: DestinationComparison
destinations:
- UseGalaxy
workflows:
- ard
- adaboost
- gromacs
- mapping_by_sequencing
runs_per_workflow: 5
warmup: true

# Please do not change!
influxdb:
host: influxdb
port: 8086
username: glx_benchmarker
password: glx_benchmarker
db_name: glx_benchmarker
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "3"
services:
benchmarker:
build: .
volumes:
- .:/src
working_dir: /src
entrypoint: python3 galaxy_benchmarker
depends_on:
- influxdb
influxdb:
image: influxdb:1.5
ports:
- 8086:8086
environment:
INFLUXDB_DATA_QUERY_LOG_ENABLED: "false"
INFLUXDB_HTTP_LOG_ENABLED: "false"
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
INFLUXDB_DB: glx_benchmarker
INFLUXDB_USER: glx_benchmarker
INFLUXDB_USER_PASSWORD: glx_benchmarker
volumes:
- .:/src
grafana:
image: grafana/grafana:6.5.0
ports:
- 3000:3000
volumes:
- ./grafana/config.ini:/etc/grafana/config.ini
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
2 changes: 2 additions & 0 deletions grafana/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[paths]
provisioning = /etc/grafana/provisioning
File renamed without changes.
6 changes: 6 additions & 0 deletions grafana/provisioning/dashboards/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: 'default'
org_id: 1
folder: ''
type: 'file'
options:
folder: '/var/lib/grafana/dashboards'
9 changes: 9 additions & 0 deletions grafana/provisioning/datasources/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: glx_benchmarker
type: influxdb
url: http://influxdb:8086
user: glx_benchmarker
password: glx_benchmarker
database: glx_benchmarker
isDefault: true

0 comments on commit 58b2f80

Please sign in to comment.