Skip to content

Commit

Permalink
add upstart support and bump debian version
Browse files Browse the repository at this point in the history
  • Loading branch information
varjoranta committed Jan 8, 2015
1 parent 8357b65 commit 5987787
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 27 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2014 Spotify AB
Copyright 2014-2015 Spotify AB

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ node of each registered cluster.

You can also run the Reaper with memory storage, which is not persistent, and all the registered
clusters, column families, and repair runs will be lost upon service restart. Currently Reaper
supports only PostgreSQL database for persisting the state.
supports only PostgreSQL database for persisting the running repairs state.

This project is built on top of Dropwizard:
http://dropwizard.io/
Expand Down
14 changes: 10 additions & 4 deletions bin/cassandra-reaper
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2014 Spotify AB
# Copyright (c) 2014-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,13 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CLASSPATH="/usr/share/cassandra-reaper/*"
CLASS_PATH="/usr/share/cassandra-reaper/*"

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

JVM_OPTS=(
-Xms1G
-Xmx2G
)
exec java ${JVM_OPTS[@]} \
-cp "$CLASSPATH" \
-cp ${CLASS_PATH} \
com.spotify.reaper.ReaperApplication \
server "$@"
server ${CONFIG_PATH}
23 changes: 23 additions & 0 deletions debian/cassandra-reaper.upstart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description "cassandra-reaper process"
author "Bases <[email protected]>"

start on runlevel [2345]
stop on runlevel [!2345]

kill signal SIGKILL

respawn
# respawn unlimited, but uncomment following to get 15 retries with 5 sec sleep
# respawn limit 15 5

# Timeout is set to 5s
kill timeout 5

env TZ=universal

script
exec /usr/bin/cassandra-reaper
end script

# prevent respawning more than once every 5 seconds
post-stop exec sleep 5
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
cassandra-reaper (0.0.2-1) unstable; urgency=low

* Initial working version
* Changed to use Upstart instead of Supervision

-- Hannu Varjoranta <[email protected]> Thu, 8 Jan 2015 15:24:13 +0100

cassandra-reaper (0.0.1-1) unstable; urgency=low

* Initial build
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Standards-Version: 3.7.2
Package: cassandra-reaper
Architecture: all
Depends: default-jre
Description: Software to run automated repairs of Cassandra
Description: Software to run automated (anti-entropy) repairs of Cassandra cluster data
20 changes: 0 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@

<build>
<plugins>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
<DependencyConvergence/>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down

0 comments on commit 5987787

Please sign in to comment.