ambari版本升级1.7升级到2.1版本

之前写过一篇,ambari2.1升级到2.4的步骤,下面将ambari1.7升级到2.1的步骤汇总下,这里不建议从ambari1.7升级到2.1后再次继续升级到2.4版本,目前已知hive服务出现问题,服务无法运行。

为什么要升级版本,因为新版本会有更多的功能,ambari1.7没有服务删除的功能,部分服务没有Move的功能,没有机架感知,新的ambari版本增加了更多功能。

升级前一定要做好备份!出现问题后回退

官方升级版本说明
http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.1/bk_ambari-installation/content/determine_stack_compatibility.html
官方升级步骤
http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.1/bk_ambari-upgrade/content/preparing_to_upgrade_ambari.html
官方HDP问题搜索
https://community.hortonworks.com/answers/index.html
(这里我没有找到1.7升级到2.1版本的官方步骤,上面是ambari2.1升级到2.4的步骤,操作是一样的)

一、升级前准备
Preparing to Upgrade

确认版本
Be sure to review the Release Notes for this Ambari release for Known Issues and Behavioral Changes.

拥有root权限
You must have root, administrative, or root-equivalent authorization on the Ambari server host and all servers in the cluster.

备份ambari数据库
You must backup the Ambari Server database.

备份好ambari.properties配置文件
You must make a safe copy of the Ambari Server configuration file found at /etc/ambari-server/conf/ambari.properties.

二、停止服务、下载新的ambari.repo
ambari-server stop
ambari-agent stop
wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.2.1/ambari.repo -O /etc/yum.repos.d/ambari.repo

三、升级操作
Upgrade Ambari Server. On the host running Ambari Server:
    yum clean all
    yum info ambari-server

在ambari节点更新ambari-server
In the info output, visually validate that there is an available version containing "2.1"
    yum upgrade ambari-server

显示如下成功:
Updated:
   ambari-server.x86_64 0:2.1.2.1-1      
Complete!

在所有节点更新ambari-agent
Upgrade all Ambari Agents. On each host in your cluster running an Ambari Agent:
    yum upgrade ambari-agent

显示如下成功:
Updated:
  ambari-agent.x86_64 0:2.1.2.1-1                                                         

Complete!

查看ambari-agent
After the upgrade process completes, check each host to make sure the new files have been installed:
rpm -qa | grep ambari-agent

升级ambari-server
Upgrade Ambari Server database schema. On the host running Ambari Server:
ambari-server upgrade


[root@hadooptest50 ~]# ambari-server upgrade
Using python  /usr/bin/python2.6
Upgrading ambari-server
Updating properties in ambari.properties ...
WARNING: Can not find ambari-env.sh.rpmsave file from previous version, skipping restore of environment settings
Fixing database objects owner
Ambari Server configured for MySQL. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
Upgrading database schema
Adjusting ambari-server permissions and ownership...
Ambari Server 'upgrade' completed successfully.


启动ambari-server
Start the Ambari Server. On the host running Ambari Server:
ambari-server start

[root@testserver2 yum.repos.d]# ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
No errors were found.
Ambari database consistency check finished
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Ambari Server 'start' completed successfully.

所有节点启动ambari-agent
Start all Ambari Agents. On each host in your cluster running an Ambari Agent:
ambari-agent start

登录ambari管理界面,查看版本,升级成功。

登录后有个告警,关于HBase Master,但我并没有安装hbase,莫名其妙的告警,这个点进去可以关闭,就不会提示了。

因为ambari2.1版本,服务中不在有ganglia、nagios,增加组件Metrics代替性能监控,所以界面中CPU、Memory信息图表没有了,但通过原来的ganglia、nagios链接还可以访问,ambari界面上只有gnaglia服务可以控制,nagios消失了。


安装下ambari-metrics后,就会出现性能图



这里因为业务需要我只升级了ambari,没有升级HDP版本,如果打算升级hadoop版本,需要升级HDP,也需要考虑各版本升级兼容问题,请参考 这篇文章

ambari升级后,界面中增加服务的组件也会变了,之前1.7有ganglia、nagios,升级后就不见了,增加组件中有Metrics代替性能监控。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值