Skip to content

Commit

Permalink
[issue - 9] Add important settings recommendations (#10)
Browse files Browse the repository at this point in the history
* add important settings in dashboards

Signed-off-by: saravanan palanisamy <[email protected]>
  • Loading branch information
saravanan30erd authored Nov 1, 2021
1 parent f2750ef commit 2be071c
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions roles/centos7/dashboards/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- name: Populate the nodes to /etc/hosts
import_tasks: etchosts.yml

- name: Tune the system settings
import_tasks: tune.yml

- name: include dashboards installation
include: dashboards.yml

Expand Down
6 changes: 6 additions & 0 deletions roles/centos7/dashboards/tasks/tune.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Set open files limit in sysctl.conf
sysctl:
name: fs.file-max
value: 65536
state: present
2 changes: 1 addition & 1 deletion roles/centos7/dashboards/templates/dashboards.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ StandardOutput=journal
StandardError=inherit

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65535
LimitNOFILE=65536

# Specifies the maximum number of processes
LimitNPROC=4096
Expand Down
3 changes: 3 additions & 0 deletions roles/centos7/opensearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- name: Populate the nodes to /etc/hosts
import_tasks: etchosts.yml

- name: Tune the system settings
import_tasks: tune.yml

- name: include opensearch installation
include: opensearch.yml

Expand Down
12 changes: 12 additions & 0 deletions roles/centos7/opensearch/tasks/tune.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Set vm.max_map_count in sysctl.conf
sysctl:
name: vm.max_map_count
value: 262144
state: present

- name: Set open files limit in sysctl.conf
sysctl:
name: fs.file-max
value: 65536
state: present
5 changes: 4 additions & 1 deletion roles/centos7/opensearch/templates/opensearch.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ StandardOutput=journal
StandardError=inherit

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65535
LimitNOFILE=65536

# Specifies the memory lock settings
LimitMEMLOCK=infinity

# Specifies the maximum number of processes
LimitNPROC=4096
Expand Down
2 changes: 2 additions & 0 deletions roles/centos7/opensearch/templates/opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ network.host: "{{ hostvars[inventory_hostname]['ip'] }}"
http.port: 9200

discovery.type: single-node

bootstrap.memory_lock: true

0 comments on commit 2be071c

Please sign in to comment.