Skip to content

Commit

Permalink
Use docker to run example
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Jul 15, 2021
1 parent 312969b commit 7c24c2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
GOBUILD=CGO_ENABLED=0 installsuffix=cgo go build -trimpath

TOOLS_MOD_DIR = ./internal/tools

JAEGER_ALL_IN_ONE ?= ${HOME}/projects/jaegertracing/jaeger/cmd/all-in-one/all-in-one-linux-amd64

.PHONY: build
build:
go build -o jaeger-clickhouse-$(GOOS)-$(GOARCH) ./cmd/jaeger-clickhouse/main.go
${GOBUILD} -o jaeger-clickhouse-$(GOOS)-$(GOARCH) ./cmd/jaeger-clickhouse/main.go

.PHONY: run
run:
SPAN_STORAGE_TYPE=grpc-plugin ${JAEGER_ALL_IN_ONE} --grpc-storage-plugin.binary=./jaeger-clickhouse-$(GOOS)-$(GOARCH) --grpc-storage-plugin.configuration-file=./config.yaml
docker run --rm --link some-clickhouse-server -it -u ${shell id -u} -v "${PWD}:/data" -e SPAN_STORAGE_TYPE=grpc-plugin jaegertracing/all-in-one:1.24.0 --grpc-storage-plugin.binary=/data/jaeger-clickhouse-$(GOOS)-$(GOARCH) --grpc-storage-plugin.configuration-file=/data/config.yaml

.PHONY: fmt
fmt:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ make build

```bash
docker run --rm -it -p9000:9000 --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:21
# download Jaeger all-in-one
JAEGER_ALL_IN_ONE=<path to all-in-one> make run
make run
```

After each Jaeger run the ClickHouse server has to be restarted or changed `sql_scripts_dir` to a directory with no SLQ scripts.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
address: tcp://localhost:9000
address: tcp://some-clickhouse-server:9000
# When empty the embedded scripts from sqlscripts directory are used
init_sql_scripts_dir:

0 comments on commit 7c24c2e

Please sign in to comment.