Add Cross cluster search feature

Change-Id: I967341501dbea02d3a18506bfd7dd11bc106e018
PROD-related: PROD-22135
PROD-related: PROD-22134
diff --git a/elasticsearch/files/v5/elasticsearch.yml b/elasticsearch/files/v5/elasticsearch.yml
index ac1122f..b6f2289 100644
--- a/elasticsearch/files/v5/elasticsearch.yml
+++ b/elasticsearch/files/v5/elasticsearch.yml
@@ -53,7 +53,15 @@
 # Allow this node to store data (enabled by default):
 #
 node.data: {{ server.get('data', True)|lower }}
+node.ingest: {{ server.get('ingest', True)|lower }}
 
+{%- if server.attrs is defined %}
+  {%- for name, values in server.attrs.iteritems() %}
+    {%- if values.get('enabled', True) %}
+node.attr.{{ name }}: {{ values.get('value', True) | lower }}
+    {%- endif %}
+  {%- endfor %}
+{%- endif %}
 # You can exploit these settings to design advanced cluster topologies.
 #
 # 1. You want this node to never become a master node, only to hold data.
@@ -100,6 +108,24 @@
 thread_pool.bulk.queue_size: {{ server.threadpool.bulk.queue_size }}
 {%- endif %}
 
+############################### Remote Search #################################
+
+{%- if server.get("search", {}).get("remote", {}).connect is defined %}
+search.remote.connect: {{ server.search.connect | lower }}
+{%- endif %}
+
+{%- if server.get("search", {}).get("remote", {}).attr is defined %}
+search.remote.node.attr: {{ server.search.remote.attr }}
+{%- endif %}
+
+{%- if server.get("search", {}).get("remote", {}).clusters is defined %}
+  {%- for name, values in server.search.remote.clusters.iteritems() %}
+    {%- if values.get("enabled", True) %}
+search.remote.{{ name }}.seeds: {{ values.seeds | json }}
+    {%- endif %}
+  {%- endfor %}
+{%- endif %}
+
 #################################### Index ####################################
 
 # You can set a number of options (such as shard/replica options, mapping
@@ -244,10 +270,16 @@
 # Set a custom port for the node to node communication (9300 by default):
 #
 # transport.tcp.port: 9300
+{%- if server.get("transport", {}).get("tcp", {}).port is defined %}
+transport.tcp.port: {{ server.transport.tcp.port }}
+{%- endif %}
 
 # Enable compression for all communication between nodes (disabled by default):
 #
 # transport.tcp.compress: true
+{%- if server.get("transport", {}).get("tcp", {}).compress is defined %}
+transport.tcp.compress: {{ server.transport.tcp.compress | lower }}
+{%- endif %}
 
 # Set a custom port to listen for HTTP traffic:
 #