Skip to content
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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ cache:
- "$HOME/.m2"
- "$HOME/.jdk"
sudo: false
addons:
apt:
packages:
- rpm
env:
global:
- JDKW=https://raw.githubusercontent.com/vjkoskela/jdk-wrapper/master/jdk-wrapper.sh
Expand All @@ -15,5 +19,5 @@ install: true
before_script:
- gpg --import arpnetworking.key
script:
- curl -s ${JDKW} | bash /dev/stdin ./mvnw clean install --settings settings.xml -P ci -Dgpg.skip=true -U
- curl -s ${JDKW} | bash /dev/stdin ./mvnw clean install --settings settings.xml -P ci -P rpm -Dgpg.skip=true -U
- if [ \( -n "${TRAVIS_TAG}" \) -a "${TRAVIS_PULL_REQUEST}" = "false" ]; then curl -s ${JDKW} | bash /dev/stdin ./mvnw deploy --settings settings.xml -P ci -DskipAllVerification=true; fi;
5 changes: 5 additions & 0 deletions config/clusterPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sinks":
[
]
}
93 changes: 93 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"monitoringCluster": "tsd_aggregator_dev",
"httpPort": 7066,
"httpHost": "0.0.0.0",
"httpStatusPath": "/status",
"aggregationHost": "0.0.0.0",
"aggregationPort": 7065,
"logDirectory": "logs",
"hostPipelineConfiguration": "/opt/cluster-aggregator/config/hostPipeline.json",
"clusterPipelineConfiguration": "/opt/cluster-aggregator/config/clusterPipeline.json",
"maxConnectionTimeout": "PT2M",
"minConnectionTimeout": "PT1M",
"clusterHostSuffix": ".cluster",
"jvmMetricsCollectionInterval": "PT.5S",
"rebalanceConfiguration": {
"maxParallel": 100,
"threshold": 500
},
"databaseConfigurations": {
"metrics_clusteragg": {
"jdbcUrl": "jdbc:h2:/opt/cluster-aggregator/data/metrics:clusteragg;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=7067;MODE=PostgreSQL;INIT=create schema if not exists clusteragg;DB_CLOSE_DELAY=-1",
"driverName": "org.h2.Driver",
"username": "sa",
"password": "secret",
"maximumPoolSize": 2,
"minimumIdle": 2,
"idleTimeout": 0,
"modelPackages": [ "com.arpnetworking.clusteraggregator.models.ebean" ]
},
"metrics_clusteragg_ddl": {
"jdbcUrl": "jdbc:h2:/opt/cluster-aggregator/data/metrics:clusteragg;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=7067;MODE=PostgreSQL;INIT=create schema if not exists clusteragg;DB_CLOSE_DELAY=-1",
"driverName": "org.h2.Driver",
"username": "sa",
"password": "secret",
"migrationLocations": ["db/migration/metrics_clusteragg/common"],
"migrationSchemas": ["clusteragg"],
"maximumPoolSize": 2,
"minimumIdle": 0,
"idleTimeout": 10000,
"modelPackages": [ "com.arpnetworking.clusteraggregator.models.ebean" ]
}
},
"akkaConfiguration": {
"akka": {
"loggers": ["akka.event.slf4j.Slf4jLogger"],
"loglevel": "DEBUG",
"stdout-loglevel": "DEBUG",
"logging-filter": "akka.event.slf4j.Slf4jLoggingFilter",
"actor": {
"debug": {
"unhandled": "on"
},
"provider": "akka.cluster.ClusterActorRefProvider"
},
"cluster": {
"seed-nodes": [
"akka.tcp://Metrics@127.0.0.1:2551"
],
"auto-down-unreachable-after": "300s",
"sharding": {
"guardian-name": "sharding",
"role": "",
"retry-interval": "2 s",
"buffer-size": 100000,
"handoff-timeout": "60 s",
"rebalance-interval": "10 s",
"snapshot-interval": "720 s",
"least-shard-allocation-strategy": {
"rebalance-threshold": 10,
"max-simultaneous-rebalance": 3
}
}
},
"remote": {
"log-remote-lifecycle-events": "on",
"netty": {
"tcp": {
"hostname": "127.0.0.1",
"port": 2551
}
}
},
"persistence": {
"journal": {
"plugin": "akka.persistence.journal.leveldb",
"leveldb" : {
"dir": "/opt/cluster-aggregator/data/journal"
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions config/hostPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sinks":
[
]
}
51 changes: 51 additions & 0 deletions config/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014 Brandon Arp
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<configuration>
<appender name="cagg-logger" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/opt/cluster-aggregator/logs/cluster-aggregator.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<timeBasedFileNamingAndTriggeringPolicy class="com.arpnetworking.logback.SizeAndRandomizedTimeBasedFNATP">
<maxOffsetInMillis>900000</maxOffsetInMillis>
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<fileNamePattern>/opt/cluster-aggregator/logs/cluster-aggregator.%d{yyyy-MM-dd_HH}.%i.log.gz</fileNamePattern>
<maxHistory>4</maxHistory>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder class="com.arpnetworking.logback.StenoEncoder">
<injectContextLogger>true</injectContextLogger>
<compressLoggerName>true</compressLoggerName>
<jacksonModule class="com.fasterxml.jackson.datatype.joda.JodaModule" />
<jacksonModule class="com.fasterxml.jackson.datatype.guava.GuavaModule" />
<jacksonModule class="com.fasterxml.jackson.datatype.jdk8.Jdk8Module" />
<injectBeanIdentifier>true</injectBeanIdentifier>
</encoder>
</appender>


<appender name="cagg-async" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="cagg-logger"/>
<discardingThreshold>50</discardingThreshold>
<queueSize>500</queueSize>
</appender>

<logger name="org.reflections.Reflections" level="ERROR" />

<root level="INFO">
<appender-ref ref="cagg-async"/>
</root>
</configuration>
85 changes: 83 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<avaje.ebeanorm.mavenenhancer.version>4.7.1</avaje.ebeanorm.mavenenhancer.version>
<aspectjtools.maven.plugin>1.8.9</aspectjtools.maven.plugin>
<aspectj.maven.plugin.version>1.8</aspectj.maven.plugin.version>
<rpm.maven.plugin.version>2.1.5</rpm.maven.plugin.version>

<!-- Findbugs -->
<findbugs.exclude>${project.basedir}/findbugs.exclude.xml</findbugs.exclude>
Expand Down Expand Up @@ -204,7 +205,7 @@
<programs>
<program>
<id>cluster-aggregator</id>
<mainClass>com.arpnetworking.metrics.clusteraggregator.Main</mainClass>
<mainClass>com.arpnetworking.clusteraggregator.Main</mainClass>
</program>
</programs>
</configuration>
Expand Down Expand Up @@ -603,12 +604,92 @@
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
<repository>
<id>krasserm</id>
<name>Akka Cassandra Persistence</name>
<url>http://dl.bintray.com/krasserm/maven</url>
</repository>
</repositories>
<profiles>
<profile>
<id>rpm</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>${rpm.maven.plugin.version}</version>
<executions>
<execution>
<id>generate-rpm</id>
<goals>
<goal>rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<name>cluster-aggregator</name>
<license>Apache 2 License</license>
<autoRequires>false</autoRequires>
<group>System Environment/Daemons</group>
<preinstallScriptlet>
<scriptFile>rpm/scripts/pre.sh</scriptFile>
</preinstallScriptlet>
<postinstallScriptlet>
<scriptFile>rpm/scripts/post.sh</scriptFile>
</postinstallScriptlet>
<preremoveScriptlet>
<scriptFile>rpm/scripts/preun.sh</scriptFile>
</preremoveScriptlet>
<postremoveScriptlet>
<scriptFile>rpm/scripts/postun.sh</scriptFile>
</postremoveScriptlet>
<requires>
<require>java &gt;= ${jdk.version}</require>
</requires>
<mappings>
<mapping>
<directory>/opt/cluster-aggregator</directory>
<sources>
<source>
<location>target/appassembler</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/opt/cluster-aggregator/config</directory>
<sources>
<source>
<location>config</location>
</source>
</sources>
</mapping>
<mapping>
<directory>/</directory>
<sources>
<source>
<location>rpm/fs</location>
</source>
</sources>
</mapping>
<!-- symlink the start script -->
<mapping>
<directory>/usr/local/bin</directory>
<sources>
<softlinkSource>
<location>/opt/cluster-aggregator/bin/cluster-aggregator</location>
</softlinkSource>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading