aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/interoptest/lb_interop_fake_servers
diff options
context:
space:
mode:
authorGravatar Alex Polcyn <apolcyn@google.com>2018-06-07 20:08:57 -0700
committerGravatar Alexander Polcyn <apolcyn@google.com>2018-10-23 00:00:08 -0700
commite52d87b53d1364a1ccd67ae4bddaa04b0ebda53a (patch)
treead134e2da4f246a9eef4ccf230b4fb565cedd394 /tools/dockerfile/interoptest/lb_interop_fake_servers
parent333a1dc35b02bcbe9a672451b91b1f29dae33939 (diff)
Add a grpclb-in-DNS interop test suite
Diffstat (limited to 'tools/dockerfile/interoptest/lb_interop_fake_servers')
-rw-r--r--tools/dockerfile/interoptest/lb_interop_fake_servers/Dockerfile34
-rw-r--r--tools/dockerfile/interoptest/lb_interop_fake_servers/build_interop.sh35
2 files changed, 69 insertions, 0 deletions
diff --git a/tools/dockerfile/interoptest/lb_interop_fake_servers/Dockerfile b/tools/dockerfile/interoptest/lb_interop_fake_servers/Dockerfile
new file mode 100644
index 0000000000..22963f7f83
--- /dev/null
+++ b/tools/dockerfile/interoptest/lb_interop_fake_servers/Dockerfile
@@ -0,0 +1,34 @@
+# Copyright 2015 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM golang:1.10
+
+RUN apt-get update && apt-get install -y \
+ dnsutils \
+ git \
+ vim \
+ curl \
+ python-pip \
+ python-yaml \
+ make && apt-get clean
+
+RUN ln -s /usr/local/go/bin/go /usr/local/bin
+
+# Install Python packages from PyPI
+RUN pip install --upgrade pip==10.0.1
+RUN pip install virtualenv
+RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/dockerfile/interoptest/lb_interop_fake_servers/build_interop.sh b/tools/dockerfile/interoptest/lb_interop_fake_servers/build_interop.sh
new file mode 100644
index 0000000000..1846d51753
--- /dev/null
+++ b/tools/dockerfile/interoptest/lb_interop_fake_servers/build_interop.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2015 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Gets a built Go interop server, fake balancer server, and python
+# DNS server into a base image.
+set -e
+
+# Clone just the grpc-go source code without any dependencies.
+# We are cloning from a local git repo that contains the right revision
+# to test instead of using "go get" to download from Github directly.
+git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc
+
+# Get all gRPC Go dependencies
+(cd src/google.golang.org/grpc && make deps && make testdeps)
+
+# Build the interop server and fake balancer
+(cd src/google.golang.org/grpc/interop/server && go install)
+(cd src/google.golang.org/grpc/interop/fake_grpclb && go install)
+
+# Clone the grpc/grpc repo to get the python DNS server.
+# Hack: we don't need to init submodules for the scripts we need.
+mkdir -p /var/local/git/grpc
+git clone /var/local/jenkins/grpc /var/local/git/grpc