【非标】es屏蔽中心扩容协调节点

准备信息

bash 复制代码
sellout ES集群 扩容4个协调节点.



# 4个新节点
172.21.56.207
172.21.56.208
172.21.56.209
172.21.56.210

检查数据盘挂载点

数据盘需要挂载在/data下,文件格式为xfs,做LVM

css 复制代码
mount -a
  1. 传包

创建es相关目录

bash 复制代码
mkdir -p /data/elasticsearch/data
mkdir -p /data/elasticsearch/log
mkdir -p /data/elasticsearch/backup
  1. rpm安装服务

bash 复制代码
# 安装es服务
rpm -i /data/elasticsearch-6.4.3.rpm
systemctl enable elasticsearch

# es 数据文件的权限
chown -R elasticsearch.elasticsearch /data/elasticsearch

# 备份原来的yml
mv /etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml_bak

# es yml 配置文件修改,4个节点对应的配置文件如下补充
vi /etc/elasticsearch/elasticsearch.yml
  1. 由于ES643版本,不带jdk,需要修改为JAVA_HOME=/opt/jdk8

bash 复制代码
vim /etc/sysconfig/elasticsearch

# 找到注释掉的 JAVA_HOME后,修改为
JAVA_HOME=/opt/jdk8
  1. 安装IK分词器

bash 复制代码
# 安装,直接y
/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///data/elasticsearch-analysis-ik-6.4.3.zip
  1. 修改jvm heap size

bash 复制代码
# 修改 jvm.options 中的jvm heap大小,主机内存是16G,该配置修改为 10G
vim /etc/elasticsearch/jvm.options
-Xms10g
-Xmx10g 
  1. 启动es服务

arduino 复制代码
# 
systemctl start elasticsearch
  1. 安装es exporter

bash 复制代码
# 先检查,没有的话就安装
rpm -qa | grep elasticsearch_exporter

# 安装 es exporter
rpm -i /data/elasticsearch_exporter-1.3.0-1.el7.x86_64.rpm
sudo yum install elasticsearch_exporter-1.3.0-1.el7.x86_64

# 修改es exporter的default文件,将其中的localhost改为本机IP
vim /etc/default/elasticsearch_exporter

# 重启es exporter服务
systemctl restart elasticsearch_exporter
  1. 检查ES集群状态

csharp 复制代码
# 查看集群所有节点信息
curl http://172.21.56.207:9200/_cat/nodes?v


# 查看节点172.21.56.207 的es服务
curl http://172.21.56.207:9200
  1. 对接监控

选择 裸资源。

注册完成后,等几分钟后在夜莺中验证下

如果能查询到9114的信息,说明注册成功,监控对接完成。

复制代码
## 更新ES清单

协调节点es yml配置文件

172.21.56.207 yml 配置文件

yaml 复制代码
cluster.name: mc-cluster
node.name: coordinate01
node.master: false
node.data: false
node.ingest: false
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/log
path.repo: ["/data/elasticsearch/backup"]
network.host: 0.0.0.0
http.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.21.43.101:9300","172.21.43.102:9300","172.21.43.103:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.commit_timeout: 100s
discovery.zen.publish_timeout: 100s
discovery.zen.ping_timeout: 100s
discovery.zen.fd.ping_timeout: 100s
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
action.destructive_requires_name: false
#xpack.security.audit.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
action.auto_create_index: true
thread_pool.bulk.queue_size: 100
bootstrap.system_call_filter: false
bootstrap.memory_lock: false

172.21.56.208 yml 配置文件

yaml 复制代码
cluster.name: mc-cluster
node.name: coordinate02
node.master: false
node.data: false
node.ingest: false
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/log
path.repo: ["/data/elasticsearch/backup"]
network.host: 0.0.0.0
http.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.21.43.101:9300","172.21.43.102:9300","172.21.43.103:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.commit_timeout: 100s
discovery.zen.publish_timeout: 100s
discovery.zen.ping_timeout: 100s
discovery.zen.fd.ping_timeout: 100s
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
action.destructive_requires_name: false
#xpack.security.audit.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
action.auto_create_index: true
thread_pool.bulk.queue_size: 100
bootstrap.system_call_filter: false
bootstrap.memory_lock: false

172.21.56.209 yml 配置文件

yaml 复制代码
cluster.name: mc-cluster
node.name: coordinate03
node.master: false
node.data: false
node.ingest: false
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/log
path.repo: ["/data/elasticsearch/backup"]
network.host: 0.0.0.0
http.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.21.43.101:9300","172.21.43.102:9300","172.21.43.103:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.commit_timeout: 100s
discovery.zen.publish_timeout: 100s
discovery.zen.ping_timeout: 100s
discovery.zen.fd.ping_timeout: 100s
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
action.destructive_requires_name: false
#xpack.security.audit.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
action.auto_create_index: true
thread_pool.bulk.queue_size: 100
bootstrap.system_call_filter: false
bootstrap.memory_lock: false

172.21.56.210 yml 配置文件

yaml 复制代码
cluster.name: mc-cluster
node.name: coordinate04
node.master: false
node.data: false
node.ingest: false
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/log
path.repo: ["/data/elasticsearch/backup"]
network.host: 0.0.0.0
http.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.21.43.101:9300","172.21.43.102:9300","172.21.43.103:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.commit_timeout: 100s
discovery.zen.publish_timeout: 100s
discovery.zen.ping_timeout: 100s
discovery.zen.fd.ping_timeout: 100s
discovery.zen.fd.ping_interval: 10s
discovery.zen.fd.ping_retries: 10
action.destructive_requires_name: false
#xpack.security.audit.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
action.auto_create_index: true
thread_pool.bulk.queue_size: 100
bootstrap.system_call_filter: false
bootstrap.memory_lock: false
相关推荐
流***陌9 分钟前
手办盲盒抽赏小程序前端功能设计:兼顾收藏需求与抽赏乐趣
前端·小程序
岁月宁静36 分钟前
在富文本编辑器中封装实用的 AI 写作助手功能
前端·vue.js·人工智能
金士顿41 分钟前
为什么MainWindow.xaml绑定的datacontext,EtherCATSuiteCtrl.xaml直接用了?
前端
533_1 小时前
[css] flex布局中的英文字母不换行问题
前端·css
浮游本尊1 小时前
React 18.x 学习计划 - 第四天:React Hooks深入
前端·学习·react.js
future_studio1 小时前
聊聊 Unity(小白专享、C# 小程序 之 日历、小闹钟)
前端·html
Yeats_Liao2 小时前
Go Web 编程快速入门 · 04 - 请求对象 Request:头、体与查询参数
前端·golang·iphone
祈祷苍天赐我java之术2 小时前
Redis 数据类型与使用场景
java·开发语言·前端·redis·分布式·spring·bootstrap
草莓熊Lotso3 小时前
C++ 方向 Web 自动化测试入门指南:从概念到 Selenium 实战
前端·c++·python·selenium
Olrookie3 小时前
若依前后端分离版学习笔记(二十)——实现滑块验证码(vue3)
java·前端·笔记·后端·学习·vue·ruoyi