Skip to content

Commit 99f8eb4

Browse files
peterzhuamazonheiderichmpsOxygenRavzan Valceanuthyarles
authored
Backport 1.x PR #119 #129 #126 #135 #132 (#139)
* 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]>
1 parent 3339f2e commit 99f8eb4

File tree

15 files changed

+146
-125
lines changed

15 files changed

+146
-125
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
2-
* @opensearch-project/engineering-effectiveness @saravanan30erd
2+
* @bbarani @saravanan30erd @peterzhuamazon @prudhvigodithi @gaiksaya @TheAlgo

MAINTAINERS.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
## Maintainers
1+
## Overview
22

3-
| Maintainer | GitHub ID | Affiliation |
4-
| --------------- | --------- | ----------- |
5-
| Barani Bikshandi | [bbarani](https://github.com/bbarani) | Amazon |
6-
| Peter Zhu | [peterzhuamazon](https://github.com/peterzhuamazon) | Amazon |
7-
| Sayali Gaikawad | [gaiksaya](https://github.com/gaiksaya) | Amazon |
8-
| Prudhvi Godithi | [prudhvigodithi](https://github.com/prudhvigodithi) | Amazon |
9-
| Saravanan Palanisamy | [saravanan30erd](https://github.com/saravanan30erd) | Community |
3+
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).
4+
5+
## Current Maintainers
6+
7+
| Maintainer | GitHub ID | Affiliation |
8+
| ------------------- | --------------------------------------------------- | ----------- |
9+
| Barani Bikshandi | [bbarani](https://github.com/bbarani) | Amazon |
10+
| Peter Zhu | [peterzhuamazon](https://github.com/peterzhuamazon) | Amazon |
11+
| Sayali Gaikawad | [gaiksaya](https://github.com/gaiksaya) | Amazon |
12+
| Prudhvi Godithi | [prudhvigodithi](https://github.com/prudhvigodithi) | Amazon |
13+
|Dhiraj Kumar Jain | [TheAlgo](https://github.com/TheAlgo) | Amazon |
14+
| Saravanan Palanisamy | [saravanan30erd](https://github.com/saravanan30erd) | Community |
1015

11-
[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).

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,17 @@ cluster_type: single-node
9595

9696

9797
# Deploy with ansible playbook - run the playbook as root
98-
ansible-playbook -i inventories/opensearch/hosts opensearch.yml --extra-vars "admin_password=Test@123 kibanaserver_password=Test@6789"
98+
ansible-playbook -i inventories/opensearch/hosts opensearch.yml --extra-vars "admin_password=Test@123 kibanaserver_password=Test@6789 logstash_password=Test@456"
9999

100-
You should set the reserved users(`admin` and `kibanaserver`) password using `admin_password` and `kibanaserver_password` variables.
100+
You should set the reserved users(`admin`, `kibanaserver`, and `logstash`) password using `admin_password`, `kibanaserver_password`, and `logstash_password` variables.
101101

102-
If you define your own internal users (in addition to the reserved `admin` and `kibanaserver`) in custom configuration
102+
If you define your own internal users (in addition to the reserved `admin`, `kibanaserver`, and `logstash`) in custom configuration
103103
files, then passwords to them should be set via variables on the principle of `<username>_password`
104104

105105
It will install and configure the opensearch. Once the deployment completed, you can access the opensearch Dashboards with user `admin` and password which you provided for variable `admin_password`.
106106

107107
# Deploy with ansible playbook - run the playbook as non-root user which have sudo privileges,
108-
ansible-playbook -i inventories/opensearch/hosts opensearch.yml --extra-vars "admin_password=Test@123 kibanaserver_password=Test@6789" --become
108+
ansible-playbook -i inventories/opensearch/hosts opensearch.yml --extra-vars "admin_password=Test@123 kibanaserver_password=Test@6789 logstash_password=Test@456" --become
109109

110110
**Note**: Change the user details in `ansible_user` parameter in `inventories/opensearch/hosts` inventory file.
111111

opensearch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22

3-
- name: opensearch installation & configuration
3+
- name: Opensearch installation & configuration
44
hosts: os-cluster
55
gather_facts: true
66
roles:
77
- { role: linux/opensearch }
88

9-
- name: opensearch dashboards installation & configuration
9+
- name: Opensearch dashboards installation & configuration
1010
hosts: dashboards
1111
gather_facts: true
1212
roles:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
- name: restart dashboards
3-
systemd: name=dashboards state=restarted enabled=yes
3+
ansible.builtin.systemd: name=dashboards state=restarted enabled=true
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22

33
- name: Dashboards Install | Download opensearch dashbaord {{ os_dashboards_version }}
4-
get_url:
4+
ansible.builtin.get_url:
55
url: "{{ os_download_url }}-dashboards/{{ os_dashboards_version }}/opensearch-dashboards-{{ os_dashboards_version }}-linux-x64.tar.gz"
66
dest: "/tmp/opensearch-dashboards.tar.gz"
77
register: download
88

99
- name: Dashboards Install | Create opensearch dashboard user
10-
user:
10+
ansible.builtin.user:
1111
name: "{{ os_dashboards_user }}"
1212
state: present
1313
shell: /bin/false
@@ -16,41 +16,41 @@
1616
when: download.changed or iac_enable
1717

1818
- name: Dashboards Install | Create home directory
19-
file:
19+
ansible.builtin.file:
2020
path: "{{ os_dashboards_home }}"
2121
state: directory
2222
owner: "{{ os_dashboards_user }}"
2323
group: "{{ os_dashboards_user }}"
2424
when: download.changed or iac_enable
2525

2626
- name: Dashboards Install | Extract the tar file
27-
command: chdir=/tmp/ tar -xvzf opensearch-dashboards.tar.gz -C "{{ os_dashboards_home }}" --strip-components=1
27+
ansible.builtin.command: chdir=/tmp/ tar -xvzf opensearch-dashboards.tar.gz -C "{{ os_dashboards_home }}" --strip-components=1
2828
when: download.changed or iac_enable
2929

3030
- name: Dashboards Install | Copy Configuration File
31-
template:
31+
ansible.builtin.template:
3232
src: opensearch_dashboards.yml
33-
dest: "{{os_conf_dir}}/opensearch_dashboards.yml"
33+
dest: "{{ os_conf_dir }}/opensearch_dashboards.yml"
3434
owner: "{{ os_dashboards_user }}"
3535
group: "{{ os_dashboards_user }}"
3636
mode: 0644
37-
backup: yes
37+
backup: true
3838

3939
- name: Dashboards Install | Set the file ownerships
40-
file:
40+
ansible.builtin.file:
4141
dest: "{{ os_dashboards_home }}"
4242
owner: "{{ os_dashboards_user }}"
4343
group: "{{ os_dashboards_user }}"
44-
recurse: yes
44+
recurse: true
4545

4646
- name: Dashboards Install | Set the folder permission
47-
file:
47+
ansible.builtin.file:
4848
dest: "{{ os_conf_dir }}"
4949
owner: "{{ os_dashboards_user }}"
5050
group: "{{ os_dashboards_user }}"
5151
mode: 0700
5252

5353
- name: Dashboards Install | create systemd service
54-
template:
54+
ansible.builtin.template:
5555
src: dashboards.service
5656
dest: "{{ systemctl_path }}/dashboards.service"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: Hosts | populate inventory into hosts file
3-
blockinfile:
3+
ansible.builtin.blockinfile:
44
dest: /etc/hosts
55
block: |-
66
{% for item in groups['dashboards'] %}
77
{{ hostvars[item]['ip'] }} {{ item }}.{{ domain_name }} {{ item }}
88
{% endfor %}
99
state: present
10-
create: yes
11-
backup: yes
10+
create: true
11+
backup: true
1212
marker: "# Ansible inventory hosts {mark}"
1313
when: populate_inventory_to_hosts_file

roles/linux/dashboards/tasks/main.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
---
22

3-
- hostname:
3+
- name: Set hostname
4+
ansible.builtin.hostname:
45
name: "{{ inventory_hostname }}"
56

67
# Disabling for Amazon Linux 2 as selinux is disabled by default.
78
- name: Disable the selinux
8-
selinux:
9+
ansible.posix.selinux:
910
state: disabled
1011
when: (ansible_distribution != "Ubuntu") and (ansible_distribution != "Amazon")
1112

1213
- name: Populate the nodes to /etc/hosts
13-
import_tasks: etchosts.yml
14+
ansible.builtin.import_tasks: etchosts.yml
1415

1516
- name: Tune the system settings
16-
import_tasks: tune.yml
17+
ansible.builtin.import_tasks: tune.yml
1718

18-
- name: include dashboards installation
19-
include: dashboards.yml
19+
- name: Include dashboards installation
20+
ansible.builtin.import_tasks: dashboards.yml
2021

2122
- name: Make sure opensearch dashboards is started
22-
service:
23+
ansible.builtin.service:
2324
name: dashboards
2425
state: started
25-
enabled: yes
26+
enabled: true
2627

2728
- name: Get all the installed dashboards plugins
28-
command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list"
29+
ansible.builtin.command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list"
2930
register: list_plugins
3031

3132
- name: Show all the installed dashboards plugins
32-
debug:
33+
ansible.builtin.debug:
3334
msg: "{{ list_plugins.stdout }}"

roles/linux/dashboards/tasks/tune.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Set open files limit in sysctl.conf
3-
sysctl:
3+
ansible.posix.sysctl:
44
name: fs.file-max
55
value: 65536
66
state: present
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
# handlers file for opensearch
33
- name: reload systemd configuration
4-
become: yes
5-
command: systemctl daemon-reload
4+
become: true
5+
ansible.builtin.command: systemctl daemon-reload
66

77
# Restart service and ensure it is enabled
88

99
- name: restart opensearch
10-
systemd: name=opensearch state=restarted enabled=yes
10+
ansible.builtin.systemd: name=opensearch state=restarted enabled=yes

0 commit comments

Comments
 (0)