Skip to content

Commit

Permalink
Startup an OpenSearch Benchmark container, but put don't run tests up…
Browse files Browse the repository at this point in the history
…on startup...

Instead, put the tests into a shell script that can be invoked when the user wants to run it. That also lets the user run other tests too.

Signed-off-by: Greg Schohn <[email protected]>
  • Loading branch information
gregschohn committed Jul 18, 2023
1 parent 312bf4e commit c7ff99e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
26 changes: 6 additions & 20 deletions TrafficCapture/dockerSolution/src/main/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,6 @@ services:
- migrations
ports:
- "29200:9200"
# opensearch-benchmarks:
# image: 'migrations/open_search_benchmark:latest'
# networks:
# - migrations
# depends_on:
# - captureproxy
# command:
# - /bin/sh
# - -c
# - >
# echo "Running opensearch-benchmark w/ 'geonames' workload..." &&
# opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=geonames --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
# echo "Running opensearch-benchmark w/ 'http_logs' workload..." &&
# opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=http_logs --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
# echo "Running opensearch-benchmark w/ 'nested' workload..." &&
# opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=nested --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
# echo "Running opensearch-benchmark w/ 'nyc_taxis' workload..." &&
# opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=nyc_taxis --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
# sleep 30 &&
# curl --insecure https://captureproxy:9200/

trafficcomparator:
image: 'migrations/traffic_comparator:latest'
Expand Down Expand Up @@ -126,6 +106,12 @@ services:
- COMPARISONS_DB_LOCATION=/shared/comparisons.db
command: /bin/sh -c 'cd trafficComparator && pip3 install --editable ".[data]" && jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root'

opensearch-benchmarks:
image: 'migrations/open_search_benchmark:latest'
networks:
- migrations
depends_on:
- captureproxy

volumes:
zookeeper_data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends python3.9 python3-pip python3-dev gcc libc-dev git curl && \
pip3 install opensearch-benchmark

COPY runTestBenchmarks.sh /root/
RUN chmod ugo+x /root/runTestBenchmarks.sh
WORKDIR /root

CMD tail -f /dev/null
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

echo "Running opensearch-benchmark w/ 'geonames' workload..." &&
opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=geonames --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
echo "Running opensearch-benchmark w/ 'http_logs' workload..." &&
opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=http_logs --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
echo "Running opensearch-benchmark w/ 'nested' workload..." &&
opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=nested --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
echo "Running opensearch-benchmark w/ 'nyc_taxis' workload..." &&
opensearch-benchmark execute-test --distribution-version=1.0.0 --target-host=https://captureproxy:9200 --workload=nyc_taxis --pipeline=benchmark-only --test-mode --kill-running-processes --workload-params "target_throughput:0.5,bulk_size:10,bulk_indexing_clients:1,search_clients:1" --client-options="use_ssl:true,verify_certs:false,basic_auth_user:admin,basic_auth_password:admin" &&
sleep 30 &&
curl --insecure https://captureproxy:9200/

0 comments on commit c7ff99e

Please sign in to comment.