You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Andy Deweirt (JIRA)" <ji...@apache.org> on 2019/02/18 20:30:00 UTC

[jira] [Created] (METRON-2008) Path.Repo setting for Elasticsearch mpack

Andy Deweirt created METRON-2008:
------------------------------------

             Summary: Path.Repo setting for Elasticsearch mpack
                 Key: METRON-2008
                 URL: https://issues.apache.org/jira/browse/METRON-2008
             Project: Metron
          Issue Type: New Feature
            Reporter: Andy Deweirt


In order to be able to make elasticsearch snapshots you first need to register a snapshot repository. This is done in elasticsearch.yml with the path.repo paramater.

Source: [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html]

I've already made the necesarry changes on our local Metron deployment to make it work and wanted to contribute the code to get it included in future releases (and maybe also helping other that are currently missing the parameter)

 

Since I have no experience in contributing to a github project, I was hoping someone would be so kind to help me out on this ;)

 

These are the changes I made:
h2. resources/common-services/ELASTICSEARCH/5.6.14/configuration/elastic-site.xml

From:

 

_<property>_         _<name>path_data</name>_         _<value>"/opt/lmm/es_data"</value>_         _<description>Comma-separated list of directories where to store index data allocated for each node: "/mnt/first","/mnt/second".  Number of paths should relate to number of shards, and preferably should be on separate physical volumes.</description>_     _</property>_

 

To:

 

_<property>_         _<name>path_data</name>_         _<value>"/opt/lmm/es_data"</value>_         _<description>Comma-separated list of directories where to store index data allocated for each node: "/mnt/first","/mnt/second".  Number of paths should relate to number of shards, and preferably should be on separate physical volumes.</description>_     _</property>_ _<property>_         _<name>path_repo</name>_         _<value>""</value>_         _<description>Comma-separated list of directories where to store snapshot data allocated for each node: "/mnt/first","/mnt/second". In order to register the shared file system repository it is necessary to mount the same shared filesystem to the same location on all master and data nodes.</description>_     _</property>_

 

 
h2. resources/common-services/ELASTICSEARCH/5.6.14/package/scripts/elastic_commands.py

From:

_def get_data_directories(params):_     _"""_     _Returns the directories to use for storing Elasticsearch data._     _"""_     _path = params.path_data_     _path = path.replace('"', '')_     _path = path.replace(' ', '')_     _path = path.split(',')_     _dirs = [p.replace('"', '') for p in path]_       _Logger.info("Elasticsearch data directories: dirs=\{0}".format(dirs))_     _return dirs_

 

To:

_def get_data_directories(params):_     _"""_     _Returns the directories to use for storing Elasticsearch data._     _"""_     _path = params.path_data_     _path = path.replace('"', '')_     _path = path.replace(' ', '')_     _path = path.split(',')_     _dirs = [p.replace('"', '') for p in path]_       _Logger.info("Elasticsearch data directories: dirs=\{0}".format(dirs))_     _return dirs_   _def get_repo_directories(params):_     _"""_     _Returns the directories to use for storing Elasticsearch snapshots._     _"""_     _path = params.path_repo_     _path = path.replace('"', '')_     _path = path.replace(' ', '')_     _path = path.split(',')_     _dirs = [p.replace('"', '') for p in path]_       _Logger.info("Elasticsearch repo directories: dirs=\{0}".format(dirs))_     _return dirs_

 

 
h2. resources/common-services/ELASTICSEARCH/5.6.14/package/scripts/params.py

From:

_path_data = config['configurations']['elastic-site']['path_data']_

 

 

To:

_path_data = config['configurations']['elastic-site']['path_data']_ _path_repo = config['configurations']['elastic-site']['path_repo']_

 

 

 
h2. resources/common-services/ELASTICSEARCH/5.6.14/package/templates/elasticsearch.slave.yaml.j2

From:

_path:_   _data: \{{path_data}}_

 

To:

_path:_   _data: \{{path_data}}_   _repo: \{{path_repo}}_

 

 
h2. resources/common-services/ELASTICSEARCH/5.6.14/package/templates/elasticsearch.master.yaml.j2

From:

_path:_   _data: \{{path_data}}_

 

To:

_path:_   _data: \{{path_data}}_   _repo: \{{path_repo}}_



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)