You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ly...@apache.org on 2016/10/28 13:58:23 UTC
incubator-metron git commit: METRON-464 Force co-location of all
Metron components closes apache/incubator-metron#315
Repository: incubator-metron
Updated Branches:
refs/heads/master 8c4b0f1db -> c5d55efd6
METRON-464 Force co-location of all Metron components closes apache/incubator-metron#315
Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/c5d55efd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/c5d55efd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/c5d55efd
Branch: refs/heads/master
Commit: c5d55efd6d20599d246abecd1b96164d983badca
Parents: 8c4b0f1
Author: dlyle65535 <dl...@gmail.com>
Authored: Fri Oct 28 09:57:40 2016 -0400
Committer: David Lyle <dl...@gmail.com>
Committed: Fri Oct 28 09:57:40 2016 -0400
----------------------------------------------------------------------
.../packaging/ambari/metron-mpack/pom.xml | 14 +++++++-
.../METRON/0.2.1BETA/service_advisor.py | 37 ++++++++++++++++++++
pom.xml | 5 +++
3 files changed, 55 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c5d55efd/metron-deployment/packaging/ambari/metron-mpack/pom.xml
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/pom.xml b/metron-deployment/packaging/ambari/metron-mpack/pom.xml
index 66226ce..0921ea2 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/pom.xml
+++ b/metron-deployment/packaging/ambari/metron-mpack/pom.xml
@@ -88,9 +88,21 @@
</executions>
</plugin>
<plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <!-- put the default-jar in the none phase to skip it from being created -->
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
+ <appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assemblies/metron-mpack.xml</descriptor>
</descriptors>
@@ -108,4 +120,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c5d55efd/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/service_advisor.py
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/service_advisor.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/service_advisor.py
index 7c0b90b..9a696f9 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/service_advisor.py
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/service_advisor.py
@@ -36,6 +36,43 @@ except Exception as e:
class METRON021BETAServiceAdvisor(service_advisor.ServiceAdvisor):
+ def getServiceComponentLayoutValidations(self, services, hosts):
+
+ componentsListList = [service["components"] for service in services["services"]]
+ componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist]
+
+ metronParsersHost = self.getHosts(componentsList, "METRON_PARSERS")[0]
+ metronEnrichmentMaster = self.getHosts(componentsList, "METRON_ENRICHMENT_MASTER")[0]
+ metronIndexingHost = self.getHosts(componentsList, "METRON_INDEXING")[0]
+ metronEnrichmentMysqlServer = self.getHosts(componentsList, "METRON_ENRICHMENT_MYSQL_SERVER")[0]
+
+ kafkaBrokers = self.getHosts(componentsList, "KAFKA_BROKER")
+ stormSupervisors = self.getHosts(componentsList,"SUPERVISOR")
+
+ items = []
+
+ #Metron Must Co-locate with KAFKA_BROKER and STORM_SUPERVISOR
+ if metronParsersHost not in kafkaBrokers:
+ message = "Metron must be colocated with an instance of KAFKA BROKER"
+ items.append({ "type": 'host-component', "level": 'ERROR', "message": message, "component-name": 'METRON_PARSERS', "host": metronParsersHost })
+
+ if metronParsersHost not in stormSupervisors:
+ message = "Metron must be colocated with an instance of STORM SUPERVISOR"
+ items.append({ "type": 'host-component', "level": 'WARN', "message": message, "component-name": 'METRON_PARSERS', "host": metronParsersHost })
+
+ if metronParsersHost != metronEnrichmentMaster:
+ message = "Metron Enrichment Master must be co-located with Metron Parsers on {0}".format(metronParsersHost)
+ items.append({ "type": 'host-component', "level": 'ERROR', "message": message, "component-name": 'METRON_ENRICHMENT_MASTER', "host": metronEnrichmentMaster })
+
+ if metronParsersHost != metronIndexingHost:
+ message = "Metron Indexing must be co-located with Metron Parsers on {0}".format(metronParsersHost)
+ items.append({ "type": 'host-component', "level": 'ERROR', "message": message, "component-name": 'METRON_INDEXING', "host": metronIndexingHost })
+
+ if metronParsersHost != metronEnrichmentMysqlServer:
+ message = "Metron MySQL Server must be co-located with Metron Parsers on {0}".format(metronParsersHost)
+ items.append({ "type": 'host-component', "level": 'ERROR', "message": message, "component-name": 'METRON_ENRICHMENT_MYSQL_SERVER', "host": metronEnrichmentMysqlServer })
+
+ return items
def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c5d55efd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4d6adb3..968692b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,6 +115,11 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>