Describe the issue:
I want to generate a random password for the default admin user and provide the secret to the helm chart installation. But according the documentation Modifying the YAML files - OpenSearch Documentation I have to use the plugins/opensearch-security/tools/hash.sh. So how can do that before beginning the cluster deployment?
@Hung You have a few options here. One is to enter the running OpenSearch docker container or Kubernetes pod and navigate to the tool.
Another way is the OpenSearch binary download. After unpacking, navigate to the tools folder and execute the hash.sh command.
Please be aware that OpenSearch containers already have OPENSEARCH_JAVA_HOME predefined. If you run in binary mode, you should use the following command.
env OPENSEARCH_JAVA_HOME=<path_to_opensearch_jdk> <path_to_hash_tool>/hash.sh
i.e.
env OPENSEARCH_JAVA_HOME=/home/pablo/opensearch/opensearch-2.19.0/jdk/ /home/pablo/opensearch/opensearch-2.19.0/plugins/opensearch-security/tools/hash.sh