-
Notifications
You must be signed in to change notification settings - Fork 217
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
Attempt building debian, jar, and rpm packages using Dockerfiles #46
Closed
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
693cce9
Attempt building debian, jar, and rpm packages using Dockerfiles
joaquincasares 02127cf
New changes to build debian packages and build locally, instead of fr…
joaquincasares 29d6d73
git needed to pull bower packages. might also be needed for rhel and …
joaquincasares 294ddbb
committed git package to wrong dockerfile
joaquincasares 6cac1cd
Add instructions for retrieving the built jar. Make the docker/jar au…
joaquincasares 2c087d6
Finish Cassandra-backed Docker example
joaquincasares bba357b
Documentation tweaks. Lock down docker images to tags.
joaquincasares 16a33be
Add links to urls
joaquincasares 2fc1b8e
Add down command
joaquincasares c17b8ca
Allow Docker to build rpm packages.
joaquincasares 615cd81
Simpler run commands and inline comments
joaquincasares d11a122
Include jmxAuth key in sample yamls
joaquincasares ebf37c9
No longer use mounted volumes to simplify testing workflows
joaquincasares 18f0df2
Remove the configuration to have Cassandra auto-restart
joaquincasares f03f1cb
Fix and simplify rpm building
joaquincasares 398101e
Forgot to upload docker-entrypoint.sh
joaquincasares 1c0406b
Simplify .deb creation
joaquincasares 0d8f7c5
Cleaner jar building
joaquincasares 7c026bf
Test docker-compose with new setup
joaquincasares 6312bda
Confirm in-memory and cassandra-backend work as expected.
joaquincasares e571a21
Use 127.0.0.1 to contact cassandra by default
joaquincasares dc77d4c
Add ability to define Cassandra node from docker-compose.yml
joaquincasares e27ddb3
Phrasing
joaquincasares 0ffaa7c
README updates
joaquincasares ab6b1fc
Don't bind to a specific jar version
joaquincasares 9c057d9
Reorg Docker Readme and Dockerfiles
joaquincasares 3d37f35
Remove debuild and consolidate build command
joaquincasares 7e75c56
Documenaion cleanup and enhancement
joaquincasares 4ebf674
Include production-ready container note
joaquincasares 57c1030
Don't repeat the build process.
joaquincasares File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu | ||
|
||
# use a common app path, copied from python-onbuild:latest | ||
ENV WORKDIR /usr/src/app | ||
RUN mkdir -p ${WORKDIR} | ||
WORKDIR ${WORKDIR} | ||
|
||
# install dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
apt-file \ | ||
debhelper \ | ||
devscripts \ | ||
git \ | ||
maven \ | ||
openjdk-8-jdk \ | ||
&& mvn --version | ||
|
||
# grab source | ||
RUN git clone https://github.com/thelastpickle/cassandra-reaper | ||
WORKDIR ${WORKDIR}/cassandra-reaper | ||
|
||
# target directory for final build | ||
RUN mkdir ${WORKDIR}/packages | ||
|
||
# -d is required to avoid: | ||
# dpkg-checkbuilddeps: error: Unmet build dependencies: java7-jdk | ||
RUN debuild -uc -us -b -d \ | ||
&& cp ${WORKDIR}/*.deb ${WORKDIR}/packages | ||
|
||
# change the WORKDIR to the directory that only includes the built packages | ||
WORKDIR ${WORKDIR}/packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ubuntu | ||
|
||
# use a common app path, copied from python-onbuild:latest | ||
ENV WORKDIR /usr/src/app | ||
RUN mkdir -p ${WORKDIR} | ||
WORKDIR ${WORKDIR} | ||
|
||
# install dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
curl \ | ||
&& curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh \ | ||
&& bash nodesource_setup.sh \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
git \ | ||
maven \ | ||
nodejs \ | ||
openjdk-8-jdk \ | ||
&& mvn --version \ | ||
&& npm install -g bower | ||
|
||
# grab source | ||
RUN git clone https://github.com/thelastpickle/cassandra-reaper | ||
WORKDIR ${WORKDIR}/cassandra-reaper | ||
|
||
# cache maven dependencies, useful during Dockerfile testing | ||
RUN cp pom.xml /tmp | ||
WORKDIR /tmp | ||
RUN mvn package | ||
WORKDIR ${WORKDIR}/cassandra-reaper | ||
|
||
# target directory for final build | ||
RUN mkdir ${WORKDIR}/packages | ||
|
||
# build jar | ||
# FAILS WITH: | ||
# [INFO] --- exec-maven-plugin:1.5.0:exec (exec-bower-install) @ cassandra-reaper --- | ||
# bower ESUDO Cannot be run with sudo | ||
# | ||
# Additional error details: | ||
# Since bower is a user command, there is no need to execute it with superuser permissions. | ||
# If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs. | ||
# | ||
# http://www.joyent.com/blog/installing-node-and-npm | ||
# https://gist.github.com/isaacs/579814 | ||
# | ||
# You can however run a command with sudo using --allow-root option | ||
# [ERROR] Command execution failed. | ||
RUN mvn clean package \ | ||
&& mvn clean package -Pbuild-ui | ||
|
||
# change the WORKDIR to the directory that only includes the built packages | ||
WORKDIR ${WORKDIR}/packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM amazonlinux | ||
|
||
# use a common app path, copied from python-onbuild:latest | ||
ENV WORKDIR /usr/src/app | ||
RUN mkdir -p ${WORKDIR} | ||
WORKDIR ${WORKDIR} | ||
|
||
# install dependencies | ||
RUN yum update \ | ||
&& yum install -y \ | ||
wget \ | ||
&& wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.rpm" \ | ||
&& yum localinstall -y jdk-8u60-linux-x64.rpm \ | ||
&& wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo \ | ||
&& sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo \ | ||
&& yum update \ | ||
&& yum install -y \ | ||
apache-maven \ | ||
gcc \ | ||
git \ | ||
make \ | ||
rpm-build \ | ||
ruby-devel \ | ||
which \ | ||
&& mvn --version \ | ||
&& gem install fpm | ||
|
||
# grab source | ||
RUN git clone https://github.com/thelastpickle/cassandra-reaper | ||
WORKDIR ${WORKDIR}/cassandra-reaper | ||
|
||
# cache maven dependencies, useful during Dockerfile testing | ||
RUN cp pom.xml /tmp | ||
WORKDIR /tmp | ||
RUN mvn package | ||
WORKDIR ${WORKDIR}/cassandra-reaper | ||
|
||
# target directory for final build | ||
RUN mkdir ${WORKDIR}/packages | ||
|
||
# REQUIRED to build rpm packages | ||
RUN git checkout v0.3.0 | ||
|
||
# build rpm | ||
RUN mvn package \ | ||
&& make rpm \ | ||
&& cp *.rpm ${WORKDIR}/packages | ||
|
||
# change the WORKDIR to the directory that only includes the built packages | ||
WORKDIR ${WORKDIR}/packages |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Thanks for that information! That's good to know the UI doesn't need to be recompiled each time.
Would you mind taking a look at the cause of the sudo issue? It'd be nice to have a streamlined way to have potential contributors make changes and recompile the UI without having to manage about the entire build process.