准备升级至v5.6.3之前的操作
创建时间:2024-04-02 最近修改时间:2024-04-02
#1. 准备升级至v5.6.3之前的操作
挂载镜像/同步源
# 挂载镜像 mount -o ro xxxx.iso /media/ # 同步源 rsync -acqrz --delete [控制器主机名]:/media/{yum,pip,docker-image} /usr/local/deepflow/ # 所有节点执行以下命令 yum clean all1
2
3
4
5
6升级mntnct和saltstack之前,需要先备份pillar文件夹
mv /usr/local/deepflow/saltstack/pillar /usr/local/deepflow/saltstack/pillar.bak1mntnct和deepflow-saltstack需提前升级
# 更新 yum --disablerepo=* --enablerepo=deepflow update -y deepflow-saltstack yum --disablerepo=* --enablerepo=deepflow update -y mntnct1
2
3恢复pillar配置
1. 恢复misc.sls备份内的salt-master到salt-mastes.sls 2. 恢复redis/mysql/influxdb账号密码等相关配置到对应的sls 3. droplet/trisolaris/trident/dedicated-trident等调优参数恢复1
2
3从控制器新增cloud-agent部署,需要提前在从控制器安装避免升级出错
#安装 salt -N proxy_controller cmd.run "yum --disablerepo=* --enablerepo=deepflow install -y cloud-agent"1
2安装web-tools、webssh、web-sched服务
# 安装 yum --disablerepo=* --enablerepo=deepflow install -y web-tools yum --disablerepo=* --enablerepo=deepflow install -y webssh yum --disablerepo=* --enablerepo=deepflow install -y web-sched1
2
3
4安装baseline服务
# 主备控制器安装 yum --disablerepo=* --enablerepo=deepflow install -y baseline # /etc/baseline.yaml 修改配置文件statistics与下面保持一致 statistics: http://127.0.0.1:204041
2
3
4安装log-cleaner服务
# 主备从控制器安装 salt -N controller cmd.run "yum --disablerepo=* --enablerepo=deepflow install -y log-cleaner" salt -N proxy_controller cmd.run "yum --disablerepo=* --enablerepo=deepflow install -y log-cleaner" # tsdb和专属采集器 salt -N tsdb cmd.run "yum --disablerepo=* --enablerepo=deepflow install -y log-cleaner" salt -N dedicated-trident cmd.run "yum --disablerepo=* --enablerepo=deepflow install -y log-cleaner"1
2
3
4
5
6使用openresty代替httpd
- 5.6.3部署使用openresty作为yum/pip源服务器,由于httpd与openresty具有相似的 功能,多引入组件将会增加运维成本(例如:修复漏洞),由于httpd出镜像源外无 其他作用,因此移除httpd
# 主备控制器停止 systemctl stop httpd # 主备控制器增加配置文件/usr/local/openresty/nginx/conf/conf.d/source.conf server { listen 23333; listen [::]:23333; server_name _; location ~* ^/(yum|pip) { rewrite /$1/(.*) /$2 break; root /usr/local/deepflow/$1; autoindex on; autoindex_exact_size off; autoindex_localtime on; } access_log /var/log/openresty/source.access.log main; error_log /var/log/openresty/source-error.log error; } # 主备控制器重启openresty systemctl restart openresty1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22