-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes #124: Replace curl by uri (#129) * replace curl by ansible.builtin.uri Signed-off-by: Florian Heiderich <[email protected]> * use os_status.json instead of os_status.stdout Signed-off-by: Florian Heiderich <[email protected]> * use ansible.builtin.uri instead of curl to get roles Signed-off-by: Florian Heiderich <[email protected]> --------- Signed-off-by: Florian Heiderich <[email protected]> * Fix a couple of ansible-lint errors (#126) * capitalize task names to pass ansible-lint Signed-off-by: Ravzan Valceanu <[email protected]> * Truthy value should be one of \[false, true]ansible-lint Signed-off-by: Ravzan Valceanu <[email protected]> * All tasks should be named.ansible-lint Signed-off-by: Ravzan Valceanu <[email protected]> * Use FQCN for builtin module actions - ansible-lint Use FQCN for module actions, such `ansible.posix.sysctl`. - ansible-lint Use FQCN for module actions, such `ansible.posix.selinux`. - ansible-lint Deprecated module. include - ansible-lint You can improve the task key order to: name, when, block - ansible-lint Signed-off-by: Ravzan Valceanu <[email protected]> * resolve conflict with main use wait_for module instead of pause Signed-off-by: Ravzan Valceanu <[email protected]> * add "" to variables in task Wait for opensearch to startup Signed-off-by: Ravzan Valceanu <[email protected]> * fix ansible lint inline vs yaml Signed-off-by: Ravzan Valceanu <[email protected]> --------- Signed-off-by: Ravzan Valceanu <[email protected]> Co-authored-by: Ravzan Valceanu <[email protected]> * Add missing logstash environment on documentation (#135) * doc: add missing logstash environment on documentation Update documentation to add missing logstash environment password. Signed-off-by: Charles Santos <[email protected]> * fix: remove auto format from vscode Signed-off-by: Charles Santos <[email protected]> --------- Signed-off-by: Charles Santos <[email protected]> * Duplicate of previous task (#132) Duplicate of previous task Signed-off-by: maxtimofeev <[email protected]> * Updating the CODEOWNERS and MAINTAINERS file (#119) Signed-off-by: bbarani <[email protected]> --------- Signed-off-by: Florian Heiderich <[email protected]> Signed-off-by: Ravzan Valceanu <[email protected]> Signed-off-by: Charles Santos <[email protected]> Signed-off-by: maxtimofeev <[email protected]> Signed-off-by: bbarani <[email protected]> Co-authored-by: Florian Heiderich <[email protected]> Co-authored-by: mpsOxygen <[email protected]> Co-authored-by: Ravzan Valceanu <[email protected]> Co-authored-by: Charles Santos <[email protected]> Co-authored-by: maxtimofeev <[email protected]> Co-authored-by: Barani <[email protected]>
- Loading branch information
1 parent
3339f2e
commit 99f8eb4
Showing
15 changed files
with
146 additions
and
125 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams | ||
* @opensearch-project/engineering-effectiveness @saravanan30erd | ||
* @bbarani @saravanan30erd @peterzhuamazon @prudhvigodithi @gaiksaya @TheAlgo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
## Maintainers | ||
## Overview | ||
|
||
| Maintainer | GitHub ID | Affiliation | | ||
| --------------- | --------- | ----------- | | ||
| Barani Bikshandi | [bbarani](https://github.com/bbarani) | Amazon | | ||
| Peter Zhu | [peterzhuamazon](https://github.com/peterzhuamazon) | Amazon | | ||
| Sayali Gaikawad | [gaiksaya](https://github.com/gaiksaya) | Amazon | | ||
| Prudhvi Godithi | [prudhvigodithi](https://github.com/prudhvigodithi) | Amazon | | ||
| Saravanan Palanisamy | [saravanan30erd](https://github.com/saravanan30erd) | Community | | ||
This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md). | ||
|
||
## Current Maintainers | ||
|
||
| Maintainer | GitHub ID | Affiliation | | ||
| ------------------- | --------------------------------------------------- | ----------- | | ||
| Barani Bikshandi | [bbarani](https://github.com/bbarani) | Amazon | | ||
| Peter Zhu | [peterzhuamazon](https://github.com/peterzhuamazon) | Amazon | | ||
| Sayali Gaikawad | [gaiksaya](https://github.com/gaiksaya) | Amazon | | ||
| Prudhvi Godithi | [prudhvigodithi](https://github.com/prudhvigodithi) | Amazon | | ||
|Dhiraj Kumar Jain | [TheAlgo](https://github.com/TheAlgo) | Amazon | | ||
| Saravanan Palanisamy | [saravanan30erd](https://github.com/saravanan30erd) | Community | | ||
|
||
[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
- name: restart dashboards | ||
systemd: name=dashboards state=restarted enabled=yes | ||
ansible.builtin.systemd: name=dashboards state=restarted enabled=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
- name: Hosts | populate inventory into hosts file | ||
blockinfile: | ||
ansible.builtin.blockinfile: | ||
dest: /etc/hosts | ||
block: |- | ||
{% for item in groups['dashboards'] %} | ||
{{ hostvars[item]['ip'] }} {{ item }}.{{ domain_name }} {{ item }} | ||
{% endfor %} | ||
state: present | ||
create: yes | ||
backup: yes | ||
create: true | ||
backup: true | ||
marker: "# Ansible inventory hosts {mark}" | ||
when: populate_inventory_to_hosts_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
--- | ||
|
||
- hostname: | ||
- name: Set hostname | ||
ansible.builtin.hostname: | ||
name: "{{ inventory_hostname }}" | ||
|
||
# Disabling for Amazon Linux 2 as selinux is disabled by default. | ||
- name: Disable the selinux | ||
selinux: | ||
ansible.posix.selinux: | ||
state: disabled | ||
when: (ansible_distribution != "Ubuntu") and (ansible_distribution != "Amazon") | ||
|
||
- name: Populate the nodes to /etc/hosts | ||
import_tasks: etchosts.yml | ||
ansible.builtin.import_tasks: etchosts.yml | ||
|
||
- name: Tune the system settings | ||
import_tasks: tune.yml | ||
ansible.builtin.import_tasks: tune.yml | ||
|
||
- name: include dashboards installation | ||
include: dashboards.yml | ||
- name: Include dashboards installation | ||
ansible.builtin.import_tasks: dashboards.yml | ||
|
||
- name: Make sure opensearch dashboards is started | ||
service: | ||
ansible.builtin.service: | ||
name: dashboards | ||
state: started | ||
enabled: yes | ||
enabled: true | ||
|
||
- name: Get all the installed dashboards plugins | ||
command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list" | ||
ansible.builtin.command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list" | ||
register: list_plugins | ||
|
||
- name: Show all the installed dashboards plugins | ||
debug: | ||
ansible.builtin.debug: | ||
msg: "{{ list_plugins.stdout }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
- name: Set open files limit in sysctl.conf | ||
sysctl: | ||
ansible.posix.sysctl: | ||
name: fs.file-max | ||
value: 65536 | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
--- | ||
# handlers file for opensearch | ||
- name: reload systemd configuration | ||
become: yes | ||
command: systemctl daemon-reload | ||
become: true | ||
ansible.builtin.command: systemctl daemon-reload | ||
|
||
# Restart service and ensure it is enabled | ||
|
||
- name: restart opensearch | ||
systemd: name=opensearch state=restarted enabled=yes | ||
ansible.builtin.systemd: name=opensearch state=restarted enabled=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
- name: Hosts | populate inventory into hosts file | ||
blockinfile: | ||
ansible.builtin.blockinfile: | ||
dest: /etc/hosts | ||
block: |- | ||
{% for item in groups['os-cluster'] %} | ||
{{ hostvars[item]['ip'] }} {{ item }}.{{ domain_name }} {{ item }} | ||
{% endfor %} | ||
state: present | ||
create: yes | ||
backup: yes | ||
create: true | ||
backup: true | ||
marker: "# Ansible inventory hosts {mark}" | ||
when: populate_inventory_to_hosts_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,77 @@ | ||
--- | ||
|
||
- hostname: | ||
- name: Set hostname | ||
ansible.builtin.hostname: | ||
name: "{{ inventory_hostname }}" | ||
|
||
# Disabling for Amazon Linux 2 as selinux is disabled by default. | ||
- name: Disable the selinux | ||
selinux: | ||
ansible.posix.selinux: | ||
state: disabled | ||
when: (ansible_distribution != "Ubuntu") and (ansible_distribution != "Amazon") | ||
|
||
- name: Populate the nodes to /etc/hosts | ||
import_tasks: etchosts.yml | ||
ansible.builtin.import_tasks: etchosts.yml | ||
|
||
- name: Tune the system settings | ||
import_tasks: tune.yml | ||
ansible.builtin.import_tasks: tune.yml | ||
|
||
- name: include opensearch installation | ||
include: opensearch.yml | ||
- name: Include opensearch installation | ||
ansible.builtin.import_tasks: opensearch.yml | ||
|
||
- name: include security plugin for opensearch | ||
include: security.yml | ||
- name: Include security plugin for opensearch | ||
ansible.builtin.import_tasks: security.yml | ||
|
||
# After the cluster forms successfully for the first time, | ||
# remove the cluster.initial_master_nodes setting from each nodes' configuration. | ||
- name: Remove `cluster.initial_master_nodes` setting from configuration | ||
command: sed -i '/cluster.initial_master_nodes/d' "{{os_conf_dir}}/opensearch.yml" | ||
ansible.builtin.command: sed -i '/cluster.initial_master_nodes/d' "{{ os_conf_dir }}/opensearch.yml" | ||
|
||
- name: Make sure opensearch is started | ||
service: | ||
ansible.builtin.service: | ||
name: opensearch | ||
state: started | ||
enabled: yes | ||
enabled: true | ||
|
||
- name: Get all the installed ES plugins | ||
command: "{{ os_plugin_bin_path }} list" | ||
ansible.builtin.command: "{{ os_plugin_bin_path }} list" | ||
register: list_plugins | ||
|
||
- name: Show all the installed ES plugins | ||
debug: | ||
ansible.builtin.debug: | ||
msg: "{{ list_plugins.stdout }}" | ||
|
||
- name: Wait for opensearch to startup | ||
wait_for: host={{ hostvars[inventory_hostname]['ip'] }} port={{os_api_port}} delay=5 connect_timeout=1 | ||
ansible.builtin.wait_for: | ||
host: "{{ hostvars[inventory_hostname]['ip'] }}" | ||
port: "{{ os_api_port }}" | ||
delay: 5 | ||
connect_timeout: 1 | ||
timeout: 120 | ||
|
||
- name: Check the opensearch status | ||
command: curl https://{{ inventory_hostname }}:9200/_cluster/health?pretty -u 'admin:{{ admin_password }}' -k | ||
ansible.builtin.uri: | ||
url: "https://{{ inventory_hostname }}:9200/_cluster/health?pretty" | ||
user: admin | ||
password: "{{ admin_password }}" | ||
validate_certs: false | ||
register: os_status | ||
|
||
- name: Show the opensearch status | ||
debug: | ||
msg: "{{ os_status.stdout }}" | ||
failed_when: "'number_of_nodes' not in os_status.stdout" | ||
msg: "{{ os_status.json }}" | ||
failed_when: "'number_of_nodes' not in os_status.json" | ||
|
||
- name: Verify the roles of opensearch cluster nodes | ||
command: curl https://{{ inventory_hostname }}:9200/_cat/nodes?v -u 'admin:{{ admin_password }}' -k | ||
ansible.builtin.uri: | ||
url: "https://{{ inventory_hostname }}:9200/_cat/nodes?v" | ||
user: admin | ||
password: "{{ admin_password }}" | ||
validate_certs: false | ||
register: os_roles | ||
run_once: true | ||
|
||
- name: Show the roles of opensearch cluster nodes | ||
debug: | ||
msg: "{{ os_roles.stdout }}" | ||
msg: "{{ os_roles }}" | ||
run_once: true |
Oops, something went wrong.