This article looks at the difference between Elasticsearch and OpenSearch configuration files, noting key differences between the two.
Config File Comparison
One of the notable differences between between Elasticsearch OpenSearch configuration files is the difference in how roles are assigned to nodes. In older versions of Elasticsearch, each role had a corresponding configuration parameter that could enable or disable the role. In OpenSearch, that functionality was removed in favor of a new way to assign roles to node, which uses one configuration parameter to define each node's role as a string element of an array. For example:
Elasticsearch
node.data: true
node.master: false
OpenSearch
node.roles: ['data']
node.roles: ['data','master']
node.roles: ['master']
Security
Additionally, OpenSearch is also configured to enable security by default. Elasticsearch’s X-Pack security is enabled by a specific parameter, which by default is not enabled. Unless you have already configured security for Elasticsearch, you must disable security within OpenSearch and reconfigure it after successfully upgrading.
Elasticsearch
xpack.security.enabled: true
OpenSearch
plugins.security.disabled: true
Other than defining node roles and disabling security in OpenSearch (unless already configured in Elasticsearch), the remaining configuration parameters should be able to be copied from the elasticsearch.yml files to the opensearch.yml files.