New config for node. Made some changes to support node config

pull/6084/head
Sree Kuchibhotla 9 years ago
parent b0d4add3a0
commit 7a05436ac1
  1. 40
      templates/tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile.template
  2. 9
      templates/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile.template
  3. 0
      tools/dockerfile/stress_test/grpc_interop_stress_cxx/Dockerfile
  4. 0
      tools/dockerfile/stress_test/grpc_interop_stress_cxx/build_interop_stress.sh
  5. 95
      tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile
  6. 48
      tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh
  7. 9
      tools/gcp/stress_test/run_client.py
  8. 4
      tools/gcp/stress_test/run_server.py
  9. 8
      tools/jenkins/build_interop_stress_image.sh
  10. 12
      tools/run_tests/stress_test/configs/asan.json
  11. 84
      tools/run_tests/stress_test/configs/node.json
  12. 24
      tools/run_tests/stress_test/configs/opt-tsan-asan.json
  13. 12
      tools/run_tests/stress_test/configs/opt.json
  14. 12
      tools/run_tests/stress_test/configs/tsan.json
  15. 26
      tools/run_tests/stress_test/run_on_gke.py

@ -0,0 +1,40 @@
%YAML 1.2
--- |
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FROM debian:jessie
<%include file="../../apt_get_basic.include"/>
<%include file="../../ccache_setup.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../clang_update.include"/>
# Define the default command.
CMD ["bash"]

@ -31,10 +31,9 @@
FROM debian:jessie
<%include file="../apt_get_basic.include"/>
<%include file="../ccache_setup.include"/>
<%include file="../cxx_deps.include"/>
<%include file="../gcp_api_libraries.include"/>
<%include file="../clang_update.include"/>
<%include file="../../apt_get_basic.include"/>
<%include file="../../node_deps.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]

@ -0,0 +1,95 @@
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FROM debian:jessie
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
autoconf \
autotools-dev \
build-essential \
bzip2 \
ccache \
curl \
gcc \
gcc-multilib \
git \
golang \
gyp \
lcov \
libc6 \
libc6-dbg \
libc6-dev \
libgtest-dev \
libtool \
make \
perl \
strace \
python-dev \
python-setuptools \
python-yaml \
telnet \
unzip \
wget \
zip && apt-get clean
#================
# Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean
#==================
# Node dependencies
# Install nvm
RUN touch .profile
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache"
# Google Cloud platform API libraries
RUN apt-get update && apt-get install -y python-pip && apt-get clean
RUN pip install --upgrade google-api-python-client
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
RUN ln -s /usr/bin/ccache /usr/local/bin/cc
RUN ln -s /usr/bin/ccache /usr/local/bin/c++
RUN ln -s /usr/bin/ccache /usr/local/bin/clang
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
#======================
# Zookeeper dependencies
# TODO(jtattermusch): is zookeeper still needed?
RUN apt-get install -y libzookeeper-mt-dev
RUN mkdir /var/local/jenkins
# Define the default command.
CMD ["bash"]

@ -0,0 +1,48 @@
#!/bin/bash
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Builds Node interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc
nvm use 0.12
nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell
make install-certs
# build Node interop client & server
npm install -g node-gyp
npm install --unsafe-perm --build-from-source

@ -91,9 +91,9 @@ def run_client():
"""
env = dict(os.environ)
image_type = env['STRESS_TEST_IMAGE_TYPE']
image_name = env['STRESS_TEST_IMAGE']
stress_client_cmd = env['STRESS_TEST_CMD'].split()
args_str = env['STRESS_TEST_ARGS_STR']
metrics_client_image = env['METRICS_CLIENT_IMAGE']
metrics_client_cmd = env['METRICS_CLIENT_CMD'].split()
metrics_client_args_str = env['METRICS_CLIENT_ARGS_STR']
run_id = env['RUN_ID']
pod_name = env['POD_NAME']
@ -125,9 +125,8 @@ def run_client():
# Update status that the test is starting (in the status table)
bq_helper.insert_summary_row(EventType.STARTING, details)
metrics_cmd = [metrics_client_image
] + [x for x in metrics_client_args_str.split()]
stress_cmd = [image_name] + [x for x in args_str.split()]
metrics_cmd = metrics_client_cmd + [x for x in metrics_client_args_str.split()]
stress_cmd = stress_client_cmd + [x for x in args_str.split()]
print 'Launching process %s ...' % stress_cmd
stress_p = subprocess.Popen(args=stress_cmd,

@ -62,7 +62,7 @@ def run_server():
run_id = env['RUN_ID'] # The unique run id for this test
image_type = env['STRESS_TEST_IMAGE_TYPE']
image_name = env['STRESS_TEST_IMAGE']
stress_server_cmd = env['STRESS_TEST_CMD'].split()
args_str = env['STRESS_TEST_ARGS_STR']
pod_name = env['POD_NAME']
project_id = env['GCP_PROJECT_ID']
@ -98,7 +98,7 @@ def run_server():
# Update status that the test is starting (in the status table)
bq_helper.insert_summary_row(EventType.STARTING, details)
stress_cmd = [image_name] + [x for x in args_str.split()]
stress_cmd = stress_server_cmd + [x for x in args_str.split()]
print 'Launching process %s ...' % stress_cmd
stress_p = subprocess.Popen(args=stress_cmd,

@ -35,7 +35,7 @@ set -x
# Params:
# INTEROP_IMAGE - Name of tag of the final interop image
# INTEROP_IMAGE_TAG - Optional. If set, the created image will be tagged using
# INTEROP_IMAGE_REPOSITORY_TAG - Optional. If set, the created image will be tagged using
# the command: 'docker tag $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG'
# BASE_NAME - Base name used to locate the base Dockerfile and build script
# BUILD_TYPE - The 'CONFIG' variable passed to the 'make' command (example:
@ -59,10 +59,10 @@ then
fi
# Use image name based on Dockerfile checksum
BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/$BASE_NAME/Dockerfile | cut -f1 -d\ `
BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/stress_test/$BASE_NAME/Dockerfile | cut -f1 -d\ `
# Make sure base docker image has been built. Should be instantaneous if so.
docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/$BASE_NAME || exit $?
docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/stress_test/$BASE_NAME || exit $?
# Create a local branch so the child Docker script won't complain
git branch -f jenkins-docker
@ -80,7 +80,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)"
-v /tmp/ccache:/tmp/ccache \
--name=$CONTAINER_NAME \
$BASE_IMAGE \
bash -l /var/local/jenkins/grpc/tools/dockerfile/$BASE_NAME/build_interop_stress.sh \
bash -l /var/local/jenkins/grpc/tools/dockerfile/stress_test/$BASE_NAME/build_interop_stress.sh \
&& docker commit $CONTAINER_NAME $INTEROP_IMAGE \
&& ( if [ -n "$INTEROP_IMAGE_REPOSITORY_TAG" ]; then docker tag -f $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG ; fi ) \
&& echo "Successfully built image $INTEROP_IMAGE")

@ -17,7 +17,7 @@
"num_stubs_per_channel":10,
"test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
"metrics_port": 8081,
"metrics_collection_interval_secs":60
"metrics_collection_interval_secs":10
},
"metricsPort": 8081,
"metricsArgs": {
@ -29,8 +29,8 @@
"templates": {
"cxx_client_asan": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/asan/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/asan/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/asan/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/asan/metrics_client"
}
}
},
@ -48,7 +48,7 @@
"templates": {
"cxx_server_asan": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/asan/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/asan/interop_server"
}
}
},
@ -74,8 +74,8 @@
"globalSettings": {
"buildDockerImages": true,
"pollIntervalSecs": 60,
"testDurationSecs": 7200,
"pollIntervalSecs": 10,
"testDurationSecs": 60,
"kubernetesProxyPort": 8001,
"datasetIdNamePrefix": "stress_test_asan",
"summaryTableId": "summary",

@ -0,0 +1,84 @@
{
"dockerImages": {
"grpc_stress_node" : {
"buildScript": "tools/jenkins/build_interop_stress_image.sh",
"dockerFileDir": "grpc_interop_stress_node"
}
},
"clientTemplates": {
"baseTemplates": {
"default": {
"wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py",
"pollIntervalSecs": 60,
"clientArgs": {
"num_channels_per_server":5,
"num_stubs_per_channel":10,
"test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
"metrics_port": 8081
},
"metricsPort": 8081,
"metricsArgs": {
"metrics_server_address": "localhost:8081",
"total_only": "true"
}
}
},
"templates": {
"node_client": {
"baseTemplate": "default",
"stressClientCmd": "node /var/local/git/grpc/src/node/stress/stress_client.js",
"metricsClientCmd": "node /var/local/git/grpc/src/node/stress/metrics_client.js"
}
}
},
"serverTemplates": {
"baseTemplates":{
"default": {
"wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py",
"serverPort": 8080,
"serverArgs": {
"port": 8080
}
}
},
"templates": {
"node_server": {
"baseTemplate": "default",
"stressServerCmd": "node /var/local/git/grpc/src/node/interop/interop_server.js"
}
}
},
"testMatrix": {
"serverPodSpecs": {
"node-stress-server": {
"serverTemplate": "node_server",
"dockerImage": "grpc_stress_node",
"numInstances": 1
}
},
"clientPodSpecs": {
"node-stress-client": {
"clientTemplate": "node_client",
"dockerImage": "grpc_stress_node",
"numInstances": 1,
"serverPodSpec": "node-stress-server"
}
}
},
"globalSettings": {
"buildDockerImages": false,
"pollIntervalSecs": 10,
"testDurationSecs": 60,
"kubernetesProxyPort": 8001,
"datasetIdNamePrefix": "stress_test_node",
"summaryTableId": "summary",
"qpsTableId": "qps",
"podWarmupSecs": 10
}
}

@ -27,7 +27,7 @@
"num_stubs_per_channel":10,
"test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
"metrics_port": 8081,
"metrics_collection_interval_secs":60
"metrics_collection_interval_secs":10
},
"metricsPort": 8081,
"metricsArgs": {
@ -39,18 +39,18 @@
"templates": {
"cxx_client_opt": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/opt/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/opt/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/opt/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/opt/metrics_client"
},
"cxx_client_tsan": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/tsan/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/tsan/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/tsan/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/tsan/metrics_client"
},
"cxx_client_asan": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/asan/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/asan/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/asan/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/asan/metrics_client"
}
}
},
@ -68,15 +68,15 @@
"templates": {
"cxx_server_opt": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/opt/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/opt/interop_server"
},
"cxx_server_tsan": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/tsan/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/tsan/interop_server"
},
"cxx_server_asan": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/asan/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/asan/interop_server"
}
}
},
@ -124,8 +124,8 @@
"globalSettings": {
"buildDockerImages": true,
"pollIntervalSecs": 60,
"testDurationSecs": 7200,
"pollIntervalSecs": 10,
"testDurationSecs": 60,
"kubernetesProxyPort": 8001,
"datasetIdNamePrefix": "stress_test_opt_tsan",
"summaryTableId": "summary",

@ -17,7 +17,7 @@
"num_stubs_per_channel":10,
"test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
"metrics_port": 8081,
"metrics_collection_interval_secs":60
"metrics_collection_interval_secs":10
},
"metricsPort": 8081,
"metricsArgs": {
@ -29,8 +29,8 @@
"templates": {
"cxx_client_opt": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/opt/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/opt/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/opt/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/opt/metrics_client"
}
}
},
@ -48,7 +48,7 @@
"templates": {
"cxx_server_opt": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/opt/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/opt/interop_server"
}
}
},
@ -74,8 +74,8 @@
"globalSettings": {
"buildDockerImages": true,
"pollIntervalSecs": 60,
"testDurationSecs": 7200,
"pollIntervalSecs": 10,
"testDurationSecs": 60,
"kubernetesProxyPort": 8001,
"datasetIdNamePrefix": "stress_test_opt",
"summaryTableId": "summary",

@ -17,7 +17,7 @@
"num_stubs_per_channel":10,
"test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1",
"metrics_port": 8081,
"metrics_collection_interval_secs":60
"metrics_collection_interval_secs":10
},
"metricsPort": 8081,
"metricsArgs": {
@ -29,8 +29,8 @@
"templates": {
"cxx_client_tsan": {
"baseTemplate": "default",
"clientImagePath": "/var/local/git/grpc/bins/tsan/stress_test",
"metricsClientImagePath": "/var/local/git/grpc/bins/tsan/metrics_client"
"stressClientCmd": "/var/local/git/grpc/bins/tsan/stress_test",
"metricsClientCmd": "/var/local/git/grpc/bins/tsan/metrics_client"
}
}
},
@ -48,7 +48,7 @@
"templates": {
"cxx_server_tsan": {
"baseTemplate": "default",
"serverImagePath": "/var/local/git/grpc/bins/tsan/interop_server"
"stressServerCmd": "/var/local/git/grpc/bins/tsan/interop_server"
}
}
},
@ -74,8 +74,8 @@
"globalSettings": {
"buildDockerImages": true,
"pollIntervalSecs": 60,
"testDurationSecs": 7200,
"pollIntervalSecs": 10,
"testDurationSecs": 60,
"kubernetesProxyPort": 8001,
"datasetIdNamePrefix": "stress_test_tsan",
"summaryTableId": "summary",

@ -67,12 +67,12 @@ class GlobalSettings:
class ClientTemplate:
""" Contains all the common settings that are used by a stress client """
def __init__(self, name, client_image_path, metrics_client_image_path,
def __init__(self, name, stress_client_cmd, metrics_client_cmd,
metrics_port, wrapper_script_path, poll_interval_secs,
client_args_dict, metrics_args_dict):
self.name = name
self.client_image_path = client_image_path
self.metrics_client_image_path = metrics_client_image_path
self.stress_client_cmd = stress_client_cmd
self.metrics_client_cmd = metrics_client_cmd
self.metrics_port = metrics_port
self.wrapper_script_path = wrapper_script_path
self.poll_interval_secs = poll_interval_secs
@ -83,10 +83,10 @@ class ClientTemplate:
class ServerTemplate:
""" Contains all the common settings used by a stress server """
def __init__(self, name, server_image_path, wrapper_script_path, server_port,
def __init__(self, name, server_cmd, wrapper_script_path, server_port,
server_args_dict):
self.name = name
self.server_image_path = server_image_path
self.server_cmd = server_cmd
self.wrapper_script_path = wrapper_script_path
self.server_port = server_port
self.server_args_dict = server_args_dict
@ -240,7 +240,7 @@ class Gke:
server_env = self.gke_env.copy()
server_env.update({
'STRESS_TEST_IMAGE_TYPE': 'SERVER',
'STRESS_TEST_IMAGE': server_pod_spec.template.server_image_path,
'STRESS_TEST_CMD': server_pod_spec.template.server_cmd,
'STRESS_TEST_ARGS_STR': self._args_dict_to_str(
server_pod_spec.template.server_args_dict)
})
@ -282,11 +282,11 @@ class Gke:
client_env = self.gke_env.copy()
client_env.update({
'STRESS_TEST_IMAGE_TYPE': 'CLIENT',
'STRESS_TEST_IMAGE': client_pod_spec.template.client_image_path,
'STRESS_TEST_CMD': client_pod_spec.template.stress_client_cmd,
'STRESS_TEST_ARGS_STR': self._args_dict_to_str(
client_pod_spec.get_client_args_dict()),
'METRICS_CLIENT_IMAGE':
client_pod_spec.template.metrics_client_image_path,
'METRICS_CLIENT_CMD':
client_pod_spec.template.metrics_client_cmd,
'METRICS_CLIENT_ARGS_STR': self._args_dict_to_str(
client_pod_spec.template.metrics_args_dict),
'POLL_INTERVAL_SECS': str(client_pod_spec.template.poll_interval_secs)
@ -383,7 +383,7 @@ class Config:
for image_name in docker_config_dict.keys():
build_script_path = docker_config_dict[image_name]['buildScript']
dockerfile_dir = docker_config_dict[image_name]['dockerFileDir']
build_type = docker_config_dict[image_name]['buildType']
build_type = docker_config_dict[image_name].get('buildType', 'opt')
docker_images_dict[image_name] = DockerImage(gcp_project_id, image_name,
build_script_path,
dockerfile_dir, build_type)
@ -417,8 +417,8 @@ class Config:
# Create and add ClientTemplate object to the final client_templates_dict
client_templates_dict[template_name] = ClientTemplate(
template_name, temp_dict['clientImagePath'],
temp_dict['metricsClientImagePath'], temp_dict['metricsPort'],
template_name, temp_dict['stressClientCmd'],
temp_dict['metricsClientCmd'], temp_dict['metricsPort'],
temp_dict['wrapperScriptPath'], temp_dict['pollIntervalSecs'],
temp_dict['clientArgs'].copy(), temp_dict['metricsArgs'].copy())
@ -453,7 +453,7 @@ class Config:
# Create and add ServerTemplate object to the final server_templates_dict
server_templates_dict[template_name] = ServerTemplate(
template_name, temp_dict['serverImagePath'],
template_name, temp_dict['stressServerCmd'],
temp_dict['wrapperScriptPath'], temp_dict['serverPort'],
temp_dict['serverArgs'].copy())

Loading…
Cancel
Save