metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject incubator-metron git commit: METRON-563 Ambari Metron service uses incorrect port for installing Elasticsearch templates closes apache/incubator-metron#356
Date Fri, 11 Nov 2016 20:38:35 GMT
Repository: incubator-metron
Updated Branches:
  refs/heads/master 2e2bea430 -> 6e53fd2b1


METRON-563 Ambari Metron service uses incorrect port for installing Elasticsearch templates
closes apache/incubator-metron#356


Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/6e53fd2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/6e53fd2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/6e53fd2b

Branch: refs/heads/master
Commit: 6e53fd2b1afe1553c6bc2a6d80d5233e1573da42
Parents: 2e2bea4
Author: justinleet <justinjleet@gmail.com>
Authored: Fri Nov 11 15:36:41 2016 -0500
Committer: justinjleet <justinjleet@gmail.com>
Committed: Fri Nov 11 15:36:41 2016 -0500

----------------------------------------------------------------------
 .../0.2.1BETA/configuration/metron-env.xml      | 18 ++++++++++++---
 .../package/scripts/indexing_master.py          | 12 +++++-----
 .../package/scripts/params/params_linux.py      | 13 ++++++++---
 .../METRON/0.2.1BETA/themes/metron_theme.json   | 24 ++++++++++++++++++--
 4 files changed, 53 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/6e53fd2b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/configuration/metron-env.xml
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/configuration/metron-env.xml
b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/configuration/metron-env.xml
index 9929183..a6ea541 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/configuration/metron-env.xml
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/configuration/metron-env.xml
@@ -117,10 +117,22 @@
         <display-name>GEOIP Load Datafile URL</display-name>
     </property>
     <property require-input="true">
-        <name>es_url</name>
+        <name>es_hosts</name>
         <value></value>
-        <description>Comma delimited list of Elasticsearch URLs. (eshost1:9300,eshost2:9300)</description>
-        <display-name>Elasticsearch URL</display-name>
+        <description>Comma delimited list of Elasticsearch Hosts. (eshost1,eshost2)</description>
+        <display-name>Elasticsearch Hosts</display-name>
+    </property>
+    <property>
+        <name>es_binary_port</name>
+        <value>9300</value>
+        <description>Elasticsearch binary port. (9300)</description>
+        <display-name>Elasticsearch Binary Port</display-name>
+    </property>
+    <property>
+        <name>es_http_port</name>
+        <value>9200</value>
+        <description>Elasticsearch HTTP port. (9200)</description>
+        <display-name>Elasticsearch HTTP port</display-name>
     </property>
     <property require-input = "true">
         <name>storm_rest_addr</name>

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/6e53fd2b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/indexing_master.py
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/indexing_master.py
b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/indexing_master.py
index 1d681a2..e9efa03 100755
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/indexing_master.py
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/indexing_master.py
@@ -94,24 +94,24 @@ class Indexing(Script):
              )
 
         bro_cmd = ambari_format(
-            'curl -s -XPOST http://{es_url}/_template/bro_index -d @{bro_index_path}')
+            'curl -s -XPOST http://{es_http_url}/_template/bro_index -d @{bro_index_path}')
         Execute(bro_cmd, logoutput=True)
         snort_cmd = ambari_format(
-            'curl -s -XPOST http://{es_url}/_template/snort_index -d @{snort_index_path}')
+            'curl -s -XPOST http://{es_http_url}/_template/snort_index -d @{snort_index_path}')
         Execute(snort_cmd, logoutput=True)
         yaf_cmd = ambari_format(
-            'curl -s -XPOST http://{es_url}/_template/yaf_index -d @{yaf_index_path}')
+            'curl -s -XPOST http://{es_http_url}/_template/yaf_index -d @{yaf_index_path}')
         Execute(yaf_cmd, logoutput=True)
 
     def elasticsearch_template_delete(self, env):
         from params import params
         env.set_params(params)
 
-        bro_cmd = ambari_format('curl -s -XDELETE "http://{es_url}/bro_index*"')
+        bro_cmd = ambari_format('curl -s -XDELETE "http://{es_http_url}/bro_index*"')
         Execute(bro_cmd, logoutput=True)
-        snort_cmd = ambari_format('curl -s -XDELETE "http://{es_url}/snort_index*"')
+        snort_cmd = ambari_format('curl -s -XDELETE "http://{es_http_url}/snort_index*"')
         Execute(snort_cmd, logoutput=True)
-        yaf_cmd = ambari_format('curl -s -XDELETE "http://{es_url}/yaf_index*"')
+        yaf_cmd = ambari_format('curl -s -XDELETE "http://{es_http_url}/yaf_index*"')
         Execute(yaf_cmd, logoutput=True)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/6e53fd2b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/params/params_linux.py
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/params/params_linux.py
b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/params/params_linux.py
index 2d6aa9d..c418ad9 100755
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/params/params_linux.py
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/package/scripts/params/params_linux.py
@@ -56,10 +56,17 @@ enrichment_configured_flag_file = status_params.enrichment_configured_flag_file
 indexing_configured_flag_file = status_params.indexing_configured_flag_file
 global_json_template = config['configurations']['metron-env']['global-json']
 global_properties_template = config['configurations']['metron-env']['elasticsearch-properties']
-es_cluster_name = config['configurations']['metron-env']['es_cluster_name']
-es_url = config['configurations']['metron-env']['es_url']
 
-#install repo
+# Elasticsearch hosts and port management
+es_cluster_name = config['configurations']['metron-env']['es_cluster_name']
+es_hosts = config['configurations']['metron-env']['es_hosts']
+es_host_list = es_hosts.split(",")
+es_binary_port = config['configurations']['metron-env']['es_binary_port']
+es_url = ",".join([host + ":" + es_binary_port for host in es_host_list])
+es_http_port = config['configurations']['metron-env']['es_http_port']
+es_http_url = es_host_list[0] + ":" + es_http_port
+
+# install repo
 yum_repo_type = config['configurations']['metron-env']['repo_type']
 if yum_repo_type == 'local':
     repo_url = 'file:///localrepo'

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/6e53fd2b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/themes/metron_theme.json
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/themes/metron_theme.json
b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/themes/metron_theme.json
index ea554de..b939182 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/themes/metron_theme.json
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/0.2.1BETA/themes/metron_theme.json
@@ -110,7 +110,15 @@
           "subsection-name": "subsection-general-database"
         },
         {
-          "config": "metron-env/es_url",
+          "config": "metron-env/es_hosts",
+          "subsection-name": "subsection-general-indexing"
+        },
+        {
+          "config": "metron-env/es_binary_port",
+          "subsection-name": "subsection-general-indexing"
+        },
+        {
+          "config": "metron-env/es_http_port",
           "subsection-name": "subsection-general-indexing"
         },
         {
@@ -171,7 +179,19 @@
         }
       },
       {
-        "config": "metron-env/es_url",
+        "config": "metron-env/es_hosts",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "metron-env/es_binary_port",
+        "widget": {
+          "type": "text-field"
+        }
+      },
+      {
+        "config": "metron-env/es_http_port",
         "widget": {
           "type": "text-field"
         }


Mime
View raw message