Repository: metron Updated Branches: refs/heads/master 28a974037 -> ba9ddda6d
http://git-wip-us.apache.org/repos/asf/metron/blob/ba9ddda6/metron-docker/pom.xml ---------------------------------------------------------------------- diff --git a/metron-docker/pom.xml b/metron-docker/pom.xml deleted file mode 100644 index ed29698..0000000 --- a/metron-docker/pom.xml +++ /dev/null @@ -1,312 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software - Foundation (ASF) under one or more contributor license agreements. See the - NOTICE file distributed with this work for additional information regarding - copyright ownership. The ASF licenses this file to You 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. - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>metron-docker</artifactId> - <packaging>pom</packaging> - <name>metron-docker</name> - <parent> - <groupId>org.apache.metron</groupId> - <artifactId>Metron</artifactId> - <version>0.4.1</version> - </parent> - <description>Metron Docker</description> - <url>https://metron.apache.org/</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - </properties> - <build> - <plugins> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>3.0.1</version> - <executions> - <execution> - <id>copy-common-to-kafkazk</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/kafkazk/packages</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-common/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-parsers-to-kafkazk</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/kafkazk/packages</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-parsers/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-enrichment-to-kafkazk</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/kafkazk/packages</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-enrichment/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-indexing-to-kafkazk</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/kafkazk/packages</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-indexing/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-templates-to-elasticsearch</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/elasticsearch/es_templates</outputDirectory> - <resources> - <resource> - <directory>../metron-deployment/roles/metron_elasticsearch_templates/files/es_templates/</directory> - <includes> - <include>*.template</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-data-management-to-hbase</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/hbase/data-management</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-data-management/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-parsers-to-storm</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/storm/parser</outputDirectory> - <resources> - <resource> - <directory>${project.basedir}/../metron-platform/metron-parsers/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-enrichment-to-storm</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/storm/enrichment</outputDirectory> - <resources> - <resource> - <directory>${project.basedir}/../metron-platform/metron-enrichment/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-indexing-to-storm</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/storm/indexing</outputDirectory> - <resources> - <resource> - <directory>${project.basedir}/../metron-platform/metron-indexing/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-elasticsearch-to-storm</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/storm/elasticsearch</outputDirectory> - <resources> - <resource> - <directory>../metron-platform/metron-elasticsearch/target/</directory> - <includes> - <include>*.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>filter-docker-env</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose</outputDirectory> - <resources> - <resource> - <directory>./conf</directory> - <filtering>true</filtering> - <includes> - <include>.env</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-wait-for-it-to-hbase</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/hbase/bin</outputDirectory> - <resources> - <resource> - <directory>./scripts</directory> - <includes> - <include>wait-for-it.sh</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-wait-for-it-to-kafkazk</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/kafkazk/bin</outputDirectory> - <resources> - <resource> - <directory>./scripts</directory> - <includes> - <include>wait-for-it.sh</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> - <id>copy-wait-for-it-to-elasticsearch</id> - <phase>prepare-package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.basedir}/compose/elasticsearch</outputDirectory> - <resources> - <resource> - <directory>./scripts</directory> - <includes> - <include>wait-for-it.sh</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-clean-plugin</artifactId> - <version>3.0.0</version> - <configuration> - <filesets> - <fileset> - <directory>compose</directory> - <includes> - <include>**/*.tar.gz</include> - <include>**/wait-for-it.sh</include> - <include>.env</include> - <include>**/*.template</include> - </includes> - </fileset> - </filesets> - </configuration> - </plugin> - </plugins> - </build> -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/metron/blob/ba9ddda6/metron-docker/scripts/create-docker-machine.sh ---------------------------------------------------------------------- diff --git a/metron-docker/scripts/create-docker-machine.sh b/metron-docker/scripts/create-docker-machine.sh deleted file mode 100755 index 241f4ae..0000000 --- a/metron-docker/scripts/create-docker-machine.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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. -# -docker-machine create --driver virtualbox --virtualbox-disk-size "30000" --virtualbox-memory "4096" --virtualbox-cpu-count "2" metron-machine http://git-wip-us.apache.org/repos/asf/metron/blob/ba9ddda6/metron-docker/scripts/wait-for-it.sh ---------------------------------------------------------------------- diff --git a/metron-docker/scripts/wait-for-it.sh b/metron-docker/scripts/wait-for-it.sh deleted file mode 100755 index eca6c3b..0000000 --- a/metron-docker/scripts/wait-for-it.sh +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available - -cmdname=$(basename $0) - -echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $cmdname host:port [-s] [-t timeout] [-- command args] - -h HOST | --host=HOST Host or IP under test - -p PORT | --port=PORT TCP port under test - Alternatively, you specify the host and port as host:port - -s | --strict Only execute subcommand if the test succeeds - -q | --quiet Don't output any status messages - -t TIMEOUT | --timeout=TIMEOUT - Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $TIMEOUT -gt 0 ]]; then - echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" - else - echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" - fi - start_ts=$(date +%s) - while : - do - (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 - result=$? - if [[ $result -eq 0 ]]; then - end_ts=$(date +%s) - echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" - break - fi - sleep 1 - done - return $result -} - -wait_for_wrapper() -{ - # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 - if [[ $QUIET -eq 1 ]]; then - timeout $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & - else - timeout $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & - fi - PID=$! - trap "kill -INT -$PID" INT - wait $PID - RESULT=$? - if [[ $RESULT -ne 0 ]]; then - echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" - fi - return $RESULT -} - -# process arguments -while [[ $# -gt 0 ]] -do - case "$1" in - *:* ) - hostport=(${1//:/ }) - HOST=${hostport[0]} - PORT=${hostport[1]} - shift 1 - ;; - --child) - CHILD=1 - shift 1 - ;; - -q | --quiet) - QUIET=1 - shift 1 - ;; - -s | --strict) - STRICT=1 - shift 1 - ;; - -h) - HOST="$2" - if [[ $HOST == "" ]]; then break; fi - shift 2 - ;; - --host=*) - HOST="${1#*=}" - shift 1 - ;; - -p) - PORT="$2" - if [[ $PORT == "" ]]; then break; fi - shift 2 - ;; - --port=*) - PORT="${1#*=}" - shift 1 - ;; - -t) - TIMEOUT="$2" - if [[ $TIMEOUT == "" ]]; then break; fi - shift 2 - ;; - --timeout=*) - TIMEOUT="${1#*=}" - shift 1 - ;; - --) - shift - CLI="$@" - break - ;; - --help) - usage - ;; - *) - echoerr "Unknown argument: $1" - usage - ;; - esac -done - -if [[ "$HOST" == "" || "$PORT" == "" ]]; then - echoerr "Error: you need to provide a host and port to test." - usage -fi - -TIMEOUT=${TIMEOUT:-15} -STRICT=${STRICT:-0} -CHILD=${CHILD:-0} -QUIET=${QUIET:-0} - -if [[ $CHILD -gt 0 ]]; then - wait_for - RESULT=$? - exit $RESULT -else - if [[ $TIMEOUT -gt 0 ]]; then - wait_for_wrapper - RESULT=$? - else - wait_for - RESULT=$? - fi -fi - -if [[ $CLI != "" ]]; then - if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then - echoerr "$cmdname: strict mode, refusing to execute subprocess" - exit $RESULT - fi - exec $CLI -else - exit $RESULT -fi http://git-wip-us.apache.org/repos/asf/metron/blob/ba9ddda6/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 5d64019..791ec58 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ <module>metron-analytics</module> <module>metron-platform</module> <module>metron-deployment</module> - <module>metron-docker</module> + <module>metron-contrib</module> <module>metron-interface</module> <module>site-book</module> <module>metron-stellar</module>