Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue - 9] add important settings #10

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
- name: Set open files limit in sysctl.conf
sysctl:
name: fs.file-max
value: 65536
state: present
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
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