Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cc 34532 bo performance tests #29

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/k6:0.47.0-with-browser
FROM grafana/k6:0.56.0-with-browser

ENV TERM=xterm-256color
ENV PROJECT_DIR=/home/k6
Expand Down
85 changes: 0 additions & 85 deletions docker-compose.local.yml

This file was deleted.

106 changes: 44 additions & 62 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.4'

services:
k6:
container_name: "loadtesting_environment"
Expand All @@ -8,30 +6,30 @@ services:
dockerfile: Dockerfile
networks:
- loadtesting
# - spryker_b2b_marketplace_private
# - spryker_b2b_marketplace_dev_private
# - spryker_b2c_marketplace_dev_private
# - spryker_b2b_dev_private
# - spryker_b2c_dev_private
# - spryker_b2b_marketplace_private
# - spryker_b2c_marketplace_private
# - spryker_b2b_private
# - spryker_b2c_private
- spryker_b2b_dev_private
- spryker_b2b_dev_public
# - spryker_demo_private
# - spryker_demo_public
# - spryker_b2b_marketplace_dev_private
# - spryker_b2c_marketplace_dev_private
# - spryker_b2b_dev_private
# - spryker_b2c_dev_private
# - spryker_b2b_marketplace_private
# - spryker_b2c_marketplace_private
# - spryker_b2b_private
# - spryker_b2c_private

environment:
- K6_SCRIPT=${K6_SCRIPT}
- K6_HOSTENV=${K6_HOSTENV}
- K6_HOSTENV=${K6_HOSTENV:-local}
- K6_INSECURE_SKIP_TLS_VERIFY=true
- K6_STATSD_ENABLE_TAGS=true
- K6_OUT=${K6_OUT}
- K6_OUT=
- K6_STATSD_ADDR=${K6_STATSD_ADDR}
- K6_STATSD_NAMESPACE=${K6_STATSD_NAMESPACE}
- K6_HTTP_DEBUG=${K6_HTTP_DEBUG}
- K6_NO_THRESHOLDS=${K6_NO_THRESHOLDS}
- GIT_HASH=${GIT_HASH}
- GIT_BRANCH=${GIT_BRANCH}
- GIT_REPO=${GIT_REPO}
- GIT_TAG=${GIT_TAG}
- BASIC_AUTH_USERNAME=${BASIC_AUTH_USERNAME}
- BASIC_AUTH_PASSWORD=${BASIC_AUTH_PASSWORD}
- K6_BROWSER_DEBUG=${K6_BROWSER_DEBUG}
- K6_NO_THRESHOLDS=${K6_NO_THRESHOLDS:-true}
- DATA_EXCHANGE_PAYLOAD_PUT_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_PUT_CHUNK_SIZE:-100}
- DATA_EXCHANGE_PAYLOAD_PATCH_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_PATCH_CHUNK_SIZE:-100}
- DATA_EXCHANGE_PAYLOAD_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_CHUNK_SIZE:-100}
Expand All @@ -43,52 +41,38 @@ services:
- DATA_EXCHANGE_TWO_LOCALES=${DATA_EXCHANGE_TWO_LOCALES:-1}
- DATA_EXCHANGE_CONCRETE_MAX_AMOUNT=${DATA_EXCHANGE_CONCRETE_MAX_AMOUNT:-1}
- DATA_EXCHANGE_DEBUG=${DATA_EXCHANGE_DEBUG:-0}
- GIT_HASH=${GIT_HASH:-'-'}
- GIT_BRANCH=${GIT_BRANCH:-'-'}
- GIT_REPO=${GIT_REPO:-'-'}
- GIT_TAG=${GIT_TAG:-'-'}
- SPRYKER_TEST_RUN_ID=${SPRYKER_TEST_RUN_ID:-'-'}
- SPRYKER_TEST_RUNNER_HOSTNAME=${SPRYKER_TEST_RUNNER_HOSTNAME:-'-'}
- BASIC_AUTH_USERNAME=${BASIC_AUTH_USERNAME}
- BASIC_AUTH_PASSWORD=${BASIC_AUTH_PASSWORD}
- K6_BROWSER_ENABLED=true
volumes:
- .:/home/k6
ports:
- "6565:6565"
links:
- "nrstatsd"
- "newrelic"

newrelic-php-daemon:
image: newrelic/php-daemon
networks:
- loadtesting

nrstatsd:
container_name: "new_relic_statsd"
image: newrelic/nri-statsd:latest
environment:
- NR_ACCOUNT_ID=${NR_ACCOUNT_ID}
# It appears to be a bug in the statsd image. Despite calling the API key, it only works with a New Relic license key.
- NR_API_KEY=${NRIA_LICENSE_KEY}
- NR_EU_REGION=${NR_EU_REGION}
- NR_LOG_METRICS=true
hostname: "localpocmachine"
ports:
- 8125:8125/udp
networks:
- loadtesting
restart: unless-stopped

newrelic:
container_name: newrelic-infra
image: newrelic/infrastructure:latest
cap_add:
- SYS_PTRACE
network_mode: host
pid: host
privileged: true
volumes:
- "/:/host:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- NRIA_LICENSE_KEY=${NRIA_LICENSE_KEY}
restart: unless-stopped


networks:
loadtesting:
spryker_b2b_dev_private:
external: true
spryker_b2b_dev_public:
external: true
# spryker-cloud_private:
# external: true
# spryker-cloud_public:
# external: true
# spryker_public:
# external: true
# spryker_private:
# external: true
# spryker_demo_public:
# external: true
# spryker_demo_private:
# external: true
# spryker_b2b_marketplace_private:
# external: true
# spryker_b2b_marketplace_dev_private:
Expand All @@ -99,8 +83,6 @@ networks:
# external: true
# spryker_b2b_dev_private:
# external: true
# spryker_b2b_marketplace_private:
# external: true
# spryker_b2c_marketplace_private:
# external: true
# spryker_b2c_private:
Expand Down
115 changes: 115 additions & 0 deletions docker-compose_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
version: '3.4'

services:
k6:
container_name: "loadtesting_environment"
build:
context: .
dockerfile: Dockerfile
networks:
- loadtesting
- spryker_b2b_dev_private
- spryker_b2b_dev_public
# - spryker_b2b_marketplace_private
# - spryker_b2b_marketplace_dev_private
# - spryker_b2c_marketplace_dev_private
# - spryker_b2b_dev_private
# - spryker_b2c_dev_private
# - spryker_b2b_marketplace_private
# - spryker_b2c_marketplace_private
# - spryker_b2b_private
# - spryker_b2c_private
environment:
- K6_SCRIPT=${K6_SCRIPT}
- K6_HOSTENV=${K6_HOSTENV}
- K6_STATSD_ENABLE_TAGS=true
- K6_OUT=${K6_OUT}
- K6_STATSD_ADDR=${K6_STATSD_ADDR}
- K6_STATSD_NAMESPACE=${K6_STATSD_NAMESPACE}
- K6_HTTP_DEBUG=${K6_HTTP_DEBUG}
- K6_NO_THRESHOLDS=${K6_NO_THRESHOLDS}
- GIT_HASH=${GIT_HASH}
- GIT_BRANCH=${GIT_BRANCH}
- GIT_REPO=${GIT_REPO}
- GIT_TAG=${GIT_TAG}
- BASIC_AUTH_USERNAME=${BASIC_AUTH_USERNAME}
- BASIC_AUTH_PASSWORD=${BASIC_AUTH_PASSWORD}
- DATA_EXCHANGE_PAYLOAD_PUT_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_PUT_CHUNK_SIZE:-100}
- DATA_EXCHANGE_PAYLOAD_PATCH_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_PATCH_CHUNK_SIZE:-100}
- DATA_EXCHANGE_PAYLOAD_CHUNK_SIZE=${DATA_EXCHANGE_PAYLOAD_CHUNK_SIZE:-100}
- DATA_EXCHANGE_TARGET_CATALOG_SIZE_POST=${DATA_EXCHANGE_TARGET_CATALOG_SIZE_POST:-3000}
- DATA_EXCHANGE_TARGET_CATALOG_SIZE_PUT_PATCH=${DATA_EXCHANGE_TARGET_CATALOG_SIZE_PUT_PATCH:-1000}
- DATA_EXCHANGE_THREADS_PATCH=${DATA_EXCHANGE_THREADS_PATCH:-1}
- DATA_EXCHANGE_THREADS_PUT=${DATA_EXCHANGE_THREADS_PUT:-1}
- DATA_EXCHANGE_THREADS_POST=${DATA_EXCHANGE_THREADS_POST:-1}
- DATA_EXCHANGE_TWO_LOCALES=${DATA_EXCHANGE_TWO_LOCALES:-1}
- DATA_EXCHANGE_CONCRETE_MAX_AMOUNT=${DATA_EXCHANGE_CONCRETE_MAX_AMOUNT:-1}
- DATA_EXCHANGE_DEBUG=${DATA_EXCHANGE_DEBUG:-0}
volumes:
- .:/home/k6
ports:
- "6565:6565"
links:
- "nrstatsd"
- "newrelic"

newrelic-php-daemon:
image: newrelic/php-daemon
networks:
- loadtesting

nrstatsd:
container_name: "new_relic_statsd"
image: newrelic/nri-statsd:latest
environment:
- NR_ACCOUNT_ID=${NR_ACCOUNT_ID}
# It appears to be a bug in the statsd image. Despite calling the API key, it only works with a New Relic license key.
- NR_API_KEY=${NRIA_LICENSE_KEY}
- NR_EU_REGION=${NR_EU_REGION}
- NR_LOG_METRICS=true
hostname: "localpocmachine"
ports:
- 8125:8125/udp
networks:
- loadtesting
restart: unless-stopped

newrelic:
container_name: newrelic-infra
image: newrelic/infrastructure:latest
cap_add:
- SYS_PTRACE
network_mode: host
pid: host
privileged: true
volumes:
- "/:/host:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- NRIA_LICENSE_KEY=${NRIA_LICENSE_KEY}
restart: unless-stopped

networks:
loadtesting:
spryker_b2b_dev_private:
external: true
spryker_b2b_dev_public:
external: true
# spryker_b2b_marketplace_private:
# external: true
# spryker_b2b_marketplace_dev_private:
# external: true
# spryker_b2c_marketplace_dev_private:
# external: true
# spryker_b2c_dev_private:
# external: true
# spryker_b2b_dev_private:
# external: true
# spryker_b2b_marketplace_private:
# external: true
# spryker_b2c_marketplace_private:
# external: true
# spryker_b2c_private:
# external: true
# spryker_b2b_private:
# external: true
3 changes: 2 additions & 1 deletion environments/B2B.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"storefrontApiUrl": "http://glue.%store%.spryker.local",
"backofficeUrl": "http://backoffice.%store%.spryker.local",
"backofficeApiUrl": "http://backend-api.%store%.spryker.local",
"stores": ["eu", "us"]
"stores": ["eu", "us"],
"backofficeSessionKey": "backoffice-%store%-spryker-local"
},
"testing": {
"storefrontUrl": "https://yves.%store%.spryker-b2bperformance.cloud.spryker.toys",
Expand Down
Loading