aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/opensearch/defaults/main.yml
blob: f2c13bf68642c17c602700ec6685ae80dd235b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
---
opensearch_services:
  opensearch:
    container_name: opensearch
    group: opensearch
    enabled: true
    image: "{{ opensearch_image_full }}"
    environment:
      OPENSEARCH_JAVA_OPTS: "{{ opensearch_java_opts }}"
    volumes: "{{ opensearch_default_volumes + opensearch_extra_volumes }}"
    dimensions: "{{ opensearch_dimensions }}"
    healthcheck: "{{ opensearch_healthcheck }}"
    haproxy:
      opensearch:
        enabled: "{{ enable_opensearch }}"
        mode: "http"
        external: false
        port: "{{ opensearch_port }}"
        frontend_http_extra:
          - "option dontlog-normal"
        backend_http_extra:
          - "option httpchk"
  opensearch-dashboards:
    container_name: opensearch_dashboards
    group: opensearch-dashboards
    enabled: "{{ enable_opensearch_dashboards }}"
    environment:
      OPENSEARCH_DASHBOARDS_SECURITY_PLUGIN: "False"
    image: "{{ opensearch_dashboards_image_full }}"
    volumes: "{{ opensearch_dashboards_default_volumes + opensearch_dashboards_extra_volumes }}"
    dimensions: "{{ opensearch_dashboards_dimensions }}"
    healthcheck: "{{ opensearch_dashboards_healthcheck }}"
    haproxy:
      opensearch-dashboards:
        enabled: "{{ enable_opensearch_dashboards }}"
        mode: "http"
        external: false
        port: "{{ opensearch_dashboards_port }}"
        auth_user: "{{ opensearch_dashboards_user }}"
        auth_pass: "{{ opensearch_dashboards_password }}"
        backend_http_extra:
          - "option httpchk GET /api/status"
      opensearch_dashboards_external:
        enabled: "{{ enable_opensearch_dashboards_external | bool }}"
        mode: "http"
        external: true
        external_fqdn: "{{ opensearch_dashboards_external_fqdn }}"
        port: "{{ opensearch_dashboards_port_external }}"
        listen_port: "{{ opensearch_dashboards_listen_port }}"
        auth_user: "{{ opensearch_dashboards_user }}"
        auth_pass: "{{ opensearch_dashboards_password }}"
        backend_http_extra:
          - "option httpchk  GET /api/status"


####################
# Opensearch
####################

# Register Opensearch internal endpoint in the Keystone service catalogue
opensearch_enable_keystone_registration: false

opensearch_cluster_name: "kolla_logging"
opensearch_heap_size: "1g"
opensearch_java_opts: "{% if opensearch_heap_size %}-Xms{{ opensearch_heap_size }} -Xmx{{ opensearch_heap_size }}{% endif %} -Dlog4j2.formatMsgNoLookups=true"

opensearch_apply_log_retention_policy: true

# Duration after which an index is staged for deletion. This is implemented
# by closing the index. Whilst in this state the index contributes negligible
# load on the cluster and may be manually re-opened if required.
# NOTE: We carry over legacy settings from ElasticSearch Curator if they
# are set. This may be removed in a later release.
opensearch_soft_retention_period_days: "{{ elasticsearch_curator_soft_retention_period_days | default(30) }}"

# Duration after which an index is permanently erased from the cluster.
opensearch_hard_retention_period_days: "{{ elasticsearch_curator_hard_retention_period_days | default(60) }}"

opensearch_retention_policy: |
  policy:
    description: Retention policy for OpenStack logs
    error_notification:
    default_state: open
    states:
    - name: open
      actions: []
      transitions:
      - state_name: close
        conditions:
          min_index_age: "{{ opensearch_soft_retention_period_days }}d"
    - name: close
      actions:
      - retry:
          count: 3
          backoff: exponential
          delay: 1m
        close: {}
      transitions:
      - state_name: delete
        conditions:
          min_index_age: "{{ opensearch_hard_retention_period_days }}d"
    - name: delete
      actions:
      - retry:
          count: 3
          backoff: exponential
          delay: 1m
        delete: {}
      transitions: []
    ism_template:
    - index_patterns:
      - "{{ opensearch_log_index_prefix }}-*"
      priority: 1

####################
# Keystone
####################
opensearch_openstack_auth: "{{ openstack_auth }}"

opensearch_ks_services:
  - name: "opensearch"
    type: "log-storage"
    description: "Opensearch"
    endpoints:
      - {'interface': 'internal', 'url': '{{ opensearch_internal_endpoint }}'}

#######################
# OpenSearch Dashboards
#######################
opensearch_dashboards_default_app_id: "discover"
opensearch_dashboards_opensearch_request_timeout: 300000
opensearch_dashboards_opensearch_shard_timeout: 0
opensearch_dashboards_opensearch_ssl_verify: true

####################
# Docker
####################
opensearch_image: "{{ docker_image_url }}opensearch"
opensearch_tag: "{{ openstack_tag }}"
opensearch_image_full: "{{ opensearch_image }}:{{ opensearch_tag }}"

opensearch_dashboards_image: "{{ docker_image_url }}opensearch-dashboards"
opensearch_dashboards_tag: "{{ opensearch_tag }}"
opensearch_dashboards_image_full: "{{ opensearch_dashboards_image }}:{{ opensearch_dashboards_tag }}"

opensearch_dimensions: "{{ default_container_dimensions }}"
opensearch_dashboards_dimensions: "{{ default_container_dimensions }}"

opensearch_enable_healthchecks: "{{ enable_container_healthchecks }}"
opensearch_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
opensearch_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
opensearch_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
opensearch_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ opensearch_port }}"]
opensearch_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
opensearch_healthcheck:
  interval: "{{ opensearch_healthcheck_interval }}"
  retries: "{{ opensearch_healthcheck_retries }}"
  start_period: "{{ opensearch_healthcheck_start_period }}"
  test: "{% if opensearch_enable_healthchecks | bool %}{{ opensearch_healthcheck_test }}{% else %}NONE{% endif %}"
  timeout: "{{ opensearch_healthcheck_timeout }}"
opensearch_dashboards_enable_healthchecks: "{{ enable_container_healthchecks }}"
opensearch_dashboards_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
opensearch_dashboards_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
opensearch_dashboards_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
opensearch_dashboards_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ opensearch_dashboards_port }}"]
opensearch_dashboards_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
opensearch_dashboards_healthcheck:
  interval: "{{ opensearch_dashboards_healthcheck_interval }}"
  retries: "{{ opensearch_dashboards_healthcheck_retries }}"
  start_period: "{{ opensearch_dashboards_healthcheck_start_period }}"
  test: "{% if opensearch_dashboards_enable_healthchecks | bool %}{{ opensearch_dashboards_healthcheck_test }}{% else %}NONE{% endif %}"
  timeout: "{{ opensearch_dashboards_healthcheck_timeout }}"

opensearch_default_volumes:
  - "{{ node_config_directory }}/opensearch/:{{ container_config_directory }}/"
  - "/etc/localtime:/etc/localtime:ro"
  - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
  - "{{ opensearch_datadir_volume }}:/var/lib/opensearch/data"
  - "kolla_logs:/var/log/kolla/"
opensearch_dashboards_default_volumes:
  - "{{ node_config_directory }}/opensearch-dashboards/:{{ container_config_directory }}/:ro"
  - "/etc/localtime:/etc/localtime:ro"
  - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
  - "kolla_logs:/var/log/kolla/"

opensearch_extra_volumes: "{{ default_extra_volumes }}"
opensearch_dashboards_extra_volumes: "{{ default_extra_volumes }}"

###################
# Copy certificates
###################
opensearch_copy_certs: "{{ kolla_copy_ca_into_containers | bool }}"