HDP集群升级
一、版本信息
1、原版本:
ambari-2.2.2.0-centos7
HDP-UTILS-1.1.0.20-centos7
HDP-2.4.2.0-centos7
2、升级版本:
ambari-2.4.0.1-centos7
HDP-2.5.0.0-centos7
HDP-UTILS-1.1.0.21-centos7
-
下载地址
http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.1/bk_ambari-installation/content/hdp_25_repositories.html
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.0.1/ambari-2.4.0.1-centos7.tar.gz
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0/HDP-2.5.0.0-centos7-rpm.tar.gz
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7/HDP-UTILS-1.1.0.21-centos7.tar.gz
三、升级步骤:
http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.1/bk_ambari-upgrade/content/preparing_to_upgrade_ambari.html
1、备份数据库
mysqldump --user=root --password=123456 ambari >ambari.sql
2、编辑新的repo
/etc/yum.repos.d/ambari.repo
[Updates-ambari-2.4.0.1]
name=Ambari-2.4.0.1 - Updates
baseurl=http://10.0.0.13/AMBARI-2.4.0.1/centos7/2.4.0.1-1
gpgcheck=0
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
/etc/yum.repos.d/hdp.repo
[HDP-2.5.0.0]
name=HDP Version - HDP-2.5.0.0
baseurl=http://10.0.0.13/HDP/centos7
gpgcheck=0
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
/etc/yum.repos.d/hdp-util.repo
[HDP-UTILS-1.1.0.21]
name=HDP-UTILS Version - HDP-UTILS-1.1.0.21
baseurl=http://10.0.0.13/HDP-UTILS-1.1.0.21/repos/centos7
gpgcheck=0
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
repo分发到所有机器,注意删除之前安装hdp遗留的repo。
3、Ambari升级
1)停止ambari
ambari-server stop(server节点)
ambari-agent stop(所有节点)
2)更新ambari-server(server节点)
yum clean all
yum info ambari-server
yum upgrade ambari-server
3)更新ambari-agent(所有节点)
yum upgrade ambari-agent
4)更新Ambari Server database schema(server节点):
ambari-server upgrade
5)启动:
ambari-server start
ambari-agent start
4、Ambari Metrics升级
1)ambari web界面停止Ambari Metrics
2)更新Ambari Metrics(所有节点):
yum clean all
yum upgrade ambari-metrics-monitor ambari-metrics-hadoop-sink
3)更新Metrics Collector(collector节点hdpjn03):
yum upgrade ambari-metrics-collector
4)更新grafana(grafana节点 hdpjn01):
yum upgrade ambari-metrics-grafana
5)ambari web界面启动Ambari Metrics
-
升级hdp
1)浏览Ambari Web > Admin > Stack and Versions。
点击Versions标签,你将看到已经安装的HDP版本。
点击Manage Versions,点击右上角的按钮+ Register Version,添加新的hdp版本。
2)选择HDP2.5默认版本,填写版本Name:HDP-2.5.0.0。
3)选择使用本地仓库。
4)保存后点击Install Packages安装新版HDP包。
5)安装后点击upgrade
有两种升级模式,一种是保持服务运行升级,另一种是停止服务升级,此处选择保持服务运行升级。
6)点击Checks查看警告信息,requirements必须满足,warning可以忽略。
7)需要检查TEZ服务,进入TEZ服务,选择""run service check""
检查其它服务操作方法相同。
8)确认是否升级
9)选择i have performed the clients will retry on their above. 之后proceed
10)开始升级,过程中会有手动选择的对话框。
11)最后确认是否完成升级,升级后无法回退到旧版本。
HDP2.5已经为当前版本
-
hdp升级错误:
提示:
2:postfix-2.10.1-6.el7.x86_64 has missing requires of libmysqlclient.so.18()
需安装mysql兼容包:
wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-5.6.15-1.el6.x86_64.rpm
rpm -ih MySQL-shared-5.6.15-1.el6.x86_64.rpm
wget http://cdn.mysql.com/archives/mysql-5.6/MySQL-shared-compat-5.6.15-1.el6.x86_64.rpm
rpm -ih MySQL-shared-compat-5.6.15-1.el6.x86_64.rpm
7、ambari删除服务的操作
1)先手工在web界面上停止相关服务,然后通过curl来后台停止服务
curl -u admin:teld -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo": {"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://hdpjn00:8080/api/v1/clusters/hdpjntest/services/OOZIE
2)删除相关服务
curl -u admin:teld -H "X-Requested-By: ambari" -X DELETE http://hdpjn00:8080/api/v1/clusters/hdpjntest/services/OOZIE
3)查询相关服务的状态
curl -u admin:teld -H "X-Requested-By: ambari" -X GET http://hdpjn00:8080/api/v1/clusters/hdpjntest/services/OOZIE