230 lines
7.8 KiB
YAML
230 lines
7.8 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
es-master1:
|
|
image: harbor.colben.cn/general/elasticsearch:7
|
|
container_name: es-master1
|
|
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: es-master1
|
|
_CONF_node.roles: '[master]'
|
|
_CONF_http.host: 127.0.1.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]'
|
|
_CONF_cluster.initial_master_nodes: '[127.0.3.1,127.0.3.2]'
|
|
_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: 2
|
|
_CONF_gateway.expected_data_nodes: 3
|
|
_CONF_gateway.recover_after_master_nodes: 2
|
|
_CONF_gateway.recover_after_data_nodes: 3
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./es-master1/config
|
|
target: /opt/es/config
|
|
- type: bind
|
|
source: ./es-master1/data
|
|
target: /opt/es/data
|
|
- type: bind
|
|
source: ./es-master1/logs
|
|
target: /opt/es/logs
|
|
- type: bind
|
|
source: ./es-master1/plugins
|
|
target: /opt/es/plugins
|
|
- type: bind
|
|
source: ./es-master1/offline-plugins
|
|
target: /opt/es/offline-plugins
|
|
|
|
es-master2:
|
|
image: harbor.colben.cn/general/elasticsearch:7
|
|
container_name: es-master2
|
|
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: es-master2
|
|
_CONF_node.roles: '[master]'
|
|
_CONF_http.host: 127.0.1.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]'
|
|
_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: 2
|
|
_CONF_gateway.expected_data_nodes: 3
|
|
_CONF_gateway.recover_after_master_nodes: 2
|
|
_CONF_gateway.recover_after_data_nodes: 3
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./es-master2/config
|
|
target: /opt/es/config
|
|
- type: bind
|
|
source: ./es-master2/data
|
|
target: /opt/es/data
|
|
- type: bind
|
|
source: ./es-master2/logs
|
|
target: /opt/es/logs
|
|
- type: bind
|
|
source: ./es-master2/plugins
|
|
target: /opt/es/plugins
|
|
- type: bind
|
|
source: ./es-master2/offline-plugins
|
|
target: /opt/es/offline-plugins
|
|
|
|
es-data1:
|
|
image: harbor.colben.cn/general/elasticsearch:7
|
|
container_name: es-data1
|
|
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: es-data1
|
|
_CONF_node.roles: '[data]'
|
|
_CONF_http.host: 127.0.1.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]'
|
|
_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: 2
|
|
_CONF_gateway.expected_data_nodes: 3
|
|
_CONF_gateway.recover_after_master_nodes: 2
|
|
_CONF_gateway.recover_after_data_nodes: 3
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./es-data1/config
|
|
target: /opt/es/config
|
|
- type: bind
|
|
source: ./es-data1/data
|
|
target: /opt/es/data
|
|
- type: bind
|
|
source: ./es-data1/logs
|
|
target: /opt/es/logs
|
|
- type: bind
|
|
source: ./es-data1/plugins
|
|
target: /opt/es/plugins
|
|
- type: bind
|
|
source: ./es-data1/offline-plugins
|
|
target: /opt/es/offline-plugins
|
|
|
|
es-data2:
|
|
image: harbor.colben.cn/general/elasticsearch:7
|
|
container_name: es-data2
|
|
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: es-data2
|
|
_CONF_node.roles: '[data]'
|
|
_CONF_http.host: 127.0.1.4
|
|
_CONF_http.port: 9200
|
|
_CONF_transport.host: 127.0.3.4
|
|
_CONF_transport.port: 9300
|
|
_CONF_discovery.seed_hosts: '[127.0.3.1,127.0.3.2]'
|
|
_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: 2
|
|
_CONF_gateway.expected_data_nodes: 3
|
|
_CONF_gateway.recover_after_master_nodes: 2
|
|
_CONF_gateway.recover_after_data_nodes: 3
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./es-data2/config
|
|
target: /opt/es/config
|
|
- type: bind
|
|
source: ./es-data2/data
|
|
target: /opt/es/data
|
|
- type: bind
|
|
source: ./es-data2/logs
|
|
target: /opt/es/logs
|
|
- type: bind
|
|
source: ./es-data2/plugins
|
|
target: /opt/es/plugins
|
|
- type: bind
|
|
source: ./es-data2/offline-plugins
|
|
target: /opt/es/offline-plugins
|
|
|
|
es-data3:
|
|
image: harbor.colben.cn/general/elasticsearch:7
|
|
container_name: es-data3
|
|
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: es-data3
|
|
_CONF_node.roles: '[data]'
|
|
_CONF_http.host: 127.0.1.5
|
|
_CONF_http.port: 9200
|
|
_CONF_transport.host: 127.0.3.5
|
|
_CONF_transport.port: 9300
|
|
_CONF_discovery.seed_hosts: '[127.0.3.1,127.0.3.2]'
|
|
_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: 2
|
|
_CONF_gateway.expected_data_nodes: 3
|
|
_CONF_gateway.recover_after_master_nodes: 2
|
|
_CONF_gateway.recover_after_data_nodes: 3
|
|
network_mode: host
|
|
volumes:
|
|
- type: bind
|
|
source: ./es-data3/config
|
|
target: /opt/es/config
|
|
- type: bind
|
|
source: ./es-data3/data
|
|
target: /opt/es/data
|
|
- type: bind
|
|
source: ./es-data3/logs
|
|
target: /opt/es/logs
|
|
- type: bind
|
|
source: ./es-data3/plugins
|
|
target: /opt/es/plugins
|
|
- type: bind
|
|
source: ./es-data3/offline-plugins
|
|
target: /opt/es/offline-plugins
|
|
|