-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose and reuse it in crossdock #493
docker-compose and reuse it in crossdock #493
Conversation
@@ -31,7 +31,7 @@ THRIFT_GEN_DIR=thrift-gen | |||
PASS=$(shell printf "\033[32mPASS\033[0m") | |||
FAIL=$(shell printf "\033[31mFAIL\033[0m") | |||
COLORIZE=$(SED) ''/PASS/s//$(PASS)/'' | $(SED) ''/FAIL/s//$(FAIL)/'' | |||
DOCKER_NAMESPACE?=$(USER) | |||
DOCKER_NAMESPACE?=jaegertracing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the repository to the correct one. I added user input to docker push to avoid unwanted pushes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was on purpose, so that we don't push accidentally to the official repository. Just pass DOCKER_NAMESPACE
before the make
command to override it:
DOCKER_NAMESPACE=jaegertracing make
Or, like this:
jaeger/travis/build-docker-images.sh
Line 23 in f0193c6
export DOCKER_NAMESPACE=jaegertracing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was on purpose, so that we don't push accidentally to the official repository.
I know, because of this I have added user input/verification before docker push.
This change is because now xdock uses only docker images so it has to build. We could use different image names/repository in docker-compose but that seems more odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work CONTINUE=y make docker-push
awesome! |
Makefile
Outdated
docker build -t $(DOCKER_NAMESPACE)/jaeger-cassandra-schema:${DOCKER_TAG} plugin/storage/cassandra/ | ||
@echo "Finished building jaeger-cassandra-schema ==============" | ||
cp -r jaeger-ui-build/build/ cmd/query/jaeger-ui-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easier for this command to fail than the jaeger-cassandra-schema
, so, keeping it as the first will make it fail "faster". Or were you having problems with this order of actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense, I just moved it closer to the place where it is used.
Makefile
Outdated
|
||
.PHONY: docker-push | ||
docker-push: | ||
@while [ -z "$$CONTINUE" ]; do \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work in non-interactive mode? Like, on Travis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to find out :).
This target at the moment is not used on travis. However I would like to simplify travis config a bit and use travis stages and have deploy stage which would consistently deploy all images (potentially using this command)
The question also is if we want to have compose file in this repository or move it to a separate. |
@@ -27,48 +30,49 @@ services: | |||
image: jaegertracing/xdock-go | |||
ports: | |||
- "8080-8082" | |||
links: | |||
- "jaeger-agent:test_driver" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary fix, xdock images expect jaeger services on this host.
It should be ready for the review. |
8e37126
to
77ce3cd
Compare
cmd/standalone/main.go
Outdated
r := mux.NewRouter() | ||
apiHandler.RegisterRoutes(r) | ||
if staticHandler != nil { | ||
apiHandler.RegisterRoutes(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is confusing. Better to group related code (and use scopes to hide vars that's not needed later)
r := mux.NewRouter()
{
h := New...
h.RegisterRoutes(r)
}
if h, err := queryApp.NewStaticAssetsHandler(qOpts.StaticAssets, qOpts.UIConfig); err != nil {
logger.Fatal("Could not create static assets handler", zap.Error(err))
} else if h != nil {
h.RegisterRoutes(r)
} else {
logger.Info("Static handler is not registered")
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a function which handles static handler registration
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
ffa2cf2
to
041da91
Compare
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay nice! there are 3 different tickets mentioned here, can you close those that are resolved by this pr? |
@pavolloffay could you take a look at jaeger-client-go builds? Crossdock tests are now failing there, I suspect it might be related to this change https://travis-ci.org/jaegertracing/jaeger-client-go/jobs/295424981 |
Yes I will, all xdocs has to be updated. Sorry I could have been more proactive here. |
…#493) * Introduce shared docker-compose and reuse it in crossdock * Fix empty static files
test-driver
is not starting jaeger servicesTests are not passing because xdock containers send tracing data to
test-driver
and notjaeger-*
.If we can use docker compose 3.3 (it requires docker engine 17.06.0+) then we can make this even more generic -- split this compose file and support multiple storages:
--config-file=
This is related to #469 #405