From cc1741bf48528fda629bd0c65f6a3bb5d82899d6 Mon Sep 17 00:00:00 2001 From: Michael Miklavcic Date: Wed, 16 Nov 2016 10:39:54 -0700 Subject: [PATCH 1/4] Change to use assembly plugin for version revving --- metron-analytics/metron-profiler/README.md | 4 ++-- .../src/main/assemblies/metron-mpack.xml | 16 ++++++++++++++++ .../METRON/{0.3.0 => CURRENT}/metainfo.xml | 4 ++-- .../{0.3.0 => CURRENT}/role_command_order.json | 0 .../configuration/metron-env.xml | 2 +- .../METRON/{0.3.0 => CURRENT}/metainfo.xml | 2 +- .../package/files/addMysqlUser.sh | 0 .../package/files/bro_index.template | 0 .../package/files/createMysqlGeoIp.sh | 0 .../package/files/removeMysqlUser.sh | 0 .../package/files/snort_index.template | 0 .../package/files/yaf_index.template | 0 .../package/scripts/enrichment_commands.py | 4 ++-- .../package/scripts/enrichment_master.py | 0 .../package/scripts/indexing_commands.py | 4 ++-- .../package/scripts/indexing_master.py | 0 .../package/scripts/metron_service.py | 0 .../package/scripts/mysql_server.py | 0 .../package/scripts/mysql_service.py | 0 .../package/scripts/mysql_users.py | 0 .../package/scripts/mysql_utils.py | 0 .../package/scripts/params/__init__.py | 0 .../package/scripts/params/params.py | 0 .../package/scripts/params/params_linux.py | 0 .../package/scripts/params/params_windows.py | 0 .../package/scripts/params/status_params.py | 0 .../package/scripts/parser_commands.py | 4 ++-- .../package/scripts/parser_master.py | 0 .../package/scripts/service_check.py | 0 .../package/templates/enrichment.properties.j2 | 0 .../quicklinks/quicklinks.json | 0 .../METRON/{0.3.0 => CURRENT}/service_advisor.py | 0 .../{0.3.0 => CURRENT}/themes/metron_theme.json | 0 .../metron-mpack/src/main/resources/mpack.json | 2 +- 34 files changed, 29 insertions(+), 13 deletions(-) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/{0.3.0 => CURRENT}/metainfo.xml (87%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/{0.3.0 => CURRENT}/role_command_order.json (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/configuration/metron-env.xml (99%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/metainfo.xml (99%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/addMysqlUser.sh (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/bro_index.template (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/createMysqlGeoIp.sh (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/removeMysqlUser.sh (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/snort_index.template (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/files/yaf_index.template (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/enrichment_commands.py (97%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/enrichment_master.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/indexing_commands.py (97%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/indexing_master.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/metron_service.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/mysql_server.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/mysql_service.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/mysql_users.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/mysql_utils.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/params/__init__.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/params/params.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/params/params_linux.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/params/params_windows.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/params/status_params.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/parser_commands.py (98%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/parser_master.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/scripts/service_check.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/package/templates/enrichment.properties.j2 (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/quicklinks/quicklinks.json (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/service_advisor.py (100%) rename metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/{0.3.0 => CURRENT}/themes/metron_theme.json (100%) diff --git a/metron-analytics/metron-profiler/README.md b/metron-analytics/metron-profiler/README.md index 3a52133570..0899f80d72 100644 --- a/metron-analytics/metron-profiler/README.md +++ b/metron-analytics/metron-profiler/README.md @@ -41,7 +41,7 @@ This section will describe the steps required to get your first profile running. 1. Upload the profile definition to Zookeeper. ``` - $ cd /usr/metron/0.3.0/ + $ cd $METRON_HOME $ bin/zk_load_configs.sh -m PUSH -i config/zookeeper/ -z node1:2181 ``` @@ -171,7 +171,7 @@ The Profiler runs as an independent Storm topology. The configuration for the P After altering the configuration, start the Profiler. ``` -$ /usr/metron/0.3.0/start_profiler_topology.sh +$ $METRON_HOME/start_profiler_topology.sh ``` ## Examples diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml index 238b028fd7..f90bd9416b 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml @@ -24,13 +24,29 @@ true + + src/main/resources/common-services/METRON/CURRENT + common-services/METRON/${project.parent.version} + true + src/main/resources/common-services common-services + + **/CURRENT/** + + + + src/main/resources/addon-services/METRON/CURRENT + addon-services/METRON/${project.parent.version} + true src/main/resources/addon-services addon-services + + **/CURRENT/** + diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/0.3.0/metainfo.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml similarity index 87% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/0.3.0/metainfo.xml rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml index 86231eca21..852c512522 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/0.3.0/metainfo.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml @@ -19,8 +19,8 @@ METRON - 0.3.0 - common-services/METRON/0.3.0 + ${project.parent.version} + common-services/METRON/${project.parent.version} diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/0.3.0/role_command_order.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/role_command_order.json similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/0.3.0/role_command_order.json rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/role_command_order.json diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/configuration/metron-env.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml similarity index 99% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/configuration/metron-env.xml rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml index da96be8243..326ed4c3e7 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/configuration/metron-env.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml @@ -20,7 +20,7 @@ metron_home - /usr/metron/0.3.0 + /usr/metron/${project.parent.version} Metron home directory Metron home diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/metainfo.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml similarity index 99% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/metainfo.xml rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml index 08b8461782..69f32580af 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/metainfo.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml @@ -22,7 +22,7 @@ METRON Metron A scalable advanced security analytics framework built on Hadoop - 0.3.0 + ${project.parent.version} diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/addMysqlUser.sh b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/addMysqlUser.sh similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/addMysqlUser.sh rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/addMysqlUser.sh diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/bro_index.template b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/bro_index.template similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/bro_index.template rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/bro_index.template diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/createMysqlGeoIp.sh b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/createMysqlGeoIp.sh similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/createMysqlGeoIp.sh rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/createMysqlGeoIp.sh diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/removeMysqlUser.sh b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/removeMysqlUser.sh similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/removeMysqlUser.sh rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/removeMysqlUser.sh diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/snort_index.template b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/snort_index.template similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/snort_index.template rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/snort_index.template diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/yaf_index.template b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/yaf_index.template similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/files/yaf_index.template rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/yaf_index.template diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py similarity index 97% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_commands.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py index f43073d31e..17df39ce79 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py @@ -70,8 +70,8 @@ def remote_repo(): if repo_type in yum_repo_types: yum_repo_types[repo_type]() Logger.info("Writing out repo file") - repo_template = ("echo \"[METRON-0.3.0]\n" - "name=Metron 0.3.0 packages\n" + repo_template = ("echo \"[METRON-${project.parent.version}]\n" + "name=Metron ${project.parent.version} packages\n" "baseurl={0}\n" "gpgcheck=0\n" "enabled=1\n\"" diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_master.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_master.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/enrichment_master.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_master.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/indexing_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py similarity index 97% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/indexing_commands.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py index 165a4aecd9..1c08e529c0 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/indexing_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py @@ -52,8 +52,8 @@ def local_repo(): Execute("yum -y install createrepo") Execute("createrepo /localrepo") Execute("chmod -R o-w+r /localrepo") - Execute("echo \"[METRON-0.3.0]\n" - "name=Metron 0.3.0 packages\n" + Execute("echo \"[METRON-${project.parent.version}]\n" + "name=Metron ${project.parent.version} packages\n" "baseurl=file:///localrepo\n" "gpgcheck=0\n" "enabled=1\" > /etc/yum.repos.d/local.repo") diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/indexing_master.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/indexing_master.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/metron_service.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/metron_service.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_server.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_server.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_server.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_server.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_service.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_service.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_service.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_service.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_users.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_users.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_users.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_users.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_utils.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_utils.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/mysql_utils.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/mysql_utils.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/__init__.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/__init__.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/__init__.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/__init__.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params_linux.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params_linux.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params_windows.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_windows.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/params_windows.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_windows.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/status_params.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/status_params.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/params/status_params.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/status_params.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/parser_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py similarity index 98% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/parser_commands.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py index d43333ca4c..10b1c970a3 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/parser_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py @@ -77,8 +77,8 @@ def local_repo(): Execute("yum -y install createrepo") Execute("createrepo /localrepo") Execute("chmod -R o-w+r /localrepo") - Execute("echo \"[METRON-0.3.0]\n" - "name=Metron 0.3.0 packages\n" + Execute("echo \"[METRON-${project.parent.version}]\n" + "name=Metron ${project.parent.version} packages\n" "baseurl=file:///localrepo\n" "gpgcheck=0\n" "enabled=1\" > /etc/yum.repos.d/local.repo") diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/parser_master.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_master.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/parser_master.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_master.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/service_check.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/service_check.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/scripts/service_check.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/service_check.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/templates/enrichment.properties.j2 b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/templates/enrichment.properties.j2 similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/package/templates/enrichment.properties.j2 rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/templates/enrichment.properties.j2 diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/quicklinks/quicklinks.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/quicklinks/quicklinks.json similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/quicklinks/quicklinks.json rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/quicklinks/quicklinks.json diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/service_advisor.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/service_advisor.py rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/themes/metron_theme.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json similarity index 100% rename from metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.3.0/themes/metron_theme.json rename to metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json index 0ffdd49fac..6a3de3def9 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json @@ -62,7 +62,7 @@ }, { "service_name" : "METRON", - "service_version" : "0.3.0", + "service_version" : "${project.parent.version}", "applicable_stacks" : [ { "stack_name" : "HDP", From 5c3be8846b9a543cacaec05f1c73b5fe94c191ec Mon Sep 17 00:00:00 2001 From: Michael Miklavcic Date: Mon, 21 Nov 2016 08:42:56 -0700 Subject: [PATCH 2/4] METRON-580: Remove hard-coded Metron version from Ambari MPack code --- .../packaging/ambari/metron-mpack/pom.xml | 17 +++++++++++++++++ .../src/main/assemblies/metron-mpack.xml | 4 ++-- .../addon-services/METRON/CURRENT/metainfo.xml | 4 ++-- .../METRON/CURRENT/configuration/metron-env.xml | 2 +- .../common-services/METRON/CURRENT/metainfo.xml | 2 +- .../package/scripts/enrichment_commands.py | 4 ++-- .../package/scripts/indexing_commands.py | 4 ++-- .../CURRENT/package/scripts/parser_commands.py | 4 ++-- .../METRON/CURRENT/service_advisor.py | 2 +- .../metron-mpack/src/main/resources/mpack.json | 2 +- .../roles/sensor-test-mode/tasks/yaf.yml | 1 + 11 files changed, 32 insertions(+), 14 deletions(-) diff --git a/metron-deployment/packaging/ambari/metron-mpack/pom.xml b/metron-deployment/packaging/ambari/metron-mpack/pom.xml index eb2be17114..5d1eb9fa53 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/pom.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/pom.xml @@ -30,6 +30,10 @@ ../../.. + + ${project.parent.version} + + @@ -60,6 +64,19 @@ false + + metron-short-version + + regex-property + + + metron.short.version + ${project.parent.version} + \. + + true + + diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml index f90bd9416b..ec4272e708 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml @@ -26,7 +26,7 @@ src/main/resources/common-services/METRON/CURRENT - common-services/METRON/${project.parent.version} + common-services/METRON/${metron.version} true @@ -38,7 +38,7 @@ src/main/resources/addon-services/METRON/CURRENT - addon-services/METRON/${project.parent.version} + addon-services/METRON/${metron.version} true diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml index 852c512522..3edff645c4 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/addon-services/METRON/CURRENT/metainfo.xml @@ -19,8 +19,8 @@ METRON - ${project.parent.version} - common-services/METRON/${project.parent.version} + ${metron.version} + common-services/METRON/${metron.version} diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml index 326ed4c3e7..515dacb53e 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-env.xml @@ -20,7 +20,7 @@ metron_home - /usr/metron/${project.parent.version} + /usr/metron/${metron.version} Metron home directory Metron home diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml index 69f32580af..e1dc7a40e4 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/metainfo.xml @@ -22,7 +22,7 @@ METRON Metron A scalable advanced security analytics framework built on Hadoop - ${project.parent.version} + ${metron.version} diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py index 17df39ce79..d202ac9b7e 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/enrichment_commands.py @@ -70,8 +70,8 @@ def remote_repo(): if repo_type in yum_repo_types: yum_repo_types[repo_type]() Logger.info("Writing out repo file") - repo_template = ("echo \"[METRON-${project.parent.version}]\n" - "name=Metron ${project.parent.version} packages\n" + repo_template = ("echo \"[METRON-${metron.version}]\n" + "name=Metron ${metron.version} packages\n" "baseurl={0}\n" "gpgcheck=0\n" "enabled=1\n\"" diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py index 1c08e529c0..a6185049ce 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_commands.py @@ -52,8 +52,8 @@ def local_repo(): Execute("yum -y install createrepo") Execute("createrepo /localrepo") Execute("chmod -R o-w+r /localrepo") - Execute("echo \"[METRON-${project.parent.version}]\n" - "name=Metron ${project.parent.version} packages\n" + Execute("echo \"[METRON-${metron.version}]\n" + "name=Metron ${metron.version} packages\n" "baseurl=file:///localrepo\n" "gpgcheck=0\n" "enabled=1\" > /etc/yum.repos.d/local.repo") diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py index 10b1c970a3..e6f0f3a704 100755 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/parser_commands.py @@ -77,8 +77,8 @@ def local_repo(): Execute("yum -y install createrepo") Execute("createrepo /localrepo") Execute("chmod -R o-w+r /localrepo") - Execute("echo \"[METRON-${project.parent.version}]\n" - "name=Metron ${project.parent.version} packages\n" + Execute("echo \"[METRON-${metron.version}]\n" + "name=Metron ${metron.version} packages\n" "baseurl=file:///localrepo\n" "gpgcheck=0\n" "enabled=1\" > /etc/yum.repos.d/local.repo") diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py index 6700278e15..618fd6a624 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/service_advisor.py @@ -34,7 +34,7 @@ traceback.print_exc() print "Failed to load parent" -class METRON030ServiceAdvisor(service_advisor.ServiceAdvisor): +class METRON${metron.short.version}ServiceAdvisor(service_advisor.ServiceAdvisor): def getServiceComponentLayoutValidations(self, services, hosts): diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json index 6a3de3def9..5643d71f13 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json +++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/mpack.json @@ -62,7 +62,7 @@ }, { "service_name" : "METRON", - "service_version" : "${project.parent.version}", + "service_version" : "${metron.version}", "applicable_stacks" : [ { "stack_name" : "HDP", diff --git a/metron-deployment/roles/sensor-test-mode/tasks/yaf.yml b/metron-deployment/roles/sensor-test-mode/tasks/yaf.yml index c867d60074..64354acbf1 100644 --- a/metron-deployment/roles/sensor-test-mode/tasks/yaf.yml +++ b/metron-deployment/roles/sensor-test-mode/tasks/yaf.yml @@ -20,6 +20,7 @@ # - name: Stop running instances of yaf service: name=yaf state=stopped + ignore_errors: yes - name: Configure yaf to generate a flow record for every network packet lineinfile: From 0ee29e15eb0c3f299d0eab11142aa91b130cf803 Mon Sep 17 00:00:00 2001 From: Michael Miklavcic Date: Thu, 8 Dec 2016 14:44:29 -0700 Subject: [PATCH 3/4] METRON-580: Handle -SNAPSHOT in version --- metron-deployment/packaging/ambari/metron-mpack/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metron-deployment/packaging/ambari/metron-mpack/pom.xml b/metron-deployment/packaging/ambari/metron-mpack/pom.xml index 5d1eb9fa53..8b2d1f0f39 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/pom.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/pom.xml @@ -26,7 +26,7 @@ org.apache.metron metron-deployment - 0.3.0 + 0.3.0-SNAPSHOT ../../.. @@ -72,7 +72,7 @@ metron.short.version ${project.parent.version} - \. + [^a-zA-Z0-9] true From 5ece74f854603bdd81d9210b8b05a1452a2fec5b Mon Sep 17 00:00:00 2001 From: Michael Miklavcic Date: Thu, 8 Dec 2016 15:21:54 -0700 Subject: [PATCH 4/4] METRON-580: Handle -SNAPSHOT in version --- .../packaging/ambari/metron-mpack/pom.xml | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/metron-deployment/packaging/ambari/metron-mpack/pom.xml b/metron-deployment/packaging/ambari/metron-mpack/pom.xml index 8b2d1f0f39..31c5c5339e 100644 --- a/metron-deployment/packaging/ambari/metron-mpack/pom.xml +++ b/metron-deployment/packaging/ambari/metron-mpack/pom.xml @@ -26,14 +26,10 @@ org.apache.metron metron-deployment - 0.3.0-SNAPSHOT + 0.3.0 ../../.. - - ${project.parent.version} - - @@ -52,15 +48,15 @@ - regex-property + metron-version regex-property - mpackVersion - ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* - $1.$2.$3.$4 + metron.version + ${project.parent.version} + -SNAPSHOT + false @@ -72,9 +68,9 @@ metron.short.version ${project.parent.version} - [^a-zA-Z0-9] + \.|-SNAPSHOT - true + false