Skip to content

Commit

Permalink
Add packages for ESP building and tests, and ESP building guide on Ub…
Browse files Browse the repository at this point in the history
…untu (#298)

1. Add the software packages required for building ESP.
2. Add the software packages required for running ESP tests.
3. Add a step-by-step guide for building ESP on Ubuntu 16.04, and running
tests.
  • Loading branch information
lei-tang authored Oct 31, 2017
1 parent 65da420 commit ec40f63
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ To download the Extensible Service Proxy source code, clone the ESP repository:

To find out more about building, running, and testing ESP, please review

* [Build ESP on Ubuntu 16.04](/doc/build-esp-on-ubuntu-16-04.md)
* [ESP Tutorial](/doc/tutorial.md)
* [Testing ESP with Bazel](/doc/testing.md)
* [Run ESP on Kubernetes](/doc/k8s/README.md)
Expand Down
60 changes: 60 additions & 0 deletions doc/build-esp-on-ubuntu-16-04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Build ESP on Ubuntu 16.04 #

This tutorial includes detailed instructions for building
ESP and running ESP tests on Ubuntu 16.04.

# Prerequisites #

Install Ubuntu 16.04 LTS OS.

Install the following software packages:

# Software packages needed for building ESP
sudo apt-get install -y \
g++ git openjdk-8-jdk openjdk-8-source \
pkg-config unzip uuid-dev zip zlib1g-dev

# Software packages needed for building ESP
sudo apt-get install libtool m4 autotools-dev automake
## Install bazel ##

ESP is built using the [bazel](http://bazel.io) build tool.
Follow the bazel [install instructions](https://docs.bazel.build/versions/master/install-ubuntu.html#install-using-binary-installer) to install bazel.
ESP currently requires bazel 0.5.4. For bazel 0.5.4 on Ubuntu,
the binary installer is bazel-0.5.4-installer-linux-x86_64.sh.

*Note:* Bazel is under active development and from time to time, ESP continuous
integration systems are upgraded to a new version of Bazel.
The version of Bazel used by ESP continuous integration systems can be found in
the [linux-install-software](/script/linux-install-software)
script variable `BAZEL_VERSION=<SHA>`.

# Build ESP #

To build ESP, run the following commands in the terminal .

# Clone the ESP repository
git clone https://github.com/cloudendpoints/esp

cd esp

# Initialize Git submodules
git submodule update --init --recursive

# Build ESP binary
bazel build //src/nginx/main:nginx-esp

If the build completes successfully, the ESP binary built is at:

./bazel-bin/src/nginx/main/nginx-esp

# Runn ESP tests #

libio-socket-ssl-perl is needed to run ESP tests:

sudo apt-get install libio-socket-ssl-perl

To run ESP tests, run the following command in the terminal.

bazel test //src/... //third_party:all
7 changes: 6 additions & 1 deletion doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ The ESP binary location is:

# Running unit and integratino tests #

# Run ESP unit and integration tests
libio-socket-ssl-perl is needed to run ESP tests:

sudo apt-get install libio-socket-ssl-perl

Run ESP unit and integration tests:

bazel test //src/... //third_party:all

# Running ASAN and TSAN tests #
Expand Down
10 changes: 9 additions & 1 deletion doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ On Mac OS X, install:

On Linux, install:

# Software packages needed for building ESP
sudo apt-get install -y \
g++ git openjdk-8-jdk openjdk-8-source \
pkg-config unzip uuid-dev zip zlib1g-dev

# Software packages needed for building ESP
sudo apt-get install libtool m4 autotools-dev automake

# Software packages needed for running ESP tests
sudo apt-get install libio-socket-ssl-perl

## Bazel ##

ESP is built using [Bazel](http://bazel.io) build tool. Install
Expand All @@ -37,7 +44,8 @@ script variable `BAZEL_VERSION=<SHA>`.
# Building ESP #

Clone the ESP [GitHub repository](https://github.com/cloudendpoints/esp),
initialize Git submodules, and build ESP using Bazel:
initialize Git submodules, and build ESP using Bazel. Detailed instructions
for building ESP on Ubuntu 16.04 can be found in the [document](/doc/build-esp-on-ubuntu-16-04.md).

# Clone the ESP repository
git clone https://github.com/cloudendpoints/esp
Expand Down

0 comments on commit ec40f63

Please sign in to comment.