平台环境 : rancher
es镜像 : docker.elastic.co/elasticsearch/elasticsearch:7.2.1
每个容器建一个磁盘并映射(注意用户权限)
配置与环境变量
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| cluster.name: es_cluster_brand cluster.initial_master_nodes: node1 node.name: node1 node.master: true node.data: true path.data: /data discovery.seed_hosts: node1,node2 http.cors.enabled: true http.cors.allow-origin: "*" http.port: 9200 network.publish_host: node1 network.bind_host: 0.0.0.0 network.host: 0.0.0.0 bootstrap.memory_lock: false bootstrap.system_call_filter: false
cluster.name: es_cluster_brand cluster.initial_master_nodes: node1 node.name: node2 node.master: true node.data: true path.data: /data discovery.seed_hosts: node1,node2 http.port: 9200 http.cors.enabled: true http.cors.allow-origin: "*" network.publish_host: node2 network.bind_host: 0.0.0.0 network.host: 0.0.0.0 bootstrap.memory_lock: false bootstrap.system_call_filter: false
cluster.name: es_cluster_brand cluster.initial_master_nodes: node1 node.name: node3 node.master: true node.data: true path.data: /data discovery.seed_hosts: node1,node2 http.port: 9200 http.cors.enabled: true http.cors.allow-origin: "*" network.publish_host: node3 network.bind_host: 0.0.0.0 network.host: 0.0.0.0 bootstrap.memory_lock: false bootstrap.system_call_filter: false
|
然后建立域名映射到node1(主节点)
主机每个rancher实例的名字 都与其节点名字一致 防止出问题