File tree 10 files changed +110
-12
lines changed
10 files changed +110
-12
lines changed Original file line number Diff line number Diff line change 14
14
- TEST_TYPE=docs
15
15
script :
16
16
- travis lint .travis.yml --skip-completion-check
17
- - docker run -t -i -v $TRAVIS_BUILD_DIR:/source lyft/envoy-build:latest /bin/bash -c "cd /source && ci/do_ci.sh $TEST_TYPE"
17
+ - docker run -t -i -v $TRAVIS_BUILD_DIR:/source lyft/envoy-build:4c887e005b129b28d815d59f9983b1ed3eb9568f /bin/bash -c "cd /source && ci/do_ci.sh $TEST_TYPE"
18
+ - ./ci/docker_push.sh
19
+ - ./ci/verify_examples.sh
Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ FROM ubuntu:14.04
2
2
3
3
ADD build/source/exe/envoy /usr/local/bin/envoy
4
4
RUN apt-get update && apt-get install -y \
5
- curl \
6
- python-pip
5
+ build-essential
6
+ RUN strip /usr/local/bin/envoy
7
+ RUN apt-get purge -y build-essential
Original file line number Diff line number Diff line change 1
1
## Steps to publish new image for Envoy 3rd party dependencies
2
2
3
- Currently this can be done only by Envoy team.
3
+ * Currently this can be done only by Envoy team*
4
4
5
- * Modify [ build_container.sh] ( build_container.sh ) to include steps for building 3rd party library.
6
- * Build image locally by running ` docker build --rm -t lyft/envoy-build:latest . ` from this directory.
7
- * Login into docker hub by running ` docker login ` . Make sure to create account beforehand and get that added to Lyft team.
8
- * Publish image by running ` docker push lyft/envoy-build:latest ` .
5
+ After you have made changes to ` build_container.sh ` and merge them to master:
6
+
7
+ 1 . Checkout master and pull latest changes.
8
+ 2 . Get the SHA of the master commit of your changes to ` build_container.sh ` .
9
+ 3 . From ` ~/envoy/ci/build_container ` run ` update_build_container.sh ` . ** Make sure to have
10
+ DOCKER_USERNAME and DOCKER_PASSWORD environment variables set** . This script will build
11
+ the envoy-build container with the current state of ` build_container.sh ` , tag the image
12
+ with the SHA provided, and push it to Dockerhub.
13
+ 4 . After you have done that, update ` .travis.yml ` to pull the new tagged version of ` lyft/envoy-build ` .
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ read -r -p " Do you have master checked out with most recent changes? [y/N] " response
3
+ if [[ $response =~ ^([yY][eE][sS]| [yY])$ ]]
4
+ then
5
+ TAG=" $( git rev-parse master) "
6
+ docker-machine start default
7
+ eval $( docker-machine env default)
8
+ docker build --rm -t lyft/envoy-build:$TAG .
9
+ docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
10
+ docker push lyft/envoy-build:$TAG
11
+ echo Pushed lyft/envoy-build:$TAG
12
+ docker tag lyft/envoy-build:$TAG lyft/envoy-build:latest
13
+ docker push lyft/envoy-build:latest
14
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -ev
3
+
4
+ if [ " $TEST_TYPE " == " normal" ]
5
+ then
6
+ # this is needed to verify the example images
7
+ docker build -f ci/Dockerfile-envoy-image -t lyft/envoy:latest .
8
+
9
+ # push the envoy image on merge to master
10
+ want_push=' false'
11
+ for branch in " master"
12
+ do
13
+ if [ " $TRAVIS_BRANCH " == " $branch " ]
14
+ then
15
+ want_push=' true'
16
+ fi
17
+ done
18
+ if [ " $TRAVIS_PULL_REQUEST " == " false" ] && [ " $want_push " == " true" ]
19
+ then
20
+ docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
21
+ docker push lyft/envoy:latest
22
+ else
23
+ echo ' Ignoring PR branch for docker push.'
24
+ fi
25
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -ev
3
+ verify () {
4
+ echo $1
5
+ CONTAINER_ID=" $( docker ps -aqf name=$1 ) "
6
+ if [ " false" == " $( docker inspect -f {{.State.Running}} ${CONTAINER_ID} ) " ]
7
+ then
8
+ echo " error: $1 not running"
9
+ exit 1
10
+ fi
11
+ }
12
+
13
+ if [ " $TEST_TYPE " == " normal" ]
14
+ then
15
+ # Test front proxy example
16
+ cd examples/front-proxy
17
+ docker-compose up --build -d
18
+ for CONTAINER_NAME in " frontproxy_front-envoy" " frontproxy_service1" " frontproxy_service2"
19
+ do
20
+ verify $CONTAINER_NAME
21
+ done
22
+ cd ../
23
+
24
+ # Test grpc bridge example
25
+ # install go
26
+ curl -O https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
27
+ tar -xf go1.7.1.linux-amd64.tar.gz
28
+ sudo mv go /usr/local
29
+ export PATH=$PATH :/usr/local/go/bin
30
+ export GOPATH=$HOME /go
31
+ mkdir -p $GOPATH /src/github.com/lyft/envoy/examples/
32
+ cp -r grpc-bridge $GOPATH /src/github.com/lyft/envoy/examples/
33
+ # build example
34
+ cd $GOPATH /src/github.com/lyft/envoy/examples/grpc-bridge
35
+ ./script/bootstrap
36
+ ./script/build
37
+ # verify example works
38
+ docker-compose up --build -d
39
+ for CONTAINER_NAME in " grpcbridge_python" " grpcbridge_grpc"
40
+ do
41
+ verify $CONTAINER_NAME
42
+ done
43
+ else
44
+ echo ' Ignoring non-normal build branch'
45
+ fi
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ of the software used to build it.::
308
308
309
309
$ pwd
310
310
src/envoy/
311
- $ docker build -f examples /Dockerfile-envoy-image -t envoy .
311
+ $ docker build -f ci /Dockerfile-envoy-image -t envoy .
312
312
313
313
Now you can use this ``envoy `` image to build the any of the sandboxes if you change
314
314
the ``FROM `` line in any dockerfile.
Original file line number Diff line number Diff line change 1
1
FROM lyft/envoy:latest
2
2
3
+ RUN apt-get update && apt-get -q install -y \
4
+ curl
3
5
CMD /usr/local/bin/envoy -c /etc/front-envoy.json
Original file line number Diff line number Diff line change 1
1
FROM lyft/envoy:latest
2
2
3
- RUN pip install Flask==0.11.1
3
+ RUN apt-get update && apt-get -q install -y \
4
+ curl \
5
+ python-pip
6
+ RUN pip install -q Flask==0.11.1
4
7
RUN mkdir /code
5
8
ADD ./service.py /code
6
9
ADD ./start_service.sh /usr/local/bin/start_service.sh
Original file line number Diff line number Diff line change 1
1
FROM lyft/envoy:latest
2
2
3
3
RUN apt-get update
4
- RUN apt-get install -y python-dev
5
- RUN pip install grpcio requests
4
+ RUN apt-get -q install -y python-dev \
5
+ python-pip
6
+ RUN pip install -q grpcio requests
6
7
ADD ./client /client
7
8
RUN chmod a+x /client/client.py
8
9
RUN mkdir /var/log/envoy/
You can’t perform that action at this time.
0 commit comments