From 039856353764b7682e2e30726a6d8ae3e189102e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Baufaker=20R=C3=AAgo?= Date: Wed, 14 Feb 2018 13:59:37 -0200 Subject: [PATCH] Moving HotRod Containerized to Hotrod folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and some minor adjustments on Dockerfile Signed-off-by: Guilherme Baufaker RĂªgo --- examples/Dockerfile | 4 -- examples/hotrod-containerized/README.md | 41 ------------------- examples/hotrod-containerized/create-image.sh | 3 -- .../hotrod-containerized/docker-compose.yml | 15 ------- examples/hotrod/Dockerfile | 4 ++ examples/hotrod/README.md | 25 +++++++++++ examples/hotrod/create-image.sh | 5 +++ 7 files changed, 34 insertions(+), 63 deletions(-) delete mode 100644 examples/Dockerfile delete mode 100644 examples/hotrod-containerized/README.md delete mode 100755 examples/hotrod-containerized/create-image.sh delete mode 100644 examples/hotrod-containerized/docker-compose.yml create mode 100644 examples/hotrod/Dockerfile create mode 100755 examples/hotrod/create-image.sh diff --git a/examples/Dockerfile b/examples/Dockerfile deleted file mode 100644 index 5ec17863552..00000000000 --- a/examples/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM alpine -EXPOSE 8080 -COPY hotrod / -ENTRYPOINT ./main all diff --git a/examples/hotrod-containerized/README.md b/examples/hotrod-containerized/README.md deleted file mode 100644 index 9f75dc6a498..00000000000 --- a/examples/hotrod-containerized/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Hot R.O.D. - Rides on Demand - Containerized Version - -This is a demo application that consists of several microservices and illustrates -the use of the OpenTracing API. It can be run standalone, but requires Jaeger backend -to view the traces. A tutorial / walkthough is available: - * as a blog post [Take OpenTracing for a HotROD ride][hotrod-tutorial], - * as a video [OpenShift Commons Briefing: Distributed Tracing with Jaeger & Prometheus on Kubernetes][hotrod-openshift]. - -## Features - -* Discover architecture of the whole system via data-driven dependency diagram -* View request timeline & errors, understand how the app works -* Find sources of latency, lack of concurrency -* Highly contextualized logging -* Use baggage propagation to - * Diagnose inter-request contention (queueing) - * Attribute time spent in a service -* Use open source libraries with OpenTracing integration to get vendor-neutral instrumentation for free - - -## Requirements -- go -- docker-compose -- docker -### Creating the images - -``` -chmod +x ./create-image.sh -./create-image.sh -``` - -### Run Everyting -``` -docker-compose up -``` - -Then open http://127.0.0.1:8080 - - -[hotrod-tutorial]: https://medium.com/@YuriShkuro/take-opentracing-for-a-hotrod-ride-f6e3141f7941 -[hotrod-openshift]: https://blog.openshift.com/openshift-commons-briefing-82-distributed-tracing-with-jaeger-prometheus-on-kubernetes diff --git a/examples/hotrod-containerized/create-image.sh b/examples/hotrod-containerized/create-image.sh deleted file mode 100755 index fd3867452d6..00000000000 --- a/examples/hotrod-containerized/create-image.sh +++ /dev/null @@ -1,3 +0,0 @@ -cd ../hotrod && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main -cd ../ -docker build -t jaegertracing/hotrod -f Dockerfile . diff --git a/examples/hotrod-containerized/docker-compose.yml b/examples/hotrod-containerized/docker-compose.yml deleted file mode 100644 index 73aa99c1794..00000000000 --- a/examples/hotrod-containerized/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -hotrod: - image: "jaegertracing/hotrod" - ports: - - "8080:8080" - - "8081:8081" - - "8082:8082" - - "8083:8083" - links: - - jaeger-all - -jaeger-all: - image: jaegertracing/all-in-one - ports: - - "16686:16686" - - "6831:6831/udp" diff --git a/examples/hotrod/Dockerfile b/examples/hotrod/Dockerfile new file mode 100644 index 00000000000..1abe7acc8d3 --- /dev/null +++ b/examples/hotrod/Dockerfile @@ -0,0 +1,4 @@ +FROM scratch +EXPOSE 8080 +COPY . / +CMD ["./collector-linux", "all"] diff --git a/examples/hotrod/README.md b/examples/hotrod/README.md index cc1c5e78edf..f2958b596fd 100644 --- a/examples/hotrod/README.md +++ b/examples/hotrod/README.md @@ -44,3 +44,28 @@ Then open http://127.0.0.1:8080 [hotrod-tutorial]: https://medium.com/@YuriShkuro/take-opentracing-for-a-hotrod-ride-f6e3141f7941 [hotrod-openshift]: https://blog.openshift.com/openshift-commons-briefing-82-distributed-tracing-with-jaeger-prometheus-on-kubernetes/ + + + +# HotROD on Containerized Version +## Requirements +- go +- docker-compose +- docker +### Creating the images + +``` +chmod +x ./create-image.sh +./create-image.sh +``` + +### Run Everyting +``` +docker-compose up +``` + +Then open http://127.0.0.1:8080 + + +[hotrod-tutorial]: https://medium.com/@YuriShkuro/take-opentracing-for-a-hotrod-ride-f6e3141f7941 +[hotrod-openshift]: https://blog.openshift.com/openshift-commons-briefing-82-distributed-tracing-with-jaeger-prometheus-on-kubernetes diff --git a/examples/hotrod/create-image.sh b/examples/hotrod/create-image.sh new file mode 100755 index 00000000000..b358cfbb469 --- /dev/null +++ b/examples/hotrod/create-image.sh @@ -0,0 +1,5 @@ +cd $GOPATH/src/github.com/jaegertracing/jaeger +make install +cd $GOPATH/src/github.com/jaegertracing/jaeger/examples/hotrod +CGO_ENABLED=0 GOOS=linux installsuffix=cgo go build -o collector-linux main.go +docker build -t jaegertracing/hotrod -f Dockerfile .