Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

docker elasticsearch latest version

docker pull docker.elastic.co/elasticsearch/elasticsearch:7.11.2
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.11.2
Comment

elasticsearch docker instance

if already have the elasticsearch docker image locally
sudo docker run --rm -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name elasticsearch --net searchnetwork elasticsearch:7.13.4
check network by following command
sudo network ls
kibna and elasticsearch must be in same network
create network by
sudo create network my_net
Comment

elasticsearch docker

  ###########################
  # ELK SERVICES NODE 1
  ###########################
  els1:
    image: docker.elastic.co/elasticsearch/${ELK_VERSION}
    restart: always
    healthcheck:
      start_period: 60ms
      timeout: 130ms
      interval: 30ms
      test: ifconfig | grep broadcast && clear
    ports:
      - 9200:9200
    env_file: .env
    environment:
      - node.name=els1
      - cluster.name=els-docker-cluster
      - cluster.initial_master_nodes=els1,els2,els3
      - discovery.seed_hosts=els2,els3
      - discovery.zen.minimum_master_nodes=2
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    volumes:
      - els1-data:/usr/share/elasticsearch/data
    networks:
      - node_networks
  ###########################
  # ELK SERVICES NODE 2
  ###########################
  els2:
    image: docker.elastic.co/elasticsearch/${ELK_VERSION}
    restart: always
    healthcheck:
      start_period: 60ms
      timeout: 130ms
      interval: 30ms
      test: ifconfig | grep broadcast && clear
    ports:
      - 9300:9200
    env_file: .env
    environment:
      - node.name=els2
      - cluster.name=els-docker-cluster
      - cluster.initial_master_nodes=els1,els2,els3
      - discovery.seed_hosts=els1,els3
      - discovery.zen.minimum_master_nodes=2
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    volumes:
      - els2-data:/usr/share/elasticsearch/data
    networks:
      - node_networks
  ###########################
  # ELK SERVICES NODE 3
  ###########################
  els3:
    image: docker.elastic.co/elasticsearch/${ELK_VERSION}
    restart: always
    healthcheck:
      start_period: 60ms
      timeout: 130ms
      interval: 30ms
      test: ifconfig | grep broadcast && clear
    ports:
      - 9400:9200
    env_file: .env
    environment:
      - node.name=els3
      - cluster.name=els-docker-cluster
      - cluster.initial_master_nodes=els1,els2,els3
      - discovery.seed_hosts=els1,els2
      - discovery.zen.minimum_master_nodes=2
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    volumes:
      - els3-data:/usr/share/elasticsearch/data
    networks:
      - node_networks
Comment

PREVIOUS NEXT
Code Example
Shell :: environment variables in systemd 
Shell :: how to push local code to gitlab 
Shell :: graphql comment 
Shell :: install aws cli version 2 mac 
Shell :: zip linux exclude directory 
Shell :: update metasploit 
Shell :: Display lines containing the pattern “root” and 3 lines after them in the file /etc/passwd. 
Shell :: git remove files from old commits 
Shell :: npm not found in zsh 
Shell :: speedtest mac terminal 
Shell :: ionic social sharing 
Shell :: uninstall all extensions vscode 
Shell :: ubuntu server lamp installation 
Shell :: linux kill aport 
Shell :: bash run program in loop 
Shell :: find linux 
Shell :: batch delete all files in subfolders of type 
Shell :: How to open webpage in vbscript 
Shell :: Unable to boot device due to insufficient system resources. 
Shell :: install vlc in centos 8 
Shell :: Creating Public Key 
Shell :: linux how many cores 
Shell :: plesk clear mail queue 
Shell :: gem install version 
Shell :: how to upgrade to wsl 2 
Shell :: finda java home 
Shell :: delete add git 
Shell :: unix terminal search inside file 
Shell :: Conditional variables in gitlab-ci.yml 
Shell :: command to add a user to a group 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =