Skip to content
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

Merged

Conversation

pavolloffay
Copy link
Member

  • Docker-compose yaml with cassandra deployment.
  • The compose file is reused in crossdock.
  • test-driver is not starting jaeger services

Tests are not passing because xdock containers send tracing data to test-driver and not jaeger-*.

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:

  • one compose file to define only jaeger services with enabled --config-file=
  • one compose file per storage. compose file would define config map for all jaeger services.

This is related to #469 #405

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7e7a9d8 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@@ -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
Copy link
Member Author

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.

Copy link
Contributor

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:

export DOCKER_NAMESPACE=jaegertracing

Copy link
Member Author

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.

Copy link
Member Author

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

@yurishkuro
Copy link
Member

test-driver is not starting jaeger services

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
Copy link
Contributor

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?

Copy link
Member Author

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 \
Copy link
Contributor

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?

Copy link
Member Author

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)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 672aae4 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 672aae4 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@pavolloffay
Copy link
Member Author

The question also is if we want to have compose file in this repository or move it to a separate.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d1e3fb5 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 28c72ac on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@@ -27,48 +30,49 @@ services:
image: jaegertracing/xdock-go
ports:
- "8080-8082"
links:
- "jaeger-agent:test_driver"
Copy link
Member Author

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.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8e37126 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8e37126 on pavolloffay:generic-integration-tests into a7f203b on jaegertracing:master.

@pavolloffay
Copy link
Member Author

It should be ready for the review.

@pavolloffay pavolloffay changed the title WIP Introduce docker-compose and reuse it in crossdock docker-compose and reuse it in crossdock Oct 27, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 77ce3cd on pavolloffay:generic-integration-tests into 44de283 on jaegertracing:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 99.969% when pulling cfa2376 on pavolloffay:generic-integration-tests into 44de283 on jaegertracing:master.

r := mux.NewRouter()
apiHandler.RegisterRoutes(r)
if staticHandler != nil {
apiHandler.RegisterRoutes(r)
Copy link
Member

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")
}

Copy link
Member Author

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

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 84b75ff on pavolloffay:generic-integration-tests into 44de283 on jaegertracing:master.

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]>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 26c3f59 on pavolloffay:generic-integration-tests into 975982b on jaegertracing:master.

@yurishkuro yurishkuro merged commit 2acee35 into jaegertracing:master Oct 30, 2017
@ghost ghost removed the review label Oct 30, 2017
@yurishkuro
Copy link
Member

@pavolloffay nice! there are 3 different tickets mentioned here, can you close those that are resolved by this pr?

@yurishkuro
Copy link
Member

@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

@pavolloffay
Copy link
Member Author

Yes I will, all xdocs has to be updated. Sorry I could have been more proactive here.

isaachier pushed a commit to isaachier/jaeger that referenced this pull request Nov 1, 2017
…#493)

* Introduce shared docker-compose and reuse it in crossdock
* Fix empty static files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants