forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
verify_examples.sh
executable file
·42 lines (38 loc) · 1.03 KB
/
verify_examples.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
verify() {
echo $1
CONTAINER_ID="$(docker ps -aqf name=$1)"
if [ "false" == "$(docker inspect -f {{.State.Running}} ${CONTAINER_ID})" ]
then
echo "error: $1 not running"
exit 1
fi
}
# Test front proxy example
cd examples/front-proxy
docker-compose up --build -d
for CONTAINER_NAME in "frontproxy_front-envoy" "frontproxy_service1" "frontproxy_service2"
do
verify $CONTAINER_NAME
done
cd ../
# Test grpc bridge example
# install go
curl -O https://storage.googleapis.com/golang/go1.13.5.linux-amd64.tar.gz
tar -xf go1.13.5.linux-amd64.tar.gz
sudo mv go /usr/local
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
mkdir -p $GOPATH/src/github.com/envoyproxy/envoy/examples/
cp -r grpc-bridge $GOPATH/src/github.com/envoyproxy/envoy/examples/
# build example
cd $GOPATH/src/github.com/envoyproxy/envoy/examples/grpc-bridge
./script/bootstrap
./script/build
# verify example works
docker-compose up --build -d
for CONTAINER_NAME in "grpcbridge_python" "grpcbridge_grpc"
do
verify $CONTAINER_NAME
done