Skip to content

cloudendpoints/endpoints-tools

Repository files navigation

Extensible Service Proxy tools

This repository hosts helper tools for the Extensible Service Proxy.

These tools are not official Google products.

Code organization

This repository hosts tools used by the Extensible Service Proxy:

ESP CLI

ESP command line tool (espcli) lets you try out the Extensible Service Proxy on a Kubernetes cluster using a simple two-step deployment process. ESP CLI depends on kubectl and its active kube configuration. You also need a Google Cloud Platform project.

Quick Example

First, bring up a Kubernetes deployment consisting of echo service and echo pods on your GCP cluster:

kubectl create -f echo_http.yaml

Next, run the following command to inject ESP container into echo pods and create a new service called endpoints:

espcli deploy echo endpoints --project MY_PROJECT -e LoadBalancer

Replace MY_PROJECT above with the name of your GCP project. Then make a request to the external IP address of endpoints service as follows:

curl -d '{"message":"hello world"}' -H "content-type:application/json" http://ENDPOINTS_IP/echo

Go to the Endpoints UI and see the detailed logging and monitoring information for the newly created API.

Build instructions

We use Bazel to build the ESP tools. To build espcli, run the following command:

bazel build :espcli

This command fetches all required dependencies and produces a single binary bazel-bin/espcli. To read more about its usage and flags, please consult:

bazel run :espcli -- help

Contributing

Your contributions are welcome. Please follow the contributor guidelines.