update
This commit is contained in:
136
elasticsearch7/Demo/ThreeNodes/docker-compose.yml
Normal file
136
elasticsearch7/Demo/ThreeNodes/docker-compose.yml
Normal file
@@ -0,0 +1,136 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
es1:
|
||||
image: harbor.colben.cn/general/elasticsearch:7
|
||||
container_name: es1
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 5m
|
||||
privileged: true
|
||||
environment:
|
||||
ES_JAVA_OPTS: "-Xms8g -Xmx8g"
|
||||
ELASTIC_PASSWORD: Pass_1234
|
||||
_CONF_cluster.name: myes
|
||||
_CONF_node.name: es1
|
||||
_CONF_http.host: '[127.0.1.1,127.0.2.1]'
|
||||
_CONF_http.port: 9200
|
||||
_CONF_transport.host: 127.0.3.1
|
||||
_CONF_transport.port: 9300
|
||||
_CONF_discovery.seed_hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]'
|
||||
_CONF_cluster.initial_master_nodes: '[127.0.3.1,127.0.3.2,127.0.3.3]'
|
||||
_CONF_xpack.security.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.verification_mode: certificate
|
||||
_CONF_xpack.security.transport.ssl.client_authentication: required
|
||||
_CONF_xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
|
||||
_CONF_xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
|
||||
_CONF_gateway.expected_master_nodes: 3
|
||||
_CONF_gateway.expected_data_nodes: 3
|
||||
_CONF_gateway.recover_after_master_nodes: 3
|
||||
_CONF_gateway.recover_after_data_nodes: 3
|
||||
network_mode: host
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./es1/config
|
||||
target: /opt/es/config
|
||||
- type: bind
|
||||
source: ./es1/data
|
||||
target: /opt/es/data
|
||||
- type: bind
|
||||
source: ./es1/logs
|
||||
target: /opt/es/logs
|
||||
- type: bind
|
||||
source: ./es1/plugins
|
||||
target: /opt/es/plugins
|
||||
- type: bind
|
||||
source: ./es1/offline-plugins
|
||||
target: /opt/es/offline-plugins
|
||||
|
||||
es2:
|
||||
image: harbor.colben.cn/general/elasticsearch:7
|
||||
container_name: es2
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 5m
|
||||
privileged: true
|
||||
environment:
|
||||
ES_JAVA_OPTS: "-Xms8g -Xmx8g"
|
||||
ELASTIC_PASSWORD: Pass_1234
|
||||
_CONF_cluster.name: myes
|
||||
_CONF_node.name: es2
|
||||
_CONF_http.host: '[127.0.1.2,127.0.2.2]'
|
||||
_CONF_http.port: 9200
|
||||
_CONF_transport.host: 127.0.3.2
|
||||
_CONF_transport.port: 9300
|
||||
_CONF_discovery.seed_hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]'
|
||||
_CONF_xpack.security.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.verification_mode: certificate
|
||||
_CONF_xpack.security.transport.ssl.client_authentication: required
|
||||
_CONF_xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
|
||||
_CONF_xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
|
||||
_CONF_gateway.expected_master_nodes: 3
|
||||
_CONF_gateway.expected_data_nodes: 3
|
||||
_CONF_gateway.recover_after_master_nodes: 3
|
||||
_CONF_gateway.recover_after_data_nodes: 3
|
||||
network_mode: host
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./es2/config
|
||||
target: /opt/es/config
|
||||
- type: bind
|
||||
source: ./es2/data
|
||||
target: /opt/es/data
|
||||
- type: bind
|
||||
source: ./es2/logs
|
||||
target: /opt/es/logs
|
||||
- type: bind
|
||||
source: ./es2/plugins
|
||||
target: /opt/es/plugins
|
||||
- type: bind
|
||||
source: ./es2/offline-plugins
|
||||
target: /opt/es/offline-plugins
|
||||
|
||||
es3:
|
||||
image: harbor.colben.cn/general/elasticsearch:7
|
||||
container_name: es3
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 5m
|
||||
privileged: true
|
||||
environment:
|
||||
ES_JAVA_OPTS: "-Xms8g -Xmx8g"
|
||||
ELASTIC_PASSWORD: Pass_1234
|
||||
_CONF_cluster.name: myes
|
||||
_CONF_node.name: es3
|
||||
_CONF_http.host: '[127.0.1.3,127.0.2.3]'
|
||||
_CONF_http.port: 9200
|
||||
_CONF_transport.host: 127.0.3.3
|
||||
_CONF_transport.port: 9300
|
||||
_CONF_discovery.seed_hosts: '[127.0.3.1,127.0.3.2,127.0.3.3]'
|
||||
_CONF_xpack.security.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.enabled: "true"
|
||||
_CONF_xpack.security.transport.ssl.verification_mode: certificate
|
||||
_CONF_xpack.security.transport.ssl.client_authentication: required
|
||||
_CONF_xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
|
||||
_CONF_xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
|
||||
_CONF_gateway.expected_master_nodes: 3
|
||||
_CONF_gateway.expected_data_nodes: 3
|
||||
_CONF_gateway.recover_after_master_nodes: 3
|
||||
_CONF_gateway.recover_after_data_nodes: 3
|
||||
network_mode: host
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./es3/config
|
||||
target: /opt/es/config
|
||||
- type: bind
|
||||
source: ./es3/data
|
||||
target: /opt/es/data
|
||||
- type: bind
|
||||
source: ./es3/logs
|
||||
target: /opt/es/logs
|
||||
- type: bind
|
||||
source: ./es3/plugins
|
||||
target: /opt/es/plugins
|
||||
- type: bind
|
||||
source: ./es3/offline-plugins
|
||||
target: /opt/es/offline-plugins
|
||||
|
Reference in New Issue
Block a user