Unable to run docker compose example

Hey everyone,

i’m trying to run the example docker-compose.yml from the docs as it can be seen here:

Sadly i’m unable to start opensearch or the dashboards. The logs don’t help me that much. What i can see is Not yet initialized (you may need to run securityadmin). I haven’t explicitly run securityadmin tho, but from what i read it should not be necessary to get it up and running.

Please see the full log as a gist here: gist:403b71e947e386c0692578551162876e · GitHub

I just want to use this for local development, so ssl and other advanced authenication is not needed. Am i missing here something obvious?

I think i’ve found a solution to running opensearch with docker-compose for local development. The key seems to be to add "DISABLE_INSTALL_DEMO_CONFIG=true", "DISABLE_SECURITY_PLUGIN=true" environemnt variables to the elasticsearch instances and DISABLE_SECURITY_DASHBOARDS_PLUGIN=true to opensearch-dashboards.

The complete docker-compose.yml will look like this:

version: "3"
services:
  opensearch-node:
    image: opensearchproject/opensearch:latest
    container_name: opensearch-node
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node
      - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
      - "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
      - "DISABLE_INSTALL_DEMO_CONFIG=true"
      - "DISABLE_SECURITY_PLUGIN=true"
      - "discovery.type=single-node"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
        hard: 65536
    volumes:
      - opensearch-data:/usr/share/opensearch/data
    ports:
      - 9200:9200
      - 9600:9600 # required for Performance Analyzer
    networks:
      - opensearch-net
  opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:latest
    container_name: opensearch-dashboards
    ports:
      - 5601:5601
    expose:
      - "5601"
    environment:
      - 'OPENSEARCH_HOSTS=["http://opensearch-node:9200"]'
      - "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
    networks:
      - opensearch-net

volumes:
  opensearch-data:

networks:
  opensearch-net:
    driver: bridge

Would be nice to find these instructions somewhere in the docs for development purposes to not have to deal with certificates.

I know this is ancient, but you really shouldn’t need to do anything to get the docker version going. The docker version comes with a self-signed cert and it should just start.

Anything unusual about your configuration when you got the Not yet initialized (you may need to run securityadmin) message?