Get deb file creation working.
This commit is contained in:
parent
e2667abbf7
commit
a29a9d6d89
57
pom.xml
57
pom.xml
|
@ -20,6 +20,8 @@
|
||||||
<skipITs>true</skipITs>
|
<skipITs>true</skipITs>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<artifactNamedVersion>${project.name}-${project.version}-${timestamp}-${buildNumber}
|
||||||
|
</artifactNamedVersion>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -216,7 +218,7 @@
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<finalName>mon-thresh</finalName>
|
<finalName>${artifactNamedVersion}</finalName>
|
||||||
<createDependencyReducedPom>true</createDependencyReducedPom>
|
<createDependencyReducedPom>true</createDependencyReducedPom>
|
||||||
<filters>
|
<filters>
|
||||||
<filter>
|
<filter>
|
||||||
|
@ -255,6 +257,59 @@
|
||||||
<tag>${project.version}</tag>
|
<tag>${project.version}</tag>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>create</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<doCheck>false</doCheck>
|
||||||
|
<shortRevisionLength>6</shortRevisionLength>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>jdeb</artifactId>
|
||||||
|
<groupId>org.vafer</groupId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jdeb</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<deb>${project.basedir}/debs/binaries/${artifactNamedVersion}.deb</deb>
|
||||||
|
<dataSet>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>${project.build.directory}/${artifactNamedVersion}.jar
|
||||||
|
</src>
|
||||||
|
<dst>/opt/mon/mon-thresh.jar</dst>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>${project.basedir}/src/deb/init/mon-thresh.conf</src>
|
||||||
|
<dst>/etc/init/mon-thresh.conf</dst>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<type>file</type>
|
||||||
|
<src>
|
||||||
|
${project.basedir}/src/deb/etc/mon-thresh-config.yml-sample
|
||||||
|
</src>
|
||||||
|
<dst>/etc/mon/thresh-config.yml-sample</dst>
|
||||||
|
</data>
|
||||||
|
</dataSet>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
Package: [[name]]
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Depends: openjdk-7-jre-headless | openjdk-7-jre
|
||||||
|
Version: [[version]]-[[timestamp]]-[[buildNumber]]
|
||||||
|
Maintainer: HPCloud Monitoring <hpcs-mon@hp.com>
|
||||||
|
Description: Mon-Thresh
|
||||||
|
Reads metrics and generates alarms based on alarm definitions.
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
if ! [ `getent passwd persister` ]; then
|
||||||
|
adduser --system --group persister
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Restart does not pick up upstart job config changes stop/start is needed
|
||||||
|
stop mon-thresh
|
||||||
|
start mon-thresh
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
remove|purge)
|
||||||
|
userdel persister
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
remove)
|
||||||
|
stop mon-thresh
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,86 @@
|
||||||
|
metricSpoutThreads: 1
|
||||||
|
metricSpoutTasks: 1
|
||||||
|
|
||||||
|
metricSpoutConfig:
|
||||||
|
|
||||||
|
#Kafka settings.
|
||||||
|
kafkaConsumerConfiguration:
|
||||||
|
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
||||||
|
topic: test
|
||||||
|
numThreads: 1
|
||||||
|
groupId: 1
|
||||||
|
zookeeperConnect: localhost:2181
|
||||||
|
consumerId: 1
|
||||||
|
socketTimeoutMs: 30000
|
||||||
|
socketReceiveBufferBytes : 65536
|
||||||
|
fetchMessageMaxBytes: 1048576
|
||||||
|
autoCommitEnable: true
|
||||||
|
autoCommitIntervalMs: 60000
|
||||||
|
queuedMaxMessageChunks: 10
|
||||||
|
rebalanceMaxRetries: 4
|
||||||
|
fetchMinBytes: 1
|
||||||
|
fetchWaitMaxMs: 100
|
||||||
|
rebalanceBackoffMs: 2000
|
||||||
|
refreshLeaderBackoffMs: 200
|
||||||
|
autoOffsetReset: largest
|
||||||
|
consumerTimeoutMs: -1
|
||||||
|
clientId : 1
|
||||||
|
zookeeperSessionTimeoutMs : 6000
|
||||||
|
zookeeperConnectionTimeoutMs : 6000
|
||||||
|
zookeeperSyncTimeMs: 2000
|
||||||
|
|
||||||
|
|
||||||
|
eventSpoutConfig:
|
||||||
|
#Kafka settings.
|
||||||
|
kafkaConsumerConfiguration:
|
||||||
|
# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
|
||||||
|
topic: test
|
||||||
|
numThreads: 1
|
||||||
|
groupId: 1
|
||||||
|
zookeeperConnect: localhost:2181
|
||||||
|
consumerId: 1
|
||||||
|
socketTimeoutMs: 30000
|
||||||
|
socketReceiveBufferBytes : 65536
|
||||||
|
fetchMessageMaxBytes: 1048576
|
||||||
|
autoCommitEnable: true
|
||||||
|
autoCommitIntervalMs: 60000
|
||||||
|
queuedMaxMessageChunks: 10
|
||||||
|
rebalanceMaxRetries: 4
|
||||||
|
fetchMinBytes: 1
|
||||||
|
fetchWaitMaxMs: 100
|
||||||
|
rebalanceBackoffMs: 2000
|
||||||
|
refreshLeaderBackoffMs: 200
|
||||||
|
autoOffsetReset: largest
|
||||||
|
consumerTimeoutMs: -1
|
||||||
|
clientId : 1
|
||||||
|
zookeeperSessionTimeoutMs : 6000
|
||||||
|
zookeeperConnectionTimeoutMs : 6000
|
||||||
|
zookeeperSyncTimeMs: 2000
|
||||||
|
|
||||||
|
|
||||||
|
sporadicMetricNamespaces:
|
||||||
|
- foo
|
||||||
|
|
||||||
|
database:
|
||||||
|
driverClass: com.vertica.jdbc.Driver
|
||||||
|
# url: jdbc:vertica://mon-aw1rdd1-vertica0001.rndd.aw1.hpcloud.net:5433/som
|
||||||
|
url: jdbc:vertica://15.185.94.245:5433/som
|
||||||
|
# user: persister
|
||||||
|
user: mon_persister
|
||||||
|
# user: dbadmin
|
||||||
|
password: password
|
||||||
|
properties:
|
||||||
|
ssl: false
|
||||||
|
# the maximum amount of time to wait on an empty pool before throwing an exception
|
||||||
|
maxWaitForConnection: 1s
|
||||||
|
|
||||||
|
# the SQL query to run when validating a connection's liveness
|
||||||
|
validationQuery: "/* MyService Health Check */ SELECT 1"
|
||||||
|
|
||||||
|
# the minimum number of connections to keep open
|
||||||
|
minSize: 8
|
||||||
|
|
||||||
|
# the maximum number of connections to keep open
|
||||||
|
|
||||||
|
|
||||||
|
maxSize: 41
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Startup script for the mon-thresh
|
||||||
|
|
||||||
|
description "MON threshold engine java app"
|
||||||
|
start on runlevel [2345]
|
||||||
|
|
||||||
|
console log
|
||||||
|
respawn
|
||||||
|
|
||||||
|
setgid persister
|
||||||
|
setuid persister
|
||||||
|
exec /usr/bin/java -Xmx8g -cp /opt/mon/mon-thresh.jar com.hpcloud.ThresholdEngine /etc/mon-thresh/mon-thresh-config.yml topology-name
|
Loading…
Reference in New Issue