-
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
Add docker-build process. #134
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,8 +63,23 @@ use the provided CLI tool in *bin/spreaper* to call the service. | |
|
||
Run the tool with *-h* or *--help* option to see usage instructions. | ||
|
||
Notice that you can also build a Debian package from this project by using *debuild*, for example: | ||
`debuild -uc -us -b` | ||
### Debian and RPM Packages | ||
|
||
Notice that you can also build Debian and RPM packages from this project by using *Make*, for example: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider rewording this to something like
|
||
`make all`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a new line between the note and the command and pace it in its own code block e.g. ```bash |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a Docker subheading e.g. Docker |
||
A [Docker](https://docs.docker.com/engine/installation/) build environment is | ||
also provided to build the entire project and can be run by using | ||
[Docker Compose](https://docs.docker.com/compose/install/): | ||
|
||
```bash | ||
docker-compose -f docker-build/docker-compose.yml build \ | ||
&& docker-compose -f docker-build/docker-compose.yml run build | ||
``` | ||
|
||
The final packages will be located within: | ||
|
||
```./packages/``` | ||
|
||
|
||
Configuration | ||
|
@@ -381,6 +396,6 @@ After modifying the `resource/cassandra-reaper.yaml` config file, Reaper can be | |
|
||
```java -jar target/cassandra-reaper-X.X.X.jar server resource/cassandra-reaper.yaml``` | ||
|
||
Once started, the UI can be accessed through : `http://127.0.0.1:8080/webui/` | ||
Once started, the UI can be accessed through : http://127.0.0.1:8080/webui/ | ||
|
||
Reaper can also be accessed using the REST API exposed on port 8080, or using the command line tool `bin/spreaper` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:16.04 | ||
|
||
# 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 \ | ||
rpm \ | ||
ruby-dev \ | ||
&& mvn --version \ | ||
&& gem install fpm \ | ||
&& npm install -g bower | ||
|
||
# cache maven dependencies, useful during Dockerfile testing | ||
COPY pom.xml /tmp | ||
COPY reaper_ui/*.json reaper_ui/*.js /tmp/reaper_ui/ | ||
WORKDIR /tmp | ||
RUN mvn clean package \ | ||
&& mvn clean package -Pbuild-ui | ||
WORKDIR ${WORKDIR} | ||
|
||
# Add entrypoint script | ||
COPY docker-build/docker-entrypoint.sh ${WORKDIR} | ||
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '2.1' | ||
|
||
services: | ||
build: | ||
build: | ||
context: .. | ||
dockerfile: docker-build/Dockerfile | ||
volumes: | ||
- ..:/usr/src/app/cassandra-reaper | ||
- ../packages:/usr/src/app/packages |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
# build jar | ||
# build web UI | ||
# build Debian and RPM packages | ||
# copy built packages into a mounted volume | ||
cd ${WORKDIR}/cassandra-reaper | ||
mvn clean package -Pbuild-ui \ | ||
&& make all \ | ||
&& mv *.deb *.rpm ${WORKDIR}/packages \ | ||
&& cp target/cassandra-*SNAPSHOT.jar ${WORKDIR}/packages | ||
|
||
# execute any provided command | ||
$@ |
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.
Consider adding a Make subheading e.g.
**Make**