aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/node/README.md26
-rw-r--r--src/python/README.md63
-rw-r--r--src/ruby/README.md80
-rw-r--r--src/ruby/lib/grpc/version.rb2
-rw-r--r--tools/README.md6
-rw-r--r--tools/jenkins/grpc_jenkins_slave/Dockerfile83
-rwxr-xr-xtools/jenkins/run_jenkins.sh61
7 files changed, 233 insertions, 88 deletions
diff --git a/src/node/README.md b/src/node/README.md
index 6e4934151e..2f4c49096d 100644
--- a/src/node/README.md
+++ b/src/node/README.md
@@ -1,16 +1,22 @@
# Node.js gRPC Library
## Status
-
Alpha : Ready for early adopters
-## Prerequisites
-
-This requires `node` to be installed. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package.
+## PREREQUISITES
+- `node`: This requires `node` to be installed. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package.
+- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core.
-## Installation
+## INSTALLATION
+On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
+Run the following command to install gRPC Node.js.
+```sh
+$ curl -fsSL https://goo.gl/getgrpc | bash -s nodejs
+```
+This will download and run the [gRPC install script][], then install the latest version of gRPC Nodejs npm package.
- 1. Clone [the grpc repository](https://github.com/grpc/grpc).
+## BUILD FROM SOURCE
+ 1. Clone [the grpc Git Repository](https://github.com/grpc/grpc).
2. Follow the instructions in the `INSTALL` file in the root of that repository to install the C core library that this package depends on.
3. Run `npm install`.
@@ -20,12 +26,10 @@ If you install the gRPC C core library in a custom location, then you need to se
CXXFLAGS=-I<custom location>/include LDFLAGS=-L<custom location>/lib npm install [grpc]
```
-## Tests
-
+## TESTING
To run the test suite, simply run `npm test` in the install location.
## API
-
This library internally uses [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js), and some structures it exports match those exported by that library
If you require this module, you will get an object with the following members
@@ -82,3 +86,7 @@ ServerCredentials
```
An object with factory methods fro creating credential objects for servers.
+
+[homebrew]:http://brew.sh
+[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation
+[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
diff --git a/src/python/README.md b/src/python/README.md
index c67201b670..0bca457a33 100644
--- a/src/python/README.md
+++ b/src/python/README.md
@@ -1,25 +1,30 @@
gRPC Python
=========
-
The Python facility of gRPC.
-
Status
-------
-
Alpha : Ready for early adopters
-Prerequisites
------------------------
-
-Python 2.7, virtualenv, pip, libprotobuf-dev, and libprotoc-dev.
-
+PREREQUISITES
+-------------
+- Python 2.7, virtualenv, pip
+- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core.
-Building from source
-----------------------
+INSTALLATION
+-------------
+On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
+Run the following command to install gRPC Python.
+```sh
+$ curl -fsSL https://goo.gl/getgrpc | bash -s python
+```
+This will download and run the [gRPC install script][], then install the latest version of the gRPC Python package. It also installs the Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin for python.
+BUILDING FROM SOURCE
+---------------------
+- Clone this repository
- Build the gRPC core from the root of the
- [gRPC git repo](https://github.com/grpc/grpc)
+ [gRPC Git repository](https://github.com/grpc/grpc)
```
$ make shared_c static_c
```
@@ -29,40 +34,16 @@ $ make shared_c static_c
$ tools/run_tests/build_python.sh
```
-
-Testing
------------------------
+TESTING
+-------
- Use run_python.sh to run gRPC as it was installed into the virtual environment
```
$ tools/run_tests/run_python.sh
```
-
-Installing
------------------------
-
-- Install the gRPC core
- - [Debian package](https://github.com/grpc/grpc/releases)
- ```
- $ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc_0.5.0_amd64.deb
- $ wget https://github.com/grpc/grpc/releases/download/release-0_5_0/libgrpc-dev_0.5.0_amd64.deb
- $ sudo dpkg -i libgrpc_0.5.0_amd64.deb libgrpc-dev_0.5.0_amd64.deb
- ```
- - [From source](https://github.com/grpc/grpc/blob/master/INSTALL)
-
-- Install gRPC Python's dependencies
-```
-$ pip install -r src/python/requirements.txt
-```
-
-- Install gRPC Python
-```
-$ pip install src/python/src
-```
-
-Packaging to PyPI
------------------------
+PACKAGING
+---------
- Install packaging dependencies
```
@@ -73,3 +54,7 @@ $ pip install setuptools twine
```
$ ../../tools/distrib/python/submit.py
```
+
+[homebrew]:http://brew.sh
+[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation
+[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
diff --git a/src/ruby/README.md b/src/ruby/README.md
index 9c0eef49b0..4b657c0bd4 100644
--- a/src/ruby/README.md
+++ b/src/ruby/README.md
@@ -4,48 +4,44 @@ gRPC Ruby
A Ruby implementation of gRPC.
Status
--------
+------
Alpha : Ready for early adopters
-INSTALLATION PREREQUISITES
---------------------------
+PREREQUISITES
+-------------
-This requires Ruby 2.1, as the RPC API surface uses keyword args.
+- Ruby 2.x. The gRPC API uses keyword args.
+- [homebrew][] on Mac OS X, [linuxbrew][] on Linux. These simplify the installation of the gRPC C core.
-
-QUICK - INSTALL
+INSTALLATION
---------------
-
-- Clone this repository.
-- Follow the instructions in [INSTALL](../../INSTALL) to install the gRPC C core.
-- If you don't have Ruby 2.1 installed, switch to the more detailed instructions below
-- Use bundler to install
+On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][].
+Run the following command to install gRPC Ruby.
```sh
-$ # from this directory
-$ gem install bundler && bundle install
+$ curl -fsSL https://goo.gl/getgrpc | bash -s ruby
```
+This will download and run the [gRPC install script][], then install the latest version of gRPC Ruby gem. It also installs Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin for ruby.
-Installing from source
-----------------------
-
+BUILD FROM SOURCE
+---------------------
+- Clone this repository
- Build the gRPC C core
-E.g, from the root of the gRPC [git repo](https://github.com/google/grpc)
+E.g, from the root of the gRPC [Git repository](https://github.com/google/grpc)
```sh
$ cd ../..
$ make && sudo make install
```
-- Install Ruby 2.1. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling
+- Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling
the exact ruby version that's used.
```sh
$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
-$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=ruby-2.1
+$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=ruby-2
$
$ # follow the instructions to ensure that your're using the latest stable version of Ruby
$ # and that the rvm command is installed
```
-
- Make sure your run `source $HOME/.rvm/scripts/rvm` as instructed to complete the set up of RVM
- Install [bundler](http://bundler.io/)
@@ -53,30 +49,36 @@ $ # and that the rvm command is installed
$ gem install bundler
```
-- Finally, install the gRPC gem locally.
+- Finally, build and install the gRPC gem locally.
```sh
$ # from this directory
$ bundle install # creates the ruby bundle, including building the grpc extension
$ rake # runs the unit tests, see rake -T for other options
```
+DOCUMENTATION
+-------------
+- rubydoc for the gRPC gem is available online at [rubydoc][].
+- the gRPC Ruby reference documentation is available online at [grpc.io][]
+
CONTENTS
--------
-
-Directory structure is the layout for [ruby extensions](http://guides.rubygems.org/gems-with-extensions/)
-
-- ext:
- the gRPC ruby extension
-- lib:
- the entrypoint gRPC ruby library to be used in a 'require' statement
-- spec:
- Rspec unittest
-- bin:
- example gRPC clients and servers, e.g,
-```ruby
-stub = Math::Math::Stub.new('my.test.math.server.com:8080')
-req = Math::DivArgs.new(dividend: 7, divisor: 3)
-logger.info("div(7/3): req=#{req.inspect}")
-resp = stub.div(req)
-logger.info("Answer: #{resp.inspect}")
-```
+Directory structure is the layout for [ruby extensions][]
+- ext: the gRPC ruby extension
+- lib: the entrypoint gRPC ruby library to be used in a 'require' statement
+- spec: Rspec unittests
+- bin: example gRPC clients and servers, e.g,
+
+ ```ruby
+ stub = Math::Math::Stub.new('my.test.math.server.com:8080')
+ req = Math::DivArgs.new(dividend: 7, divisor: 3)
+ GRPC.logger.info("div(7/3): req=#{req.inspect}")
+ resp = stub.div(req)
+ GRPC.logger.info("Answer: #{resp.inspect}")
+ ```
+[homebrew]:http://brew.sh
+[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation
+[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
+[ruby extensions]:http://guides.rubygems.org/gems-with-extensions/
+[rubydoc]: http://www.rubydoc.info/gems/grpc
+[grpc.io]: http://www.grpc.io/docs/installation/ruby.html
diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb
index 40b6df9a2b..8588bfd808 100644
--- a/src/ruby/lib/grpc/version.rb
+++ b/src/ruby/lib/grpc/version.rb
@@ -29,5 +29,5 @@
# GRPC contains the General RPC module.
module GRPC
- VERSION = '0.9.0'
+ VERSION = '0.9.2'
end
diff --git a/tools/README.md b/tools/README.md
index 1dbbad886f..3daf73228c 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -1,5 +1,11 @@
buildgen: contains the template renderer for our build system.
+
distpackages: contains script to generate debian packages.
+
dockerfile: contains all of the docker files to test gRPC.
+
gce_setup: contains boilerplate for running the docker files under GCE.
+
+jenkins: support for running tests on Jenkins
+
run_tests: contains python scripts to properly run the tests in parallel.
diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile
new file mode 100644
index 0000000000..a98ad6f552
--- /dev/null
+++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile
@@ -0,0 +1,83 @@
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# A work-in-progress Dockerfile that allows running gRPC test suites
+# inside a docker container.
+
+FROM debian:wheezy
+
+# Install Git.
+RUN apt-get update && apt-get install -y \
+ autoconf \
+ autotools-dev \
+ build-essential \
+ bzip2 \
+ curl \
+ gcc \
+ git \
+ libc6 \
+ libc6-dbg \
+ libc6-dev \
+ libgtest-dev \
+ libtool \
+ make \
+ strace \
+ python-dev \
+ python-setuptools \
+ telnet \
+ unzip \
+ wget \
+ zip && apt-get clean
+
+##################
+# C++ dependencies
+RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev
+
+#################
+# C# dependencies
+
+# Update to a newer version of mono
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
+
+# Install dependencies
+RUN apt-get update && apt-get install -y \
+ mono-devel \
+ nunit \
+ nunit-console \
+ monodevelop
+
+# Download NuGet
+RUN cd /var/local && wget www.nuget.org/NuGet.exe
+ENV NUGET mono /var/local/NuGet.exe
+
+# TODO(jtattermusch): add dependencies for other languages
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh
new file mode 100755
index 0000000000..417cf92565
--- /dev/null
+++ b/tools/jenkins/run_jenkins.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# This script is invoked by Jenkins and triggers a test run based on
+# env variable settings.
+#
+# To prevent cygwin bash complaining about empty lines ending with \r
+# we set the igncr option. The option doesn't exist on Linux, so we fallback
+# to just 'set -ex' there.
+# NOTE: No empty lines should appear in this file before igncr is set!
+set -ex -o igncr || set -ex
+
+if [ "$platform" == "linux" ]
+then
+ echo "building $language on Linux"
+
+ # Run tests inside docker
+ docker run grpc/grpc_jenkins_slave bash -c "git clone --recursive $GIT_URL /var/local/git/grpc \
+ && cd /var/local/git/grpc && git checkout -f $GIT_COMMIT \
+ && git submodule update \
+ && tools/run_tests/run_tests.py -t -l $language"
+elif [ "$platform" == "windows" ]
+then
+ echo "building $language on Windows"
+
+ # TODO(jtattermusch): integrate nuget restore in a nicer way.
+ /cygdrive/c/nuget/nuget.exe restore vsprojects/grpc.sln
+ /cygdrive/c/nuget/nuget.exe restore src/csharp/Grpc.sln
+
+ python tools/run_tests/run_tests.py -t -l $language
+else
+ echo "Unknown platform $platform"
+ exit 1
+fi