Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- getOrCreate
- mapping
- double dispatch
- Optional
- 토비의 봄
- Controller
- Visitor pattern
- linebot
- Modelmapper
- reflection
- 챗봇
- annotation
- line messaging api
- webhook
- springboot
- DtoToEntity
- ngrok
- EntityToDto
- java
- spring
- NullPointerException
- visitor proxy pattern
- Dynamic dispatch
- static dispatch
- enum
Archives
- Today
- Total
database by narae :p
도커 + ELK 분산 환경 셋팅 본문
# 단일 서버
git clone https://github.com/deviantony/docker-elk.git
cd docker-elk
vi elasticsearch/config/elasticsearch.yml
xpack.security.enabled: false
docker stack deploy -c docker-stack.yml elk
docker ps
docker service ls
## 레플리카 모드
vi docker-stack.yml
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
ports:
- "9200"
- "9300"
configs:
- source: elastic_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
cluster.name: "docker-cluster"
node.name: elk_elasticsearch.{{.Task.Slot}}
discovery.seed_hosts: tasks.elasticsearch
cluster.initial_master_nodes: elk_elasticsearch.1,elk_elasticsearch.2,elk_elasticsearch.3
node.master: "true"
node.data: "true"
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: changeme
networks:
- elk
deploy:
mode: replicated
replicas: 3
vi elasticsearch/config/elasticsearch.yml
network.host: [ _eth0_, _eth1_, _lo_ ]
network.publish_host: _eth0_
sudo sysctl -w vm.max_map_count=262144
## 글로벌 모드
vi docker-stack.yml
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
hostname: elasticsearch-{{.Node.Hostname}}
ports:
- "9200:9200"
- "9300:9300"
configs:
- source: elastic_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
cluster.name: "docker-cluster"
node.name: elasticsearch-{{.Node.Hostname}}
discovery.seed_hosts: elasticsearch
cluster.initial_master_nodes: elasticsearch-laptop
node.master: "true"
node.data: "true"
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: changeme
networks:
- elk
deploy:
mode: global
'개발 노트' 카테고리의 다른 글
JPA 연관 관계가 있는 엔티티 생성 패턴 (0) | 2023.03.09 |
---|---|
JPA @OneToMany - targetEntity (0) | 2023.03.09 |
도커 Docker 정리 1 (0) | 2020.05.16 |
더블 디스패치 double dispatch (0) | 2020.01.07 |
user level lock (0) | 2019.06.12 |