aboutsummaryrefslogtreecommitdiffstats
path: root/elasticstack/elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'elasticstack/elasticsearch')
-rw-r--r--elasticstack/elasticsearch/conf/README.md46
-rw-r--r--elasticstack/elasticsearch/conf/elasticsearch.properties40
-rw-r--r--elasticstack/elasticsearch/conf/elasticsearch.yml96
3 files changed, 182 insertions, 0 deletions
diff --git a/elasticstack/elasticsearch/conf/README.md b/elasticstack/elasticsearch/conf/README.md
new file mode 100644
index 0000000..5298f0a
--- /dev/null
+++ b/elasticstack/elasticsearch/conf/README.md
@@ -0,0 +1,46 @@
+#Elasticsearch canonical configuration
+--------------------------------------
+This elasticsearch configuration is the deployment settings for elasticsearch environment.
+
+
+#Files provided for elasticsearch deployment
+--------------------------------------------
+1. elasticsearch.yml
+2. elasticsearch.properties
+
+#Instructions for deployment
+----------------------------
+1. Create canonical path /etc/onap/elasticsearch/conf.d on the host on which the elasticsearch has to be installed.
+2. The elasticsearch.yml is parameterized and has tokens instead of values for certain deployment specific parameters. These tokens has a syntax as '$[a-zA-Z_]+'.
+3. These tokens are listed in another file elasticsearch.properties. These properties are also provided with commented description about them in the file itself. These tokens have to be replaced with the appropriate values as per the deployment environment before deployment.
+4. Now, save the final elasticsearch.yml at location created in step 1.
+5. Create canonical path /etc/onap/elasticsearch/data on the host. Provide it with write permissions for 'other' users.
+6. Following is the list of specifications for elasticsearch container creation-
+
+ Image - 'docker.elastic.co/elasticsearch/elasticsearch:5.4.0' available in the Elastic Docker Registry.
+
+ Port mapping - Elasticsearch requires to publish two ports to host which are specified in the elasticsearch.yml as 'http.port' and 'transport.tcp.port'.
+ Example - If the http.port is set to 9200 and transport.tcp.port to 9300.
+ The container port 9200 should be published to host port 9200
+ The container port 9300 should be published to host port 9300
+
+ Volume mount - The Elasticsearch container must have three host paths mapped as volume in the container
+
+ Configuration file path:
+ 1. Host path - /etc/onap/elasticsearch/conf.d/elasticsearch.yml mapped to
+ Container path - /usr/share/elasticsearch/config/elasticsearch.yml
+
+ Data File path:
+ 2. Host path - /usr/share/onap/elasticsearch/data/ mapped to
+ Container path - /usr/share/elasticsearch/data
+
+ The container data file path above is the value of "path.data:" specified in "elasticsearch.yml".
+
+ Log File Path:
+ 3. Host path - /var/log/onap/elasticsearch/ mapped to
+ Container path - /usr/share/elasticsearch/logs
+
+ The container log file path above is the value of "path.logs:" specified in "elasticsearch.yml".
+
+7. The Data File path volume mapping is specific to the particular elasticsearch instance on that host. This path i.e.(/etc/onap/elasticsearch/data) should not be shared and its content should be unique to that host.
+8. The elasticsearch.properties need not be deployed after the values from it are used. \ No newline at end of file
diff --git a/elasticstack/elasticsearch/conf/elasticsearch.properties b/elasticstack/elasticsearch/conf/elasticsearch.properties
new file mode 100644
index 0000000..f7072aa
--- /dev/null
+++ b/elasticstack/elasticsearch/conf/elasticsearch.properties
@@ -0,0 +1,40 @@
+#
+# Name of the Elasticsearch cluster.
+# A node can only join a cluster when it shares its cluster.name with all the other nodes in the cluster.
+# The default name is elasticsearch, but you should change it to an appropriate name which describes the
+# purpose of the cluster.
+cluster.name: onap-logging
+#
+# It is better to provide different meaningful names for different elastic nodes.
+# By default, Elasticsearch will take the 7 first character of the randomly generated uuid used as the node id.
+# Note that the node id is persisted and does not change when a node restarts
+#node.name: onap-logging-data-1
+#
+# ---------------------------------- Network -----------------------------------
+#
+# This IP is published for TCP & HTTP communications.
+# HTTP is used for REST communications.
+# TCP is used for communication between Elasticsearch cluster nodes
+# If you have different IPs for TCP & HTTP, you have to declare "transport.publish_host" & "http.publish_host"
+# More info: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
+network.publish_host: 10.247.60.131
+#
+# Set a custom port for HTTP: If required, default is 9200-9300
+# This is used for REST APIs
+#
+http.port: 9200
+#
+# Port to bind for communication between nodes. Accepts a single value or a range.
+# If a range is specified, the node will bind to the first available port in the range.
+# Defaults to 9300-9400.
+# More info:
+transport.tcp.port: 9300
+# --------------------------------- Discovery ---------------------------------
+#
+# Pass an initial list of hosts to perform discovery when new node is started:
+# To form a cluster with nodes on other servers, you have to provide a seed list of other nodes in the cluster
+# that are likely to be live and contactable.
+# By default, Elasticsearch will bind to the available loopback addresses and will scan ports 9300 to 9305 to try
+# to connect to other nodes running on the same server.
+# More info https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html
+discovery.zen.ping.unicast.hosts: ["10.247.60.131", "10.247.60.140", "10.247.60.142"] \ No newline at end of file
diff --git a/elasticstack/elasticsearch/conf/elasticsearch.yml b/elasticstack/elasticsearch/conf/elasticsearch.yml
new file mode 100644
index 0000000..3752367
--- /dev/null
+++ b/elasticstack/elasticsearch/conf/elasticsearch.yml
@@ -0,0 +1,96 @@
+# ======================== Elasticsearch Configuration =========================
+#
+# NOTE: Elasticsearch comes with reasonable defaults for most settings.
+# Before you set out to tweak and tune the configuration, make sure you
+# understand what are you trying to accomplish and the consequences.
+#
+# The primary way of configuring a node is via this file. This template lists
+# the most important settings you may want to configure for a production cluster.
+#
+# Please consult the documentation for further information on configuration options:
+# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
+#
+# ---------------------------------- Cluster -----------------------------------
+#
+# Name of the Elasticsearch cluster.
+# A node can only join a cluster when it shares its cluster.name with all the other nodes in the cluster.
+# The default name is elasticsearch, but you should change it to an appropriate name which describes the
+# purpose of the cluster.
+#
+cluster.name: $cluster.name
+#
+# ------------------------------------ Node ------------------------------------
+#
+# It is better to provide different meaningfull names fot different elastic nodes.
+# By default, Elasticsearch will take the 7 first character of the randomly generated uuid used as the node id.
+# Note that the node id is persisted and does not change when a node restarts
+#
+#node.name: $node.name
+#
+#
+# ----------------------------------- Paths ------------------------------------
+#
+# The location of the data files of each index / shard allocated on the node. Can hold multiple locations separated by coma.
+# In production, we should not keep this fixed, as on upgrading Elasticsearch, directory structure
+# may change & can deal to data loss.
+path.data: /usr/share/elasticsearch/data
+#
+# Elasticsearch's log files location. In production, we should not keep this default to "/elasticsearch/logs",
+# as on upgrading Elasticsearch, directory structure may change.
+path.logs: /usr/share/elasticsearch/logs
+#
+# ----------------------------------- Memory -----------------------------------
+#
+# It is vitally important to the health of your node that none of the JVM is ever swapped out to disk.
+# Lock the memory on startup.
+#
+bootstrap.memory_lock: true
+#
+# Make sure that the heap size is set to about half the memory available
+# on the system and that the owner of the process is allowed to use this
+# limit.
+#
+# Elasticsearch performs poorly when the system is swapping the memory.
+#
+# ---------------------------------- Network -----------------------------------
+# This IP is published for TCP & HTTP communications.
+# HTTP is used for REST communications.
+# TCP is used for communication between Elasticsearch cluster nodes
+# If you have different different IPs for TCP & HTTP, you have to declare "transport.publish_host" & "http.publish_host"
+# More info: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
+network.publish_host: $network.publish_host
+#
+# Set the bind address to a specific IP (IPv4 or IPv6):
+# In order to communicate and to form a cluster with nodes on other servers, your node will need to bind to a
+# non-loopback address.
+#network.host: "0.0.0.0"
+#
+# Set a custom port for HTTP: If required, default is 9200-9300
+# This is used for REST APIs
+http.port: $http.port
+#
+# Port to bind for communication between nodes. Accepts a single value or a range.
+# If a range is specified, the node will bind to the first available port in the range.
+# Defaults to 9300-9400.
+# More info:
+transport.tcp.port: $transport.tcp.port
+#
+# For more information, consult the network module documentation.
+#
+# --------------------------------- Discovery ----------------------------------
+#
+# Pass an initial list of hosts to perform discovery when new node is started:
+# To form a cluster with nodes on other servers, you have to provide a seed list of other nodes in the cluster
+# that are likely to be live and contactable.
+# By default, Elasticsearch will bind to the available loopback addresses and will scan ports 9300 to 9305 to try
+# to connect to other nodes running on the same server.
+#
+discovery.zen.ping.unicast.hosts: $discovery.zen.ping.unicast.hosts
+#
+# This setting tells Elasticsearch to not elect a master unless there are enough master-eligible nodes
+# available. Only then will an election take place.
+# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
+discovery.zen.minimum_master_nodes: 2
+#
+# For more information, consult the zen discovery module documentation.
+# \ No newline at end of file