Getting started
When to use this role
WARNING: this role can only manage local, unsecured OpenSearch installations. This is useful when running it alongside dependent software like Graylog, which switched from Elasticsearch to OpenSearch due to issues with the new Elasticsearch license.
If you are not encumbered by Elasticsearch's new license, then please consider using the debops.elasticsearch role instead.
Installation
This role installs OpenSearch from the release tarball. The PGP signature is used to verify the tarball. Directories for configuration and logging are created according to the Filesystem Hierarchy Standard. The role is able to upgrade your installation automatically, and can configure OpenSearch, the included JVM, and the systemd service.
Example inventory
To deploy OpenSearch, you can add the host to the
[debops_service_opensearch]
Ansible inventory group:
[debops_service_opensearch]
hostname
Example playbook
If you are using this role without DebOps, here's an example Ansible playbook
that uses the debops.opensearch
role:
---
- name: Install and manage OpenSearch
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_opensearch' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: keyring
tags: [ 'role::keyring', 'skip::keyring' ]
keyring__dependent_gpg_keys:
- '{{ opensearch__keyring__dependent_gpg_keys }}'
- role: etc_services
tags: [ 'role::etc_services', 'skip::etc_services' ]
etc_services__dependent_list:
- '{{ opensearch__etc_services__dependent_list }}'
- role: sysctl
tags: [ 'role::sysctl', 'skip::sysctl' ]
sysctl__dependent_parameters:
- '{{ opensearch__sysctl__dependent_parameters }}'
- role: ferm
tags: [ 'role::ferm', 'skip::ferm' ]
ferm__dependent_rules:
- '{{ opensearch__ferm__dependent_rules }}'
- role: opensearch
tags: [ 'role::opensearch', 'skip::opensearch' ]