📜  docker run opendistro elasticsearch - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:30:31.959000             🧑  作者: Mango

Docker Run OpenDistro Elasticsearch - Shell-Bash

Introduction

OpenDistro for Elasticsearch is a free and open-source distribution of Elasticsearch that comes with additional security and monitoring features. Docker is a containerization platform that allows developers to easily package and deploy applications.

Running Elasticsearch with OpenDistro on Docker makes it easy to manage your Elasticsearch deployment and take advantage of the additional security and monitoring features offered by OpenDistro. This tutorial will show you how to run OpenDistro Elasticsearch using the Docker run command.

Prerequisites
  • Docker installed on your system
  • Basic knowledge of the Docker command line
  • Basic knowledge of Elasticsearch
Instructions

To run OpenDistro Elasticsearch on Docker, follow these steps:

  1. Open a terminal or command prompt on your machine.

  2. Run the following command:

    docker run -p 9200:9200 -p 9600:9600 opendistro elasticsearch
    

    This command runs a pre-built OpenDistro Elasticsearch image and exposes ports 9200 and 9600 on your local machine. The first port is used for HTTP traffic, while the second is used for monitoring.

  3. Once the container is up and running, you can access Elasticsearch by visiting http://localhost:9200 in your web browser. You should see a JSON response indicating that Elasticsearch is running.

    {
      "name" : "Elasticsearch",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "kWoD1CWQTz2tMUGI98eaYw",
      "version" : {
        "number" : "7.10.2",
        "build_flavor" : "opendistro",
        "build_type" : "tar",
        "build_hash" : "d273380",
        "build_date" : "2021-04-12T23:50:23.672135Z",
        "build_snapshot" : false,
        "lucene_version" : "8.8.2",
        "minimum_wire_compatibility_version" : "6.8.0",
        "minimum_index_compatibility_version" : "6.0.0-beta1"
      },
      "tagline" : "You Know, for Search"
    }
    
  4. You can also access the monitoring API by visiting http://localhost:9600/_opendistro/_monitoring. This will display various metrics about your Elasticsearch deployment, including cluster health and node status.

Conclusion

Running OpenDistro Elasticsearch on Docker is a great way to simplify managing your Elasticsearch deployment and leverage the extra security and monitoring features provided by OpenDistro. With the Docker run command, you can have a fully functional Elasticsearch cluster up and running in no time.