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
Integrated docker maven build #766
Integrated docker maven build #766
Conversation
@SlevinBE thank you for your contribution. I'll look through your PR shortly. |
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.
a minor request
RUN curl -s -L https://github.com/rackerlabs/blueflood/releases/latest | egrep -o 'rackerlabs/blueflood/releases/download/rax-release-.*/blueflood-all-.*-jar-with-dependencies.jar' | xargs -I % curl -C - -L https://github.com/% --create-dirs -o ./blueflood-all-2.0.0-SNAPSHOT-jar-with-dependencies.jar | ||
COPY artifacts / | ||
RUN (ls blueflood-all-*.jar | sed "s|blueflood-all-\(.*\)-jar-with-dependencies.jar|\1|") >> BLUEFLOOD_VERSION | ||
RUN mv blueflood-all-*-jar-with-dependencies.jar blueflood-all-jar-with-dependencies.jar |
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.
Instead of mv
, can you create a soft link? I.e: RUN ln -s blueflood-all-$BLUEFLOOD_VERSION-jar-with-dependencies.jar blueflood-all-jar-with-dependencies.jar
?
It's just a nice to have. I know you already tag the image with a version. With a soft link, when you're inside the container, you know which version of blueflood you are running.
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.
oh, but that's why I'm extracting the version from the file and putting it into a BLUEFLOOD_VERSION file at line 16 ;)
but a soft link might indeed be simpler
…version to a separate file
I've implemented the suggestion to use a soft link to the jar file instead of writing the version to a separate file. |
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.
lgtm! thanks again!
@SlevinBE , we are always delightfully surprised when we get PRs like yours. Would you mind sharing with us what you are using/planning to use blueflood for? Thanks! |
Klarrio is specialised in building highly scalable IoT platforms for customers by either integrating open source components or by building custom components where the open source solutions don't exist or are not sufficient. |
Thanks for the info, @SlevinBE! We recently learned about Scylladb and am curious how it compares. They boast quite an performance boost. |
We're still in the evaluation phase with Scylladb, so can't share much yet about the performance boosts (but that's also the reason why we're trying it out). |
The current Docker build has several problems:
This PR solves these issues by integrating the docker build into the Maven build. Basically it allows you to build a docker image of any branch/tag by executing the following command:
This results in a docker image with two tags: 'latest' and the version of the maven project
The Dockerfile copies the jar which is the result of the package command into the Docker image, together with the other required files (such as ES-Setup, load.cdl). These changes make it independent from any outside resources such as github.