[LOG-37]Config Elasticsearch Storage of ONAP Logs
[logging-analytics.git] / elasticstack / elasticsearch / conf / README.md
1 #Elasticsearch canonical configuration
2 --------------------------------------
3 This elasticsearch configuration is the deployment settings for elasticsearch environment.
4
5
6 #Files provided for elasticsearch deployment
7 --------------------------------------------
8 1. elasticsearch.yml
9 2. elasticsearch.properties
10
11 #Instructions for deployment
12 ----------------------------
13 1. Create canonical path /etc/onap/elasticsearch/conf.d on the host on which the elasticsearch has to be installed.
14 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_]+'. 
15 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.
16 4. Now, save the final elasticsearch.yml at location created in step 1.
17 5. Create canonical path /etc/onap/elasticsearch/data on the host. Provide it with write permissions for 'other' users.
18 6. Following is the list of specifications for elasticsearch container creation-
19
20    Image        - 'docker.elastic.co/elasticsearch/elasticsearch:5.4.0' available in the Elastic Docker Registry.
21
22    Port mapping -  Elasticsearch requires to publish two ports to host which are specified in the elasticsearch.yml as 'http.port' and 'transport.tcp.port'.
23                    Example - If the http.port is set to 9200 and transport.tcp.port to 9300.
24                      The container port 9200 should be published to host port 9200
25                      The container port 9300 should be published to host port 9300
26
27    Volume mount - The Elasticsearch container must have three host paths mapped as volume in the container
28    
29                                         Configuration file path:
30                   1. Host path      - /etc/onap/elasticsearch/conf.d/elasticsearch.yml   mapped to
31                      Container path - /usr/share/elasticsearch/config/elasticsearch.yml
32
33                                         Data File path:
34                   2. Host path      - /usr/share/onap/elasticsearch/data/               mapped to
35                      Container path - /usr/share/elasticsearch/data
36                                         
37                                          The container data file path above is the value of "path.data:" specified in "elasticsearch.yml".
38                                          
39                                         Log File Path:
40                                   3. Host path      - /var/log/onap/elasticsearch/              mapped to
41                      Container path - /usr/share/elasticsearch/logs
42                                         
43                                          The container log file path above is the value of "path.logs:" specified in "elasticsearch.yml".
44                                          
45 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.
46 8. The elasticsearch.properties need not be deployed after the values from it are used.