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

Changes testcontainers to not pull docker.io and switches to Arm64 builds #1277

Merged
merged 5 commits into from
Nov 7, 2020

Conversation

codefromthecrypt
Copy link
Member

@codefromthecrypt codefromthecrypt commented Nov 7, 2020

This follows advice from testcontainers to opt-out of incidental images
used until they are republished on a non rate-limited registry.

https://www.testcontainers.org/supported_docker_environment/image_registry_rate_limiting/

This also moves the build to the much faster arm64 config

Same as openzipkin/zipkin-reporter-java#192

Notes

gRPC 1.2's protoc doesn't support arm64

The version of google's protoc coupled with gRPC doesn't support arm64 until gRPC 1.9. Instead of interfering with our floor version, this checks in generated code. The generator works fine on amd64 (macbooks).

arm64 runs seems more sensitive to classpath glitches

We have had weird log4j2 -> jul bridge glitches in the past, but in arm64 it is more consistently flakey. We only need the bridge during integration tests, so there's now a classpath exclusion of the jul bridge otherwise.

mongodb needs an arm64 capable image

I had to build and publish an arm64-capable image of mongodb, using the last version packaged with alpine (so that the image can be smaller)

FROM alpine:3.9.6
ARG maintainer="OpenZipkin https://gitter.im/openzipkin/zipkin"
LABEL maintainer=$maintainer
LABEL org.opencontainers.image.authors=$maintainer
LABEL org.opencontainers.image.description="MongoDB on Alpine Linux"
LABEL alpine-version=3.9.6
LABEL mongodb-version=4.0.5

WORKDIR /mongodb
RUN apk add --update --no-cache mongodb=~4.0.5 && chown mongodb .

USER mongodb

EXPOSE 27017
CMD ["mongod", "--quiet", "--bind_ip", "0.0.0.0", "--dbpath", "/mongodb"]
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openzipkin/mongodb-alpine:4.0.5 . --push

…ilds (#192)

This follows advice from testcontainers to opt-out of incidental images
used until they are republished on a non rate-limited registry.

https://www.testcontainers.org/supported_docker_environment/image_registry_rate_limiting/

This also moves the build to the much faster arm64 config
@codefromthecrypt
Copy link
Member Author

gRPC 1.2's version of protoc doesn't support ARM64. Rather than raise the floor, this checks in the generated sources. One advantage of java, afterall, is not needing to know about the native platform.

@codefromthecrypt
Copy link
Member Author

mongo docker tests are running on arm finally

[INFO] Running brave.mongodb.ITMongoDBTracing

[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.918 s - in brave.mongodb.ITMongoDBTracing

[INFO] 

@codefromthecrypt codefromthecrypt merged commit 363ceb4 into master Nov 7, 2020
@codefromthecrypt codefromthecrypt deleted the build-arm branch November 7, 2020 23:34
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.

1 participant