手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Ambari + HDP 升级 (Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)

[日期:2017-03-03] 来源:Linux社区  作者:lochy [字体: ]

Ambari + HDP 升级 (Ambari 2.2.2 - 2.4.1 + HDP 2.4.2 - 2.5.0)

一、Ambari 升级

1.升级前准备

1.1确认版本

Be sure to review the Release Notes for this Ambari release for Known Issues and
Behavioral Changes

1.2确认拥有root权限

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

1.3 备份数据库

You must backup the Ambari Server database

1.4 备份ambari.properties配置文件

You must make a safe copy of the Ambari Server configuration file found at /etc/
ambari-server/conf/ambari.properties.

1.5 计划升级Ambari Metrics service

Record the location of the Metrics Collector component before you begin the upgrade process.
You must stop the Ambari Metrics service from Ambari Web.
• After upgrading Ambari, you must also Upgrade Ambari Metrics service and add the
Grafana component.
• Proceed to Upgrade to Ambari 2.4.
• After upgrading Ambari, you must also Upgrade Hortonworks SmartSense

2.开始升级 Ambari

2.1 关闭 Ambari Metrics service

If you are running Ambari Metrics service in your cluster, stop the service. From Ambari
Web, browse to Services > Ambari Metrics and select Stop from the Service Actions
menu.

2.2 停止ambari-server

ambari-server stop

2.3 停止ambari-agent

ambari-agent stop

2.4 获取新的ambari.repo

本次安装方式使用本地源的方式安装,先下载要安装的资源进行离线安装,具体方法请参考下面文章中制作本地源安装方法。 
 http://www.linuxidc.com/Linux/2017-03/141302.htm

下面是在线安装方式

wget -nv http://public-repo-1.hortonworks.com/ambari/CentOS7/2.x/updates/
2.4.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

2.5 升级 Ambari Server,在服务节点进行

2.5.1 显示ambari-server 信息
yum clean all
yum info ambari-server

输出信息如下:

[11:17:52]Installed Packages
[11:17:52]Name        : ambari-server
[11:17:52]Arch        : x86_64
[11:17:52]Version     : 2.2.2.0
[11:17:52]Release     : 460
[11:17:52]Size        : 445 M
[11:17:52]Repo        : installed
[11:17:52]From repo   : Updates-ambari-2.2.2.0
[11:17:52]Summary     : Ambari Server
[11:17:52]URL         : http://www.apache.org
[11:17:52]License     : 2012, Apache Software Foundation
[11:17:52]Description : Maven Recipe: RPM Package.
[11:17:52]
[11:17:52]Available Packages
[11:17:52]Name        : ambari-server
[11:17:52]Arch        : x86_64
[11:17:52]Version     : 2.4.1.0
[11:17:52]Release     : 22
[11:17:52]Size        : 646 M
[11:17:52]Repo        : Updates-ambari-2.4.1.0
[11:17:52]Summary     : Ambari Server
[11:17:52]URL         : http://www.apache.org
[11:17:52]License     : (c) Apache Software Foundation
[11:17:52]Description : Maven Recipe: RPM Package.

2.5.2执行更新操作

在输出信息中确认最新可用的版本为2.4.1.0,再进行ambari-server更新操作如下:

yum upgrade ambari-server

2.6 检查ambari-server 更新是否成功

在2.5.2 更新的过程中出现如下信息,说明更新成功

[11:24:56]Resolving Dependencies
[11:24:56]--> Running transaction check
[11:24:56]---> Package ambari-server.x86_64 0:2.2.2.0-460 will be updated
[11:24:56]---> Package ambari-server.x86_64 0:2.4.1.0-22 will be an update
[11:24:59]--> Finished Dependency Resolution
[11:24:59]
[11:24:59]Dependencies Resolved

[11:25:32]  Verifying  : ambari-server-2.4.1.0-22.x86_64                                                                                                                                                            1/2
[11:25:32]  Verifying  : ambari-server-2.2.2.0-460.x86_64                                                                                                                                                            2/2
[11:25:32]
[11:25:32]Updated:
[11:25:32]  ambari-server.x86_64 0:2.4.1.0-22                                                                                                                                                                           
[11:25:32]
[11:25:32]Complete!

2.7 更新所有的 ambari-agent节点

yum clean all
yum info ambari-agent
yum upgrade ambari-agent

输出结果如下,则ambari-agent 更新成功

[11:40:04]  Verifying  : ambari-agent-2.4.1.0-22.x86_64                                                                                                                                                              1/2 
[11:40:04]  Verifying  : ambari-agent-2.2.2.0-460.x86_64                                                                                                                                                             2/2 
[11:40:04]
[11:40:04]Updated:
[11:40:04]  ambari-agent.x86_64 0:2.4.1.0-22                                                                                                                                                                             
[11:40:04]
[11:40:04]Complete!

2.8 查看ambari-agent

查看所有集群机器上的ambari-agent 是否已经更新为最新版本

rpm -qa | grep ambari-agent

结果如下:

[11:41:57]ambari-agent-2.4.1.0-22.x86_64

2.9 升级ambari server database schema

在ambari-server 机器上进行server的更新操作

ambari-server upgrade

执行结果如下:

[13:54:05][root@nest-001 ambari2.4.1]# ambari-server upgrade
[13:54:05]Using python  /usr/bin/python
[13:54:05]Upgrading ambari-server
[13:54:05]Updating properties in ambari.properties ...
[13:54:05]WARNING: Original file ambari-env.sh kept
[13:54:05]Fixing database objects owner
[13:54:12]Ambari Server configured for MySQL. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y
[13:54:12]Upgrading database schema
[13:55:12]Adjusting ambari-server permissions and ownership...
[13:55:13]Ambari Server 'upgrade' completed successfully.

2.10 启动ambari-server

ambari-server start

结果如下:

[13:58:19][root@nest-001 ambari2.4.1]# ambari-server start
[13:58:19]Using python  /usr/bin/python
[13:58:19]Starting ambari-server
[13:58:19]Ambari Server running with administrator privileges.
[13:58:19]Organizing resource files at /var/lib/ambari-server/resources...
[13:58:19]Ambari database consistency check started...
[13:58:36]No errors were found.
[13:58:36]Ambari database consistency check finished
[13:58:36]Server PID at: /var/run/ambari-server/ambari-server.pid
[13:58:36]Server out at: /var/log/ambari-server/ambari-server.out
[13:58:36]Server log at: /var/log/ambari-server/ambari-server.log
[13:58:53]Waiting for server start....................
[13:58:53]Ambari Server 'start' completed successfully.

2.11 启动ambari-server

ambari-agent start

结果如下:

[13:59:22][root@nest-001 ambari2.4.1]# ambari-agent start
[13:59:22]Verifying Python version compatibility...
[13:59:22]Using python  /usr/bin/python
[13:59:22]Checking for previously running Ambari Agent...
[13:59:22]Starting ambari-agent
[13:59:24]Verifying ambari-agent process status...
[13:59:24]Ambari Agent successfully started
[13:59:24]Agent PID at: /var/run/ambari-agent/ambari-agent.pid
[13:59:24]Agent out at: /var/log/ambari-agent/ambari-agent.out
[13:59:24]Agent log at: /var/log/ambari-agent/ambari-agent.log

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

http://

3. Ambari 更新后的工作

3.1 更新Ambari Metrics

  1. Upgrade to Ambari 2.4 and perform needed post-upgrade checks. Make sure all services
    are up and healthy.
  2. Make sure Ambari Metrics service is stopped. From Ambari Web, browse to Services >
    Ambari Metrics and select Stop from the Service Actions menu.
  3. On every host in your cluster running a Metrics Monitor, run the following commands:
yum clean all
yum upgrade ambari-metrics-monitor ambari-metrics-Hadoop-sink

Execute the following command on all hosts running the Metrics Collector:

yum upgrade ambari-metrics-collector
yum upgrade ambari-metrics-grafana

Start Ambari Metrics Service.
From Ambari Web, browse to Services > Ambari Metrics select Service Actions then
choose Start

二、HDP 升级到2.5.0.0

1. 注册和安装目标版本

  1. 登录到 Ambari.
  2. 点击 Admin > Stack and Versions.
  3. 点击 Versions tab
  4. 点击 “Manage Versions”.
  5. 点击右上角的按钮Register Version,添加新的hdp版本
    image
    6.点击save 保存

2. 升级HDP相关组件

点击Install 就能够将hadoop升级到该HDP版本了
image
安装后点击upgrade,有两种升级模式,一种是保持服务运行升级,另一种是停止服务升级,后者升级更快些
image
checks 中问题按照提示具体进行解决,解决所有问题后按照提示进行升级
image
升级过程中可能会遇到各种问题,需要按照输出错误提示进行解决,可能需要retry多次
image
升级完成后效果如下:
image

Hadoop集群监控工具Ambari安装 http://www.linuxidc.com/Linux/2014-06/103208.htm

使用Ambari快速部署Hadoop大数据环境 http://www.linuxidc.com/Linux/2014-05/101531.htm

Ambari 服务配置以及 Alert 详解  http://www.linuxidc.com/Linux/2016-12/138149.htm

Ubuntu 14.04上搭建Ambari 清晰PDF  http://www.linuxidc.com/Linux/2016-01/126965.htm

CentOS 7 安装Ambari2.4.0图文详解 http://www.linuxidc.com/Linux/2016-12/138142.htm

CentOS 6.5下使用Ambari安装Hadoop集群  http://www.linuxidc.com/Linux/2014-12/110824.htm

Ambari安装指南图文详解 http://www.linuxidc.com/Linux/2017-03/141295.htm

CentOS 6.5+Ambari+HDP集群安装  http://www.linuxidc.com/Linux/2017-03/141297.htm

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-03/141303.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款