Skip to content

Commit

Permalink
Merge ab25c02 into 9fe8cc8
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Baufaker Rêgo committed Feb 16, 2018
2 parents 9fe8cc8 + ab25c02 commit aabe0f8
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 5 deletions.
4 changes: 4 additions & 0 deletions examples/hotrod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM scratch
EXPOSE 8080 8081 8082 8083
COPY hotrod-linux /
CMD ["./hotrod-linux", "all"]
15 changes: 15 additions & 0 deletions examples/hotrod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,18 @@ 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
## Running on Docker
```
docker run -d -p 8080:8080 -p 8082:8082 -p 8083:8083 jaegertracing/hotrod &&
docker run -d -p6831:6831/udp -p16686:16686 jaegertracing/all-in-one:latest
```

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
2 changes: 1 addition & 1 deletion examples/hotrod/cmd/customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ var (
func init() {
RootCmd.AddCommand(customerCmd)

customerCmd.Flags().StringVarP(&customerOptions.serverInterface, "bind", "", "127.0.0.1", "interface to which the Customer server will bind")
customerCmd.Flags().StringVarP(&customerOptions.serverInterface, "bind", "", "0.0.0.0", "interface to which the Customer server will bind")
customerCmd.Flags().IntVarP(&customerOptions.serverPort, "port", "p", 8081, "port on which the Customer server will listen")
}
2 changes: 1 addition & 1 deletion examples/hotrod/cmd/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ var (
func init() {
RootCmd.AddCommand(driverCmd)

driverCmd.Flags().StringVarP(&driverOptions.serverInterface, "bind", "", "127.0.0.1", "interface to which the driver server will bind")
driverCmd.Flags().StringVarP(&driverOptions.serverInterface, "bind", "", "0.0.0.0", "interface to which the driver server will bind")
driverCmd.Flags().IntVarP(&driverOptions.serverPort, "port", "p", 8082, "port on which the driver server will listen")
}
2 changes: 1 addition & 1 deletion examples/hotrod/cmd/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ var (
func init() {
RootCmd.AddCommand(frontendCmd)

frontendCmd.Flags().StringVarP(&frontendOptions.serverInterface, "bind", "", "127.0.0.1", "interface to which the frontend server will bind")
frontendCmd.Flags().StringVarP(&frontendOptions.serverInterface, "bind", "", "0.0.0.0", "interface to which the frontend server will bind")
frontendCmd.Flags().IntVarP(&frontendOptions.serverPort, "port", "p", 8080, "port on which the frontend server will listen")
}
2 changes: 1 addition & 1 deletion examples/hotrod/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Execute() {

func init() {
RootCmd.PersistentFlags().StringVarP(&metricsBackend, "metrics", "m", "expvar", "Metrics backend (expvar|prometheus)")
RootCmd.PersistentFlags().StringVarP(&jAgentHostPort, "jaeger-agent.host-port", "a", "localhost:6831", "String representing jaeger-agent host:port")
RootCmd.PersistentFlags().StringVarP(&jAgentHostPort, "jaeger-agent.host-port", "a", "0.0.0.0:6831", "String representing jaeger-agent host:port")
rand.Seed(int64(time.Now().Nanosecond()))
logger, _ = zap.NewDevelopment()
cobra.OnInitialize(initMetrics)
Expand Down
2 changes: 1 addition & 1 deletion examples/hotrod/cmd/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ var (
func init() {
RootCmd.AddCommand(routeCmd)

routeCmd.Flags().StringVarP(&routeOptions.serverInterface, "bind", "", "127.0.0.1", "interface to which the Route server will bind")
routeCmd.Flags().StringVarP(&routeOptions.serverInterface, "bind", "", "0.0.0.0", "interface to which the Route server will bind")
routeCmd.Flags().IntVarP(&routeOptions.serverPort, "port", "p", 8083, "port on which the Route server will listen")
}
5 changes: 5 additions & 0 deletions examples/hotrod/create-image.sh
Original file line number Diff line number Diff line change
@@ -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 hotrod-linux main.go
docker build -t jaegertracing/hotrod -f Dockerfile .

0 comments on commit aabe0f8

Please sign in to comment.