Switched Protobuf-PHP references to my fork, removed references to git-on-borg

pull/349/head
murgatroid99 10 years ago
parent 1fb40badf1
commit 975a07b949
  1. 27
      src/php/README.md
  2. 3
      tools/dockerfile/grpc_base/README.md
  3. 2
      tools/dockerfile/grpc_java/README.md
  4. 2
      tools/dockerfile/grpc_php/README.md
  5. 6
      tools/dockerfile/grpc_php_base/Dockerfile
  6. 2
      tools/dockerfile/grpc_ruby/README.md
  7. 2
      tools/gce_setup/grpc_docker.sh
  8. 1
      tools/gce_setup/new_grpc_docker_builder.sh
  9. 7
      tools/gce_setup/new_grpc_docker_builder_on_startup.sh
  10. 31
      tools/gce_setup/shared_startup_funcs.sh

@ -7,31 +7,25 @@ Directory structure is as generated by the PHP utility
## ENVIRONMENT ## ENVIRONMENT
To build a PHP environment that works with this extension, download and extract Install `php5` and `php5-dev`.
PHP 5.5 (5.6 may also work), configure it, and install it:
```bash To run the tests, additionally install `php5-readline` and `phpunit`.
apt-get install libxml2 libxml2-dev
curl http://php.net/get/php-5.5.16.tar.gz Alternatively, build and install PHP 5.5 or later from source with standard
tar -xf php-5.5.16.tar.gz configuration options.
cd php-5.5.16
./configure --with-zlib=/usr --with-libxml-dir=ext/libxml --with-openssl=/usr/local/ssl
make
make install
```
To also download and install the patched protoc and PHP code generator: To also download and install protoc and the PHP code generator.
```bash ```bash
apt-get install -y procps apt-get install -y procps
curl -sSL https://get.rvm.io | sudo bash -s stable --ruby curl -sSL https://get.rvm.io | sudo bash -s stable --ruby
git clone sso://team/one-platform-grpc-team/protobuf git clone git@github.com:google/protobuf.git
cd protobuf cd protobuf
./configure ./configure
make make
make install make install
git clone sso://team/one-platform-grpc-team/grpc-php-protobuf-php git clone git@github.com:murgatroid99/Protobuf-PHP.git
cd grpc-php-protobuf-php cd Protobuf-PHP
rake pear:package version=1.0 rake pear:package version=1.0
pear install Protobuf-1.0.tgz pear install Protobuf-1.0.tgz
``` ```
@ -52,5 +46,4 @@ This repo now has PHPUnit tests, which can by run by executing
There is also a generated code test (`./bin/run_gen_code_test.sh`), which tests There is also a generated code test (`./bin/run_gen_code_test.sh`), which tests
the stub `./tests/generated_code/math.php` against a running localhost server the stub `./tests/generated_code/math.php` against a running localhost server
serving the math service. That stub is generated from serving the math service. That stub is generated from
`./tests/generated_code/math.proto` with the head of the repo `./tests/generated_code/math.proto`.
`sso://team/one-platform-grpc-team/grpc-php-protobuf-php`.

@ -4,8 +4,7 @@ Base GRPC Dockerfile
Dockerfile for creating the base gRPC development Docker instance. Dockerfile for creating the base gRPC development Docker instance.
For now, this assumes that the development will be done on GCE instances, with source code on Git-on-Borg. For now, this assumes that the development will be done on GCE instances, with source code on Git-on-Borg.
As of 2014/09/29, it includes As of 2015/02/02, it includes
- git - git
- some useful tools like curl, emacs, strace, telnet etc - some useful tools like curl, emacs, strace, telnet etc
- downloads the gerrit-compute-tools and installs the script that allows access to gerrit when on git-on-borg
- a patched version of protoc, to allow protos with stream tags to work - a patched version of protoc, to allow protos with stream tags to work

@ -5,5 +5,5 @@ Dockerfile for creating the Java development image
As of 2014/12 this As of 2014/12 this
- is based on the gRPC Java base - is based on the gRPC Java base
- pulls from gRPC Java on git-on-borg - pulls from gRPC Java on GitHub
- installs it and runs the tests - installs it and runs the tests

@ -5,6 +5,6 @@ Dockerfile for creating the PHP development instances
As of 2014/10 this As of 2014/10 this
- is based on the GRPC PHP base - is based on the GRPC PHP base
- adds a pull of the HEAD GRPC PHP source from git-on-borg - adds a pull of the HEAD GRPC PHP source from GitHub
- it builds it - it builds it
- runs the tests, i.e, the image won't be created if the tests don't pass - runs the tests, i.e, the image won't be created if the tests don't pass

@ -45,13 +45,9 @@ RUN cd /var/local \
&& ./configure --with-zlib=/usr --with-libxml-dir=ext/libxml \ && ./configure --with-zlib=/usr --with-libxml-dir=ext/libxml \
&& make -j12 && make install && make -j12 && make install
# Start the daemon that allows access to the protected git-on-borg repos
RUN git clone https://gerrit.googlesource.com/gcompute-tools /var/local/git/gcompute-tools
RUN /var/local/git/gcompute-tools/git-cookie-authdaemon
# Download the patched PHP protobuf so that PHP gRPC clients can be generated # Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas. # from proto3 schemas.
RUN git clone https://team.googlesource.com/one-platform-grpc-team/grpc-php-protobuf-php /var/local/git/protobuf-php RUN git clone git@github.com:murgatroid99/Protobuf-PHP.git /var/local/git/protobuf-php
# Install ruby (via RVM) as ruby tools are dependencies for building Protobuf # Install ruby (via RVM) as ruby tools are dependencies for building Protobuf
# PHP extensions. # PHP extensions.

@ -5,6 +5,6 @@ Dockerfile for creating the Ruby development instances
As of 2014/10 this As of 2014/10 this
- is based on the GRPC Ruby base - is based on the GRPC Ruby base
- adds a pull of the HEAD gRPC Ruby source from git-on-borg - adds a pull of the HEAD gRPC Ruby source from GitHub
- it builds it - it builds it
- runs the tests, i.e, the image won't be created if the tests don't pass - runs the tests, i.e, the image won't be created if the tests don't pass

@ -895,7 +895,7 @@ grpc_cloud_prod_gen_java_cmd() {
# constructs the full dockerized php interop test cmd. # constructs the full dockerized php interop test cmd.
# #
# TODO(mlumish): update this to use the script once that's on git-on-borg # TODO(mlumish): update this to use the script once that's on git
# #
# call-seq: # call-seq:
# flags= .... # generic flags to include the command # flags= .... # generic flags to include the command

@ -86,7 +86,6 @@ add_instance() {
[[ -n $the_address ]] && address_flag="--address $the_address" [[ -n $the_address ]] && address_flag="--address $the_address"
local the_image='container-vm-v20140925' local the_image='container-vm-v20140925'
local scopes='compute-rw storage-full' local scopes='compute-rw storage-full'
scopes+=' https://www.googleapis.com/auth/gerritcodereview'
scopes+=' https://www.googleapis.com/auth/xapi.zoo' scopes+=' https://www.googleapis.com/auth/xapi.zoo'
gcloud --project $project compute instances create $instance \ gcloud --project $project compute instances create $instance \
$address_flag \ $address_flag \

@ -3,8 +3,7 @@
# #
# A grpc-docker GCE machine is based on docker container image. # A grpc-docker GCE machine is based on docker container image.
# #
# On startup, it copies the grpc dockerfiles to a local directory, and update its address # On startup, it copies the grpc dockerfiles to a local directory, and update its address.
# so that the docker containers within it have git-on-borg-access.
# _load_metadata curls a metadata url # _load_metadata curls a metadata url
_load_metadata() { _load_metadata() {
@ -54,10 +53,6 @@ main() {
# Install git and emacs # Install git and emacs
apt-get update && apt-get install -y git emacs || return 1 apt-get update && apt-get install -y git emacs || return 1
# Enable access to git repos on git-on-borg
local git_root='/var/local/git'
install_gob_daemon $git_root/gerrit-gcompute-tools || return 1
# Startup the docker registry # Startup the docker registry
grpc_docker_launch_registry && grpc_docker_pull_known grpc_docker_launch_registry && grpc_docker_pull_known

@ -251,37 +251,6 @@ update_address_to() {
} }
} }
# Allows instances to checkout repos on git-on-borg.
#
install_gob_daemon() {
local gob_dir=$1
[[ -n $gob_dir ]] || { echo "missing args: gob_dir" >&2; return 1; }
local gob_repo=$2
[[ -n $gob_repo ]] || gob_repo='https://gerrit.googlesource.com/gcompute-tools/'
if [[ -e $gob_dir ]]
then
rm -fv $gob_dir || {
echo "could not remove existing git repo at $gob_dir" >&2
return 1
}
fi
git clone $gob_repo $gob_dir || { echo "failed to pull gerrit cookie repo" >&2; return 1; }
local startup_script=/etc/profile.d/gob_cookie_daemon.sh
cat <<EOF >> $startup_script
#!/bin/bash
$gob_dir/git-cookie-authdaemon
EOF
chmod 755 $startup_script
$startup_script
}
# grpc_docker_add_docker_group # grpc_docker_add_docker_group
# #
# Adds a docker group, restarts docker, relaunches the docker registry # Adds a docker group, restarts docker, relaunches the docker registry

Loading…
Cancel
Save