From cdea9bdcb22b5de66f6a5a84c6a7d5507e9294de Mon Sep 17 00:00:00 2001 From: Craig Bryant Date: Mon, 21 Jul 2014 10:23:40 -0600 Subject: [PATCH] Get initial build to work. Modified build to work with maven 2 Modified so it will download monasca-common jars from tarballs.openstack.org if the user is jenkins, otherwise the user is told to build and install monasca-common Had to move the source code to the new thresh directory so that a separate module could do the download before dependencies would be checked by maven Had to explicitly set the project name in the control file, not sure why Change-Id: Ic4d02478b078aad7c1f0eebda2ea2def8d9edf1a --- .gitignore | 1 + .gitreview | 4 +- README.md | 4 +- download/download.sh | 71 ++++ download/pom.xml | 40 ++ pom.xml | 359 +++--------------- thresh/pom.xml | 319 ++++++++++++++++ {src => thresh/src}/deb/control/control | 4 +- {src => thresh/src}/deb/control/postinst | 0 {src => thresh/src}/deb/control/postrm | 0 {src => thresh/src}/deb/control/prerm | 0 .../src}/deb/etc/mon-thresh-config.yml-sample | 0 {src => thresh/src}/deb/init/mon-thresh | 0 .../main/config/mon-thresh-sample-config.yml | 0 .../com/hpcloud/mon/EventSpoutConfig.java | 0 .../com/hpcloud/mon/KafkaSpoutConfig.java | 0 .../com/hpcloud/mon/MetricSpoutConfig.java | 0 .../mon/ThresholdingConfiguration.java | 0 .../com/hpcloud/mon/ThresholdingEngine.java | 0 .../java/com/hpcloud/mon/TopologyModule.java | 0 .../com/hpcloud/mon/domain/model/Alarm.java | 0 .../model/MetricDefinitionAndTenantId.java | 0 .../MetricDefinitionAndTenantIdMatcher.java | 0 .../hpcloud/mon/domain/model/SubAlarm.java | 0 .../mon/domain/model/SubAlarmStats.java | 0 .../hpcloud/mon/domain/service/AlarmDAO.java | 0 .../domain/service/MetricDefinitionDAO.java | 0 .../mon/domain/service/SubAlarmDAO.java | 0 .../service/SubAlarmMetricDefinition.java | 0 .../service/SubAlarmStatsRepository.java | 0 .../persistence/AlarmDAOImpl.java | 0 .../persistence/MetricDefinitionDAOImpl.java | 0 .../persistence/PersistenceModule.java | 0 .../persistence/SubAlarmDAOImpl.java | 0 .../thresholding/AlarmEventForwarder.java | 0 .../thresholding/AlarmThresholdingBolt.java | 0 .../thresholding/DataSourceFactory.java | 0 .../thresholding/EventProcessingBolt.java | 0 .../thresholding/EventSpout.java | 0 .../KafkaAlarmEventForwarder.java | 0 .../thresholding/KafkaSpout.java | 0 .../thresholding/MetricAggregationBolt.java | 0 .../thresholding/MetricFilteringBolt.java | 0 .../thresholding/MetricSpout.java | 0 .../thresholding/ProducerModule.java | 0 .../thresholding/PropertyFinder.java | 0 .../deserializer/EventDeserializer.java | 0 .../src}/main/resources/logback.xml | 0 .../test/java/com/hpcloud/mon/Assert.java | 0 .../mon/ThresholdingEngineAlarmTest.java | 0 .../hpcloud/mon/ThresholdingEngineRunner.java | 0 .../hpcloud/mon/ThresholdingEngineTest.java | 0 .../hpcloud/mon/ThresholdingEngineTest1.java | 0 .../hpcloud/mon/domain/model/AlarmTest.java | 0 ...etricDefinitionAndTenantIdMatcherTest.java | 0 .../mon/domain/model/SubAlarmStatsTest.java | 0 .../persistence/AlarmDAOImplTest.java | 0 .../MetricDefinitionDAOImplTest.java | 0 .../persistence/SubAlarmDAOImplTest.java | 0 .../AlarmThresholdingBoltTest.java | 0 .../thresholding/EventProcessingBoltTest.java | 0 .../MetricAggregationBoltTest.java | 0 .../thresholding/MetricFilteringBoltTest.java | 0 .../thresholding/PropertyFinderTest.java | 0 .../deserializer/EventDeserializerTest.java | 0 .../mon/infrastructure/persistence/alarm.sql | 0 .../src}/test/resources/logback.xml | 0 67 files changed, 491 insertions(+), 311 deletions(-) create mode 100755 download/download.sh create mode 100644 download/pom.xml create mode 100644 thresh/pom.xml rename {src => thresh/src}/deb/control/control (83%) rename {src => thresh/src}/deb/control/postinst (100%) rename {src => thresh/src}/deb/control/postrm (100%) rename {src => thresh/src}/deb/control/prerm (100%) rename {src => thresh/src}/deb/etc/mon-thresh-config.yml-sample (100%) rename {src => thresh/src}/deb/init/mon-thresh (100%) rename {src => thresh/src}/main/config/mon-thresh-sample-config.yml (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/EventSpoutConfig.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/KafkaSpoutConfig.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/MetricSpoutConfig.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/ThresholdingConfiguration.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/ThresholdingEngine.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/TopologyModule.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/model/Alarm.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantId.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcher.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/model/SubAlarm.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/model/SubAlarmStats.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/service/AlarmDAO.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/service/MetricDefinitionDAO.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/service/SubAlarmDAO.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/service/SubAlarmMetricDefinition.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/domain/service/SubAlarmStatsRepository.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImpl.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImpl.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/persistence/PersistenceModule.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImpl.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmEventForwarder.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBolt.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/DataSourceFactory.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBolt.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/EventSpout.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaAlarmEventForwarder.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaSpout.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBolt.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBolt.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricSpout.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/ProducerModule.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinder.java (100%) rename {src => thresh/src}/main/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializer.java (100%) rename {src => thresh/src}/main/resources/logback.xml (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/Assert.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/ThresholdingEngineAlarmTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/ThresholdingEngineRunner.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/ThresholdingEngineTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/ThresholdingEngineTest1.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/domain/model/AlarmTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcherTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/domain/model/SubAlarmStatsTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImplTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImplTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImplTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBoltTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBoltTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBoltTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBoltTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinderTest.java (100%) rename {src => thresh/src}/test/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializerTest.java (100%) rename {src => thresh/src}/test/resources/com/hpcloud/mon/infrastructure/persistence/alarm.sql (100%) rename {src => thresh/src}/test/resources/logback.xml (100%) diff --git a/.gitignore b/.gitignore index 9da6a60..ec6e541 100755 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ target/ test-output/ logs/ +debs/ diff --git a/.gitreview b/.gitreview index c987423..1b691cc 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] -host=gerrit.mon.hpcloud.net +host=review.openstack.org port=29418 -project=maas/maas-thresh.git +project=stackforge/monasca-thresh diff --git a/README.md b/README.md index 12516d6..005335a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -mon-thresh +monasca-thresh ========== Monitoring Thresholding Engine @@ -29,7 +29,7 @@ Events also flow into the Threshold Engine via Kafka so the Threshold Engine kno ======= # Build -Requires mon-common from https://github.com/hpcloud-mon/mon-common. Download and do mvn install +Requires monasca-common from https://github.com/stackforge/monasca-common. Download and do mvn install ``` mvn package diff --git a/download/download.sh b/download/download.sh new file mode 100755 index 0000000..a1b4483 --- /dev/null +++ b/download/download.sh @@ -0,0 +1,71 @@ +#!/bin/sh +set -x +ME=`whoami` +echo "Running as user: $ME" +VERSION=$1 + +check_user() { + ME=$1 + if [ "${ME}" != "jenkins" ]; then + echo "\nERROR: Download monasca-common and do a mvn install to install the monasca-commom jars\n" 1>&2 + exit 1 + fi +} + +# TODO: Grep these out of the pom itself rather than have them explicitly listed +JARS=" +monasca-common-util +monasca-common-model +monasca-common-persistence +monasca-common-streaming +monasca-common-kafka +monasca-common-testing +" +for JAR in $JARS; do + JARFILE=~/.m2//repository/monasca-common/${JAR}/${VERSION}/${JAR}-${VERSION}.jar + if [ ! -r "$JARFILE" ]; then + check_user ${ME} + # Download it from stackforge + FILE=`basename $JARFILE` + curl http://tarballs.openstack.org/ci/monasca-common/${FILE} > ${FILE} + # Upload into the local repository + POM=META-INF/maven/monasca-common/${JAR}/pom.xml + jar -xvf ${FILE} ${POM} + TMPFILE=pom.$$ + sed -e "s/\${computedVersion}/${VERSION}/" ${POM} > ${TMPFILE} + mv ${TMPFILE} ${POM} + mvn install:install-file -Dfile=${FILE} -DgroupId=monasca-common \ + -DartifactId=${JAR} -Dversion=${VERSION} -Dpackaging=jar -DpomFile=${POM} + fi +done + +POM_FILE=~/.m2/repository/monasca-common/monasca-common/${VERSION}/monasca-common-${VERSION}.pom +if [ ! -r "${POM_FILE}" ]; then + check_user ${ME} + TMPDIR=pom_tmp.$$ + mkdir -p ${TMPDIR} + curl https://raw.githubusercontent.com/stackforge/monasca-common/master/java/pom.xml > ${TMPDIR}/pom.xml + mvn install:install-file -DgroupId=monasca-common -DartifactId=monasca-common -Dversion=${VERSION} -Dpackaging=pom -Dfile=${TMPDIR}/pom.xml + rm -fr ${TMPDIR} +fi + +TEST_JARS=" +monasca-common-streaming +" +for TEST_JAR in $TEST_JARS; do + JARFILE=~/.m2//repository/monasca-common/${TEST_JAR}/${VERSION}/${TEST_JAR}-${VERSION}-tests.jar + if [ ! -r "$JARFILE" ]; then + check_user ${ME} + # Download it from stackforge + FILE=`basename $JARFILE` + curl http://tarballs.openstack.org/ci/monasca-common/${FILE} > ${FILE} + # Upload into the local repository + POM=META-INF/maven/monasca-common/${TEST_JAR}/pom.xml + jar -xvf ${FILE} ${POM} + TMPFILE=pom.$$ + sed -e "s/\${computedVersion}/${VERSION}/" ${POM} > ${TMPFILE} + mv ${TMPFILE} ${POM} + mvn install:install-file -Dfile=${FILE} -DgroupId=monasca-common \ + -DartifactId=${TEST_JAR} -Dversion=${VERSION} -Dpackaging=test-jar -DpomFile=${POM} + fi +done diff --git a/download/pom.xml b/download/pom.xml new file mode 100644 index 0000000..a578688 --- /dev/null +++ b/download/pom.xml @@ -0,0 +1,40 @@ + + 4.0.0 + + monasca-thresh + monasca-thresh-download + 1.0.0-SNAPSHOT + http://github.com/stackforge/monasca-thresh + pom + + + + ${project.version} + true + UTF-8 + UTF-8 + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + + package-execution + validate + + exec + + + + + ./download.sh + + + + + diff --git a/pom.xml b/pom.xml index 86a395d..a38ea19 100644 --- a/pom.xml +++ b/pom.xml @@ -1,315 +1,64 @@ - - 4.0.0 + + 4.0.0 - com.hpcloud - mon-thresh - 1.0.0-SNAPSHOT - http://github.com/hpcloud-mon/mon-thresh - jar + monasca-common + monasca-common + ${computedVersion} + http://github.com/stackforge/monasca-common + pom - - 3.0 - + - - 1.0.0-SNAPSHOT - 0.9.1-incubating - true - UTF-8 - UTF-8 - ${project.name}-${project.version}-${timestamp}-${buildNumber} - - + + + 1.0.0 + ${versionNumber}-SNAPSHOT - - scm:git:git@github.com:hpcloud-mon/mon-thresh - scm:git:git@github.com:hpcloud-mon/mon-thresh - + true + UTF-8 + UTF-8 + - - - clojars.org - http://clojars.org/repo - - + + scm:git:git@github.com:stackforge/monasca-thresh + scm:git:git@github.com:stackforge/monasca-thresh + - - - release-deploy-url-override - - - BUILD_NUM - - - - ${project.version} - - - + + download + thresh + - - - - - org.slf4j - slf4j-api - 1.7.6 - - - org.slf4j - slf4j-log4j12 - 1.7.6 - - - + + + release-deploy-url-override + + + BUILD_NUM + + + + ${project.version} + + + - - - org.apache.storm - storm-core - ${storm.version} - - - com.hpcloud - mon-util - ${mon.common.version} - - - ch.qos.logback - logback-core - - - ch.qos.logback - logback-classic - - - - - com.hpcloud - mon-model - ${mon.common.version} - - - com.hpcloud - mon-persistence - ${mon.common.version} - - - com.hpcloud - mon-streaming - ${mon.common.version} - - - com.hpcloud - mon-kafka - ${mon.common.version} - - - mysql - mysql-connector-java - 5.1.26 - - - - org.apache.kafka - kafka_2.10 - 0.8.0 - - - com.sun.jmx - jmxri - - - com.sun.jdmk - jmxtools - - - org.slf4j - slf4j-simple - - - - - - - com.hpcloud - mon-testing - ${mon.common.version} - test - - - com.hpcloud - mon-streaming - ${mon.common.version} - test-jar - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.16 - - performance,functional,integration,database,slow - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.16 - - performance,functional,integration,database,slow - ${skipITs} - - - - - integration-test - - - - **/*.class - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.2 - - ${artifactNamedVersion} - true - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - junit:junit - org.apache.storm:storm-core - org.hamcrest:* - - - - - - package - - shade - - - - - com.hpcloud.mon.ThresholdingEngine - - - true - - - - - - org.apache.maven.plugins - maven-scm-plugin - 1.9 - - ${project.version} - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.2 - - - validate - - create - - - - - false - 6 - - - - jdeb - org.vafer - 1.0.1 - - - package - - jdeb - - - ${project.basedir}/debs/binaries/${artifactNamedVersion}.deb - - - file - ${project.build.directory}/${artifactNamedVersion}.jar - - /opt/mon/mon-thresh.jar - - - file - ${project.basedir}/src/deb/init/mon-thresh - /etc/init.d/mon-thresh - - - file - ${project.basedir}/src/main/resources/logback.xml - /etc/mon/logback.xml - - - file - - ${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample - - /etc/mon/thresh-config.yml-sample - - - - - - - - maven-clean-plugin - 2.5 - - - - ${project.basedir}/debs - - - - - - + + + + org.apache.maven.plugins + maven-scm-plugin + 1.9 + + ${project.version} + + + + diff --git a/thresh/pom.xml b/thresh/pom.xml new file mode 100644 index 0000000..8403bc6 --- /dev/null +++ b/thresh/pom.xml @@ -0,0 +1,319 @@ + + 4.0.0 + + monasca + monasca-thresh + 1.0.0-SNAPSHOT + http://github.com/stackforge/monasca-thresh + jar + + + + + 1.0.0-SNAPSHOT + 0.9.1-incubating + true + UTF-8 + UTF-8 + ${project.artifactId}-${project.version}-${timestamp}-${buildNumber} + + ${project.artifactId}-${project.version}-shaded + + + + + scm:git:git@github.com:stackforge/monasca-thresh + scm:git:git@github.com:stackforge/monasca-thresh + + + + + clojars.org + http://clojars.org/repo + + + + + + release-deploy-url-override + + + BUILD_NUM + + + + ${project.version} + + + + + + + + + org.slf4j + slf4j-api + 1.7.6 + + + org.slf4j + slf4j-log4j12 + 1.7.6 + + + + + + + org.apache.storm + storm-core + ${storm.version} + + + monasca-common + monasca-common-util + ${mon.common.version} + + + ch.qos.logback + logback-core + + + ch.qos.logback + logback-classic + + + + + monasca-common + monasca-common-model + ${mon.common.version} + + + monasca-common + monasca-common-persistence + ${mon.common.version} + + + monasca-common + monasca-common-streaming + ${mon.common.version} + + + monasca-common + monasca-common-kafka + ${mon.common.version} + + + mysql + mysql-connector-java + 5.1.26 + + + + org.apache.kafka + kafka_2.9.2 + 0.8.0 + + + com.sun.jmx + jmxri + + + com.sun.jdmk + jmxtools + + + org.slf4j + slf4j-simple + + + + + + + monasca-common + monasca-common-testing + ${mon.common.version} + test + + + monasca-common + monasca-common-streaming + ${mon.common.version} + test-jar + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.16 + + performance,functional,integration,database,slow + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.16 + + performance,functional,integration,database,slow + ${skipITs} + + + + + integration-test + + + + **/*.class + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 1.2 + + ${artifactNamedVersion} + true + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + junit:junit + org.apache.storm:storm-core + org.hamcrest:* + + + + + + package + + shade + + + + + com.hpcloud.mon.ThresholdingEngine + + + true + + + + + + org.apache.maven.plugins + maven-scm-plugin + 1.9 + + ${project.version} + + + + org.codehaus.mojo + buildnumber-maven-plugin + 1.2 + + + validate + + create + + + + + false + 6 + + + + jdeb + org.vafer + 1.0.1 + + + package + + jdeb + + + ${project.basedir}/debs/binaries/${artifactNamedVersion}.deb + + + file + ${project.build.directory}/${shadedJarName}.jar + + /opt/mon/mon-thresh.jar + + + file + ${project.basedir}/src/deb/init/mon-thresh + /etc/init.d/mon-thresh + + + file + ${project.basedir}/src/main/resources/logback.xml + /etc/mon/logback.xml + + + file + + ${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample + + /etc/mon/thresh-config.yml-sample + + + + + + + + maven-clean-plugin + 2.5 + + + + ${project.basedir}/debs + + + + + + + + diff --git a/src/deb/control/control b/thresh/src/deb/control/control similarity index 83% rename from src/deb/control/control rename to thresh/src/deb/control/control index 93016f3..224a3c6 100644 --- a/src/deb/control/control +++ b/thresh/src/deb/control/control @@ -1,9 +1,9 @@ -Package: [[name]] +Package: monasca-thresh Section: misc Priority: optional Architecture: all Depends: openjdk-7-jre-headless | openjdk-7-jre Version: [[version]]-[[timestamp]]-[[buildNumber]] Maintainer: HPCloud Monitoring -Description: Mon-Thresh +Description: Monasca-Thresh Reads metrics and generates alarms based on alarm definitions. diff --git a/src/deb/control/postinst b/thresh/src/deb/control/postinst similarity index 100% rename from src/deb/control/postinst rename to thresh/src/deb/control/postinst diff --git a/src/deb/control/postrm b/thresh/src/deb/control/postrm similarity index 100% rename from src/deb/control/postrm rename to thresh/src/deb/control/postrm diff --git a/src/deb/control/prerm b/thresh/src/deb/control/prerm similarity index 100% rename from src/deb/control/prerm rename to thresh/src/deb/control/prerm diff --git a/src/deb/etc/mon-thresh-config.yml-sample b/thresh/src/deb/etc/mon-thresh-config.yml-sample similarity index 100% rename from src/deb/etc/mon-thresh-config.yml-sample rename to thresh/src/deb/etc/mon-thresh-config.yml-sample diff --git a/src/deb/init/mon-thresh b/thresh/src/deb/init/mon-thresh similarity index 100% rename from src/deb/init/mon-thresh rename to thresh/src/deb/init/mon-thresh diff --git a/src/main/config/mon-thresh-sample-config.yml b/thresh/src/main/config/mon-thresh-sample-config.yml similarity index 100% rename from src/main/config/mon-thresh-sample-config.yml rename to thresh/src/main/config/mon-thresh-sample-config.yml diff --git a/src/main/java/com/hpcloud/mon/EventSpoutConfig.java b/thresh/src/main/java/com/hpcloud/mon/EventSpoutConfig.java similarity index 100% rename from src/main/java/com/hpcloud/mon/EventSpoutConfig.java rename to thresh/src/main/java/com/hpcloud/mon/EventSpoutConfig.java diff --git a/src/main/java/com/hpcloud/mon/KafkaSpoutConfig.java b/thresh/src/main/java/com/hpcloud/mon/KafkaSpoutConfig.java similarity index 100% rename from src/main/java/com/hpcloud/mon/KafkaSpoutConfig.java rename to thresh/src/main/java/com/hpcloud/mon/KafkaSpoutConfig.java diff --git a/src/main/java/com/hpcloud/mon/MetricSpoutConfig.java b/thresh/src/main/java/com/hpcloud/mon/MetricSpoutConfig.java similarity index 100% rename from src/main/java/com/hpcloud/mon/MetricSpoutConfig.java rename to thresh/src/main/java/com/hpcloud/mon/MetricSpoutConfig.java diff --git a/src/main/java/com/hpcloud/mon/ThresholdingConfiguration.java b/thresh/src/main/java/com/hpcloud/mon/ThresholdingConfiguration.java similarity index 100% rename from src/main/java/com/hpcloud/mon/ThresholdingConfiguration.java rename to thresh/src/main/java/com/hpcloud/mon/ThresholdingConfiguration.java diff --git a/src/main/java/com/hpcloud/mon/ThresholdingEngine.java b/thresh/src/main/java/com/hpcloud/mon/ThresholdingEngine.java similarity index 100% rename from src/main/java/com/hpcloud/mon/ThresholdingEngine.java rename to thresh/src/main/java/com/hpcloud/mon/ThresholdingEngine.java diff --git a/src/main/java/com/hpcloud/mon/TopologyModule.java b/thresh/src/main/java/com/hpcloud/mon/TopologyModule.java similarity index 100% rename from src/main/java/com/hpcloud/mon/TopologyModule.java rename to thresh/src/main/java/com/hpcloud/mon/TopologyModule.java diff --git a/src/main/java/com/hpcloud/mon/domain/model/Alarm.java b/thresh/src/main/java/com/hpcloud/mon/domain/model/Alarm.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/model/Alarm.java rename to thresh/src/main/java/com/hpcloud/mon/domain/model/Alarm.java diff --git a/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantId.java b/thresh/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantId.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantId.java rename to thresh/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantId.java diff --git a/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcher.java b/thresh/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcher.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcher.java rename to thresh/src/main/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcher.java diff --git a/src/main/java/com/hpcloud/mon/domain/model/SubAlarm.java b/thresh/src/main/java/com/hpcloud/mon/domain/model/SubAlarm.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/model/SubAlarm.java rename to thresh/src/main/java/com/hpcloud/mon/domain/model/SubAlarm.java diff --git a/src/main/java/com/hpcloud/mon/domain/model/SubAlarmStats.java b/thresh/src/main/java/com/hpcloud/mon/domain/model/SubAlarmStats.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/model/SubAlarmStats.java rename to thresh/src/main/java/com/hpcloud/mon/domain/model/SubAlarmStats.java diff --git a/src/main/java/com/hpcloud/mon/domain/service/AlarmDAO.java b/thresh/src/main/java/com/hpcloud/mon/domain/service/AlarmDAO.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/service/AlarmDAO.java rename to thresh/src/main/java/com/hpcloud/mon/domain/service/AlarmDAO.java diff --git a/src/main/java/com/hpcloud/mon/domain/service/MetricDefinitionDAO.java b/thresh/src/main/java/com/hpcloud/mon/domain/service/MetricDefinitionDAO.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/service/MetricDefinitionDAO.java rename to thresh/src/main/java/com/hpcloud/mon/domain/service/MetricDefinitionDAO.java diff --git a/src/main/java/com/hpcloud/mon/domain/service/SubAlarmDAO.java b/thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmDAO.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/service/SubAlarmDAO.java rename to thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmDAO.java diff --git a/src/main/java/com/hpcloud/mon/domain/service/SubAlarmMetricDefinition.java b/thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmMetricDefinition.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/service/SubAlarmMetricDefinition.java rename to thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmMetricDefinition.java diff --git a/src/main/java/com/hpcloud/mon/domain/service/SubAlarmStatsRepository.java b/thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmStatsRepository.java similarity index 100% rename from src/main/java/com/hpcloud/mon/domain/service/SubAlarmStatsRepository.java rename to thresh/src/main/java/com/hpcloud/mon/domain/service/SubAlarmStatsRepository.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImpl.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImpl.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImpl.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImpl.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImpl.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImpl.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImpl.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImpl.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/persistence/PersistenceModule.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/PersistenceModule.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/persistence/PersistenceModule.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/PersistenceModule.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImpl.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImpl.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImpl.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImpl.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmEventForwarder.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmEventForwarder.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmEventForwarder.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmEventForwarder.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBolt.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBolt.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBolt.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBolt.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/DataSourceFactory.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/DataSourceFactory.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/DataSourceFactory.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/DataSourceFactory.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBolt.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBolt.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBolt.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBolt.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventSpout.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventSpout.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventSpout.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/EventSpout.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaAlarmEventForwarder.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaAlarmEventForwarder.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaAlarmEventForwarder.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaAlarmEventForwarder.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaSpout.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaSpout.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaSpout.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/KafkaSpout.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBolt.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBolt.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBolt.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBolt.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBolt.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBolt.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBolt.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBolt.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricSpout.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricSpout.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricSpout.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/MetricSpout.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/ProducerModule.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/ProducerModule.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/ProducerModule.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/ProducerModule.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinder.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinder.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinder.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinder.java diff --git a/src/main/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializer.java b/thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializer.java similarity index 100% rename from src/main/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializer.java rename to thresh/src/main/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializer.java diff --git a/src/main/resources/logback.xml b/thresh/src/main/resources/logback.xml similarity index 100% rename from src/main/resources/logback.xml rename to thresh/src/main/resources/logback.xml diff --git a/src/test/java/com/hpcloud/mon/Assert.java b/thresh/src/test/java/com/hpcloud/mon/Assert.java similarity index 100% rename from src/test/java/com/hpcloud/mon/Assert.java rename to thresh/src/test/java/com/hpcloud/mon/Assert.java diff --git a/src/test/java/com/hpcloud/mon/ThresholdingEngineAlarmTest.java b/thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineAlarmTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/ThresholdingEngineAlarmTest.java rename to thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineAlarmTest.java diff --git a/src/test/java/com/hpcloud/mon/ThresholdingEngineRunner.java b/thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineRunner.java similarity index 100% rename from src/test/java/com/hpcloud/mon/ThresholdingEngineRunner.java rename to thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineRunner.java diff --git a/src/test/java/com/hpcloud/mon/ThresholdingEngineTest.java b/thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/ThresholdingEngineTest.java rename to thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineTest.java diff --git a/src/test/java/com/hpcloud/mon/ThresholdingEngineTest1.java b/thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineTest1.java similarity index 100% rename from src/test/java/com/hpcloud/mon/ThresholdingEngineTest1.java rename to thresh/src/test/java/com/hpcloud/mon/ThresholdingEngineTest1.java diff --git a/src/test/java/com/hpcloud/mon/domain/model/AlarmTest.java b/thresh/src/test/java/com/hpcloud/mon/domain/model/AlarmTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/domain/model/AlarmTest.java rename to thresh/src/test/java/com/hpcloud/mon/domain/model/AlarmTest.java diff --git a/src/test/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcherTest.java b/thresh/src/test/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcherTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcherTest.java rename to thresh/src/test/java/com/hpcloud/mon/domain/model/MetricDefinitionAndTenantIdMatcherTest.java diff --git a/src/test/java/com/hpcloud/mon/domain/model/SubAlarmStatsTest.java b/thresh/src/test/java/com/hpcloud/mon/domain/model/SubAlarmStatsTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/domain/model/SubAlarmStatsTest.java rename to thresh/src/test/java/com/hpcloud/mon/domain/model/SubAlarmStatsTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImplTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImplTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImplTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/AlarmDAOImplTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImplTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImplTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImplTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/MetricDefinitionDAOImplTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImplTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImplTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImplTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/persistence/SubAlarmDAOImplTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBoltTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBoltTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBoltTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/AlarmThresholdingBoltTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBoltTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBoltTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBoltTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/EventProcessingBoltTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBoltTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBoltTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBoltTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricAggregationBoltTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBoltTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBoltTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBoltTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/MetricFilteringBoltTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinderTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinderTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinderTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/PropertyFinderTest.java diff --git a/src/test/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializerTest.java b/thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializerTest.java similarity index 100% rename from src/test/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializerTest.java rename to thresh/src/test/java/com/hpcloud/mon/infrastructure/thresholding/deserializer/EventDeserializerTest.java diff --git a/src/test/resources/com/hpcloud/mon/infrastructure/persistence/alarm.sql b/thresh/src/test/resources/com/hpcloud/mon/infrastructure/persistence/alarm.sql similarity index 100% rename from src/test/resources/com/hpcloud/mon/infrastructure/persistence/alarm.sql rename to thresh/src/test/resources/com/hpcloud/mon/infrastructure/persistence/alarm.sql diff --git a/src/test/resources/logback.xml b/thresh/src/test/resources/logback.xml similarity index 100% rename from src/test/resources/logback.xml rename to thresh/src/test/resources/logback.xml