-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix documentation on docker sandboxes (#80)
- Loading branch information
1 parent
cd1c46f
commit 1838951
Showing
3 changed files
with
92 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,2 @@ | ||
To learn about this sandbox and for instructions on how to run it please head over | ||
to the envoy docs | ||
|
||
### Building the Docker image | ||
|
||
The `lyft/envoy` image is a docker image made using `build-envoy/Dockerfile-envoy` | ||
it copies a precompiled envoy binary into a docker image, and installs `curl` | ||
and `pip`. | ||
|
||
The following steps guide you through building your own envoy binary, and | ||
putting that in a clean ubuntu container. | ||
|
||
#### Step 1: Build Envoy | ||
|
||
Using `lyft/envoy-buld` you will compile envoy. | ||
This image has all software needed to build envoy. From your envoy directory: | ||
|
||
```shell | ||
$ pwd | ||
src/envoy | ||
$ docker run -t -i -v <SOURCE_DIR>:/source lyft/envoy-build:latest /bin/bash -c "cd /source && ci/do_ci.sh normal" | ||
``` | ||
|
||
That command will take some time to run because it is compiling an envoy binary. | ||
|
||
#### Step 2: Build image with only envoy binary | ||
|
||
In this step we'll build an image that only has the envoy binary, and none | ||
of the software used to build it. | ||
|
||
```shell | ||
$ pwd | ||
src/envoy/ | ||
$ docker build -f example/Dockerfile-envoy-image -t envoy . | ||
``` | ||
|
||
Now you can use this `envoy` image to build the demo if you change the `FROM` | ||
line in `Dockerfile-frontenvoy` and `Dockerfile-service` | ||
to the [envoy docs](https://lyft.github.io/envoy/docs/install/sandboxes.html#front-proxy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,2 @@ | ||
# envoy-grpc | ||
|
||
This is an example usage of the Envoy [gRPC bridge filter](https://lyft.github.io/envoy/docs/configuration/http_filters/grpc_http1_bridge_filter.html#config-http-filters-grpc-bridge). Included is a gRPC in memory Key/Value store with a Python HTTP client. The Python client makes HTTP/1 requests through the Envoy sidecar process which are upgraded into HTTP/2 gRPC requests. Response trailers are then buffered and sent back to the client as a HTTP/1 header payload. | ||
|
||
## Building the Go service | ||
|
||
```bash | ||
script/bootstrap | ||
script/build | ||
``` | ||
|
||
## Docker compose | ||
|
||
To run the docker compose file, and set up both the Python and the gRPC containers | ||
run: | ||
|
||
```bash | ||
docker-compose up --build | ||
``` | ||
|
||
## Sending requests to the Key/Value store | ||
|
||
```bash | ||
# set a key | ||
docker-compose exec python /client/client.py set foo bar | ||
=> setf foo to bar | ||
|
||
# get a key | ||
docker-compose exec python /client/client.py get foo | ||
=> bar | ||
``` | ||
To learn about this sandbox and for instructions on how to run it please head over | ||
to the [envoy docs](https://lyft.github.io/envoy/docs/install/sandboxes.html#grpc-bridge) |