Skip to content

Commit

Permalink
ci: need admin password from OpenSearch 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeWatt committed Dec 11, 2024
1 parent fd61a20 commit 8722cdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
cluster.initial_master_nodes: os01
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
plugins.security.disabled: true
OPENSEARCH_INITIAL_ADMIN_PASSWORD: ${{ secrets.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}
ports:
- "9200:9200"
- "9600:9600"
Expand Down
12 changes: 11 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ Alternatively, run OpenSearch after `installing Docker <https://docs.docker.com/
.. code-block:: console
$ docker pull opensearchproject/opensearch:2.15.0
$ docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" opensearchproject/opensearch:2.15.0
$ docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "plugins.security.disabled=true" -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=<custom-admin-password>" opensearchproject/opensearch:2.15.0
The custom admin password is required for OpenSearch 2.12 or greater. The requirements for ``<custom-admin-password>``
are "a minimum 8 character password and must contain at least one uppercase letter, one lowercase letter, one digit,
and one special character that is strong". You can test that the container is running with:

.. code-block:: console
$ curl http://localhost:9200 -ku admin:<custom-admin-password>
.. _installation:

Expand Down Expand Up @@ -346,6 +354,8 @@ Copy the file ``config_local.docker_compose.py`` to ``config_local.py``.
In order to run the tests via Sauce Labs, ensure you have the variables ``$SAUCE_USERNAME`` and ``$SAUCE_ACCESS_KEY``
set in your environment (see :ref:`running-the-tests`) **before** starting the containers.

Add ``export OPENSEARCH_INITIAL_ADMIN_PASSWORD=<custom-admin-password>`` to your bash or zsh profile for OpenSearch.

If using an M1 MacBook, also add ``export SAUCE_OS=linux.aarch64`` to your bash or zsh profile. This is necessary to
download the correct `Sauce Connect Proxy
<https://docs.saucelabs.com/secure-connections/sauce-connect-5/installation/>`_
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ services:
- cluster.initial_master_nodes=os01
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- plugins.security.disabled=true
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
ports:
- "9200:9200"
- "9600:9600"
Expand Down

0 comments on commit 8722cdc

Please sign in to comment.