summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/runner
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-03-30 10:43:31 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-30 10:44:55 -0700
commit4aee3706406d6b102540ad5bea272b7c893da827 (patch)
tree3fb159987149d9daf153a8f7af03f5b6a6757817 /benchmarks/runner
parent1876f10e150a89b871e0d9a15d627f88aba1ddd2 (diff)
Internal change.
PiperOrigin-RevId: 303773475
Diffstat (limited to 'benchmarks/runner')
-rw-r--r--benchmarks/runner/__init__.py7
-rw-r--r--benchmarks/runner/commands.py7
2 files changed, 11 insertions, 3 deletions
diff --git a/benchmarks/runner/__init__.py b/benchmarks/runner/__init__.py
index ba27dc69f..ca785a148 100644
--- a/benchmarks/runner/__init__.py
+++ b/benchmarks/runner/__init__.py
@@ -120,8 +120,8 @@ def run_mock(ctx, **kwargs):
@runner.command("run-gcp", commands.GCPCommand)
@click.pass_context
-def run_gcp(ctx, image_file: str, zone_file: str, machine_type: str,
- installers: List[str], **kwargs):
+def run_gcp(ctx, image_file: str, zone_file: str, internal: bool,
+ machine_type: str, installers: List[str], **kwargs):
"""Runs all benchmarks on GCP instances."""
# Resolve all files.
@@ -137,7 +137,8 @@ def run_gcp(ctx, image_file: str, zone_file: str, machine_type: str,
installers,
ssh_key_file=key_file,
ssh_user=harness.DEFAULT_USER,
- ssh_password="")
+ ssh_password="",
+ internal=internal)
try:
run(ctx, producer, **kwargs)
diff --git a/benchmarks/runner/commands.py b/benchmarks/runner/commands.py
index 0fccb2fad..194804527 100644
--- a/benchmarks/runner/commands.py
+++ b/benchmarks/runner/commands.py
@@ -111,6 +111,12 @@ class GCPCommand(RunCommand):
default=os.path.join(
os.path.dirname(__file__), "../../tools/images/zone.txt"),
)
+ internal = click.core.Option(
+ ("--internal/--no-internal",),
+ help="""Use instance internal IPs. Used if bm-tools runner is running on
+ GCP instance with firewall rules blocking external IPs.""",
+ default=False,
+ )
installers = click.core.Option(
("--installers",),
help="The set of installers to use.",
@@ -124,6 +130,7 @@ class GCPCommand(RunCommand):
self.params.extend([
image_file,
zone_file,
+ internal,
machine_type,
installers,
])