From 6ed6036e02c42be3991b971d4018693954bcc281 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 21 Jan 2015 18:17:25 -0800 Subject: [PATCH 1/5] Updates the Java Dockerfiles to pull source from GitHub --- tools/dockerfile/grpc_java/Dockerfile | 3 --- tools/dockerfile/grpc_java_base/Dockerfile | 14 ++++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/dockerfile/grpc_java/Dockerfile b/tools/dockerfile/grpc_java/Dockerfile index 78659dedeb2..c51ee1f214a 100644 --- a/tools/dockerfile/grpc_java/Dockerfile +++ b/tools/dockerfile/grpc_java/Dockerfile @@ -1,9 +1,6 @@ # Dockerfile for the gRPC Java dev image FROM grpc/java_base -# Start the daemon that allows access to private git-on-borg repos -RUN /var/local/git/gcompute-tools/git-cookie-authdaemon - RUN cd /var/local/git/grpc-java/lib/okhttp && \ mvn -pl okhttp -am install RUN cd /var/local/git/grpc-java/lib/netty && \ diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index 44fa52c0e8b..40be7b1c5bd 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -20,14 +20,20 @@ ENV M2_HOME /var/local/apache-maven-3.2.1 ENV PATH $PATH:$JAVA_HOME/bin:$M2_HOME/bin ENV LD_LIBRARY_PATH /usr/local/lib -# Start the daemon that allows access to the protected git-on-borg repos -RUN /var/local/git/gcompute-tools/git-cookie-authdaemon +# Install a GitHub SSH service credential that gives access to the GitHub repo while it's private +# TODO: remove this once the repo is public +ADD .ssh .ssh +RUN chmod 600 .ssh/github.rsa +RUN mkdir -p $HOME/.ssh && echo 'Host github.com' > $HOME/.ssh/config +RUN echo " IdentityFile /.ssh/github.rsa" >> $HOME/.ssh/config +RUN echo 'StrictHostKeyChecking no' >> $HOME/.ssh/config -RUN git clone --recursive https://team.googlesource.com/one-platform-grpc-team/grpc-java /var/local/git/grpc-java +# Get the source from GitHub +RUN git clone --recursive git@github.com:google/grpc-java.git /var/local/git/grpc-java RUN cd /var/local/git/grpc-java/lib/okhttp && \ mvn -pl okhttp -am validate RUN cd /var/local/git/grpc-java/lib/netty && \ mvn -pl codec-http2 -am validate RUN cd /var/local/git/grpc-java && \ - mvn validate \ No newline at end of file + mvn validate From 7d5b1027edccdf9680a8b7c86a587e929ecae2c9 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 22 Jan 2015 12:09:50 -0800 Subject: [PATCH 2/5] Updates java_base to pull in protobuf --- tools/dockerfile/grpc_java_base/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index 40be7b1c5bd..91ee218b479 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -28,6 +28,13 @@ RUN mkdir -p $HOME/.ssh && echo 'Host github.com' > $HOME/.ssh/config RUN echo " IdentityFile /.ssh/github.rsa" >> $HOME/.ssh/config RUN echo 'StrictHostKeyChecking no' >> $HOME/.ssh/config +# Get the protobuf source from GitHub and install it +RUN git clone --recursive git@github.com:google/protobuf.git /var/local/git/protobuf +RUN cd /var/local/git/protobuf && \ + ./autogen.sh && \ + ./configure --prefix=/usr && \ + make -j12 && make check && make install && make clean + # Get the source from GitHub RUN git clone --recursive git@github.com:google/grpc-java.git /var/local/git/grpc-java From 41b6d9aad3a22edfdc7a17b3ed0be2483b93ba67 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Sun, 25 Jan 2015 16:25:03 -0800 Subject: [PATCH 3/5] Switched to using protobuf-2.6.1 for now --- tools/dockerfile/grpc_java_base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index 91ee218b479..15c7b318167 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -29,7 +29,7 @@ RUN echo " IdentityFile /.ssh/github.rsa" >> $HOME/.ssh/config RUN echo 'StrictHostKeyChecking no' >> $HOME/.ssh/config # Get the protobuf source from GitHub and install it -RUN git clone --recursive git@github.com:google/protobuf.git /var/local/git/protobuf +RUN git clone --recursive --branch v2.6.1 git@github.com:google/protobuf.git /var/local/git/protobuf RUN cd /var/local/git/protobuf && \ ./autogen.sh && \ ./configure --prefix=/usr && \ From 12e12a39ab27a19560377d177041065366f2cdd3 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 21 Jan 2015 18:17:25 -0800 Subject: [PATCH 4/5] Updates the Java Dockerfiles to pull source from GitHub --- tools/dockerfile/grpc_java_base/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index 15c7b318167..3271d1b2c2d 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -35,9 +35,6 @@ RUN cd /var/local/git/protobuf && \ ./configure --prefix=/usr && \ make -j12 && make check && make install && make clean -# Get the source from GitHub -RUN git clone --recursive git@github.com:google/grpc-java.git /var/local/git/grpc-java - RUN cd /var/local/git/grpc-java/lib/okhttp && \ mvn -pl okhttp -am validate RUN cd /var/local/git/grpc-java/lib/netty && \ From 3ff195d885dfb155b5d3112cc30a79a462077b33 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Mon, 26 Jan 2015 10:29:46 -0800 Subject: [PATCH 5/5] Updates the java dockerfile and client command to reflect recent flag changes --- tools/dockerfile/grpc_java/Dockerfile | 2 +- tools/gce_setup/grpc_docker.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/dockerfile/grpc_java/Dockerfile b/tools/dockerfile/grpc_java/Dockerfile index c51ee1f214a..f234f514e6f 100644 --- a/tools/dockerfile/grpc_java/Dockerfile +++ b/tools/dockerfile/grpc_java/Dockerfile @@ -10,4 +10,4 @@ RUN cd /var/local/git/grpc-java && \ mvn install # Specify the default command such that the interop server runs on its known testing port -CMD ["/var/local/git/grpc-java/run-test-server.sh", "--transport=HTTP2_NETTY_TLS", "--grpc_version=2", "--port=8030"] +CMD ["/var/local/git/grpc-java/run-test-server.sh", "--use_tls=true", "--port=8030"] diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 145685305c3..d97f8294359 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -655,7 +655,7 @@ grpc_interop_gen_go_cmd() { grpc_interop_gen_java_cmd() { local cmd_prefix="sudo docker run grpc/java"; local test_script="/var/local/git/grpc-java/run-test-client.sh"; - local test_script+=" --transport=NETTY_TLS --grpc_version=2" + local test_script+=" --server_host_override=foo.test.google.com --use_test_ca=true --use_tls=true" local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd } @@ -683,7 +683,7 @@ grpc_interop_gen_php_cmd() { # flags= .... # generic flags to include the command # cmd=$($grpc_gen_test_cmd $flags) grpc_interop_gen_cxx_cmd() { - local cmd_prefix="sudo docker run grpc/cxx"; + local cmd_prefix="sudo docker run grpc/cxx"; local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl"; local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd