Skip to content

Commit bdeda03

Browse files
authored
Merge pull request #197 from stackhpc/fix/elasticsearch
Replace opendistro
2 parents 0aaaf67 + f172879 commit bdeda03

File tree

37 files changed

+388
-202
lines changed

37 files changed

+388
-202
lines changed

ansible/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ roles/*
44
# Whitelist roles that are checked into this repository.
55
!roles/filebeat/
66
!roles/filebeat/**
7-
!roles/opendistro/
8-
!roles/opendistro/**
7+
!roles/opensearch/
8+
!roles/opensearch/**
99
!roles/podman/
1010
!roles/podman/**
1111
!roles/grafana-dashboards/

ansible/monitoring.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# ---
22
# # NOTE: Requires slurmdbd
33

4-
- name: Setup elasticsearch
5-
hosts: opendistro
6-
tags: opendistro
4+
- name: Setup OpenSearch
5+
hosts: opensearch
6+
tags: opensearch
77
tasks:
88
- import_role:
9-
name: opendistro
10-
tasks_from: config.yml
11-
tags: config
12-
13-
- import_role:
14-
name: opendistro
15-
tasks_from: deploy.yml
16-
tags: deploy
9+
name: opensearch
10+
become: true
1711

1812
- name: Setup slurm stats
1913
hosts: slurm_stats

ansible/roles/filebeat/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
#filebeat_config_path: undefined # REQUIRED. Path to filebeat.yml configuration file template
44
filebeat_podman_user: "{{ ansible_user }}" # User that runs the filebeat container
5+
filebeat_version: 7.12.1 # latest usable with opensearch - see https://opensearch.org/docs/2.4/tools/index/#compatibility-matrix-for-beats

ansible/roles/filebeat/templates/filebeat.service.j2

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@ After=network-online.target
1212
[Service]
1313
Environment=PODMAN_SYSTEMD_UNIT=%n
1414
Restart=always
15-
ExecStart=/usr/bin/podman run --network slirp4netns:cidr={{ podman_cidr }} --sdnotify=conmon --cgroups=no-conmon --replace --name filebeat --user root --restart=always --security-opt label=disable --volume /var/log/:/logs:ro --volume /etc/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro --detach=True docker.elastic.co/beats/filebeat-oss:7.9.3 -e -strict.perms=false -d "*"
15+
ExecStart=/usr/bin/podman run \
16+
--network=host \
17+
--sdnotify=conmon \
18+
--cgroups=no-conmon \
19+
--replace \
20+
--name filebeat \
21+
--user root \
22+
--restart=always \
23+
--security-opt label=disable \
24+
--volume /var/log/:/logs:ro \
25+
--volume /etc/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro \
26+
--detach=True docker.elastic.co/beats/filebeat-oss:{{ filebeat_version }} \
27+
-e -strict.perms=false -d "*"
1628
ExecStop=/usr/bin/podman stop --ignore filebeat -t 10
1729
ExecStopPost=/usr/bin/podman rm --ignore -f filebeat
1830
KillMode=none

ansible/roles/mysql/templates/mysql.service.j2

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ EnvironmentFile=/etc/sysconfig/mysqld
1515
ExecStartPre=+install -d -o {{ mysql_podman_user }} -g {{ mysql_podman_user }} -Z container_file_t {{ mysql_datadir }}
1616
ExecStartPre=+chown -R {{ mysql_podman_user }}:{{ mysql_podman_user }} {{ mysql_datadir }}
1717
ExecStart=/usr/bin/podman run \
18-
--network slirp4netns:cidr={{ podman_cidr }} \
19-
--sdnotify=conmon --cgroups=no-conmon \
20-
--detach --replace --name mysql --restart=no \
18+
--network=host \
19+
--sdnotify=conmon \
20+
--cgroups=no-conmon \
21+
--detach \
22+
--replace \
23+
--name mysql \
24+
--restart=no \
2125
--user mysql \
2226
--volume {{ mysql_datadir }}:/var/lib/mysql:U \
2327
--publish 3306:3306 \
24-
-e MYSQL_ROOT_PASSWORD=${MYSQL_INITIAL_ROOT_PASSWORD} \
28+
--env MYSQL_ROOT_PASSWORD=${MYSQL_INITIAL_ROOT_PASSWORD} \
2529
mysql:{{ mysql_tag }}{%- for opt in mysql_mysqld_options %} \
2630
--{{ opt }}{% endfor %}
2731

ansible/roles/opendistro/defaults/main.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

ansible/roles/opendistro/handlers/main.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

ansible/roles/opendistro/tasks/config.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

ansible/roles/opendistro/tasks/deploy.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

ansible/roles/opendistro/tasks/post.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)