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

Add instructions to install and run reaper as a service #141

Merged
merged 1 commit into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ VERSION := `mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpr
# VERSION := `python -c "import xml.etree.ElementTree as ET; print(ET.parse(open('pom.xml')).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)"`

package:
mvn package
mvn package -DskipTests

prepare:
echo "$(VERSION)..."
rm -Rf build/*
mkdir -p build/usr/share/cassandra-reaper
mkdir -p build/usr/local/bin
mkdir -p build/etc/init.d
mkdir -p build/etc/spotify
cp resource/cassandra-reaper.yaml build/etc/spotify/
mkdir -p build/etc/cassandra-reaper
mkdir -p build/etc/cassandra-reaper/configs
cp resource/cassandra-reaper.yaml build/etc/cassandra-reaper/
cp resource/cassandra-reaper*.yaml build/etc/cassandra-reaper/configs
cp target/cassandra-reaper-$(VERSION).jar build/usr/share/cassandra-reaper/
cp bin/* build/usr/local/bin/
cp debian/reaper.init build/etc/init.d/cassandra-reaper
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ The final packages will be located within:

```./packages/```

#### Install RPM or DEB package and run as a service

Install the RPM (Fedora based distros like RHEL or Centos) using : `sudo rpm -ivh reaper-*.*.*.x86_64.rpm`
Install the DEB (Debian based distros like Ubuntu) using : `sudo dpkg -i reaper_*.*.*_amd64.deb`

The yaml file used by the service is located at `/etc/cassandra-reaper/cassandra-reaper.yaml` and alternate config templates can be found under `/etc/cassandra-reaper/configs`.
It is recommended to create a new file with your specific configuration and symlink it as `/etc/cassandra-reaper/cassandra-reaper.yaml` to avoid your configuration from being overwritten during upgrades.
Adapt the config file to suit your setup and then run `sudo service cassandra-reaper start`.

Log files can be found at `/var/log/cassandra-reaper.log` and `/var/log/cassandra-reaper.err`.

Stop the service by running : `sudo service cassandra-reaper stop`


Configuration
-------------
Expand Down
2 changes: 1 addition & 1 deletion bin/cassandra-reaper
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ -z "$CLASS_PATH" ]; then
fi

if [ $# -eq 0 ]; then
CONFIG_PATH="/etc/spotify/cassandra-reaper.yaml"
CONFIG_PATH="/etc/cassandra-reaper/cassandra-reaper.yaml"
else
CONFIG_PATH="$@"
fi
Expand Down