diff options
author | Xudong Ma <simonma@google.com> | 2015-05-29 14:49:02 -0700 |
---|---|---|
committer | Xudong Ma <simonma@google.com> | 2015-05-29 14:49:02 -0700 |
commit | 8cbc2506d56af103a6691648eba660aac874f6a3 (patch) | |
tree | 7b49f65bf7a6dd07b6e2f4d4d5f77b4ac4b8039e /tools | |
parent | 7181d85f8b011fc2d2ab70f85bb866f34b2271e2 (diff) |
Enable service_account_creds test and compute_engine_creds for gRpc-java.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dockerfile/grpc_java/Dockerfile | 3 | ||||
-rwxr-xr-x | tools/gce_setup/grpc_docker.sh | 34 | ||||
-rwxr-xr-x | tools/gce_setup/shared_startup_funcs.sh | 3 |
3 files changed, 36 insertions, 4 deletions
diff --git a/tools/dockerfile/grpc_java/Dockerfile b/tools/dockerfile/grpc_java/Dockerfile index fa67cb2627..c20ab4687c 100644 --- a/tools/dockerfile/grpc_java/Dockerfile +++ b/tools/dockerfile/grpc_java/Dockerfile @@ -36,5 +36,8 @@ RUN cd /var/local/git/grpc-java/lib/netty && \ RUN cd /var/local/git/grpc-java && \ ./gradlew build installDist +# Add a service_account directory containing the auth creds file +ADD service_account service_account + # 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", "--use_tls=true", "--port=8030"] diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 123d0615b4..b53aa98aab 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -1274,8 +1274,7 @@ grpc_cloud_prod_gen_go_cmd() { # cmd=$($grpc_gen_test_cmd $flags) 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+=" --use_test_ca=true --use_tls=true" + local test_script="/var/local/git/grpc-java/run-test-client.sh --use_test_ca=true --use_tls=true"; local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd } @@ -1287,13 +1286,40 @@ grpc_interop_gen_java_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_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+=" --use_tls=true" + local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true"; local gfe_flags=$(_grpc_prod_gfe_flags) local the_cmd="$cmd_prefix $test_script $gfe_flags $@"; echo $the_cmd } +# constructs the full dockerized java service_account auth interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_service_account_creds_gen_java_cmd() { + local cmd_prefix="sudo docker run grpc/java"; + local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true"; + local gfe_flags=$(_grpc_prod_gfe_flags) + local added_gfe_flags=$(_grpc_svc_acc_test_flags) + local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; + echo $the_cmd +} + +# constructs the full dockerized java gce auth interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_compute_engine_creds_gen_java_cmd() { + local cmd_prefix="sudo docker run grpc/java"; + local test_script="/var/local/git/grpc-java/run-test-client.sh --use_tls=true"; + local gfe_flags=$(_grpc_prod_gfe_flags) + local added_gfe_flags=$(_grpc_gce_test_flags) + local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; + echo $the_cmd +} + # constructs the full dockerized php interop test cmd. # # TODO(mlumish): update this to use the script once that's on git diff --git a/tools/gce_setup/shared_startup_funcs.sh b/tools/gce_setup/shared_startup_funcs.sh index a3a3b59c8a..60cd9f6897 100755 --- a/tools/gce_setup/shared_startup_funcs.sh +++ b/tools/gce_setup/shared_startup_funcs.sh @@ -413,6 +413,9 @@ grpc_dockerfile_install() { [[ $image_label == "grpc/java_base" ]] && { grpc_docker_sync_github_key $dockerfile_dir/.ssh 'java_base_ssh_key' || return 1; } + [[ $image_label == "grpc/java" ]] && { + grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; + } [[ $image_label == "grpc/ruby" ]] && { grpc_docker_sync_roots_pem $dockerfile_dir/cacerts || return 1; grpc_docker_sync_service_account $dockerfile_dir/service_account || return 1; |