- option - local repository setting for HDP 2.2 update (temporary internet access)
- cd /etc/yum.repos.d
- rm -fambari* HDP*
- wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.0/ambari.repo
- wget http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/hdp.repo
- yum -y install yum-utils createrepo
- install and run web server
- mkdir -p /var/www/html/
- cd /var/www/html/
- mkdir -p ambari/centos6
- cd ambari/centos6
- reposync -r Updates-ambari-2.1.0
- createrepo Updates-ambari-2.1.0
- cd /var/www/html/
- mkdir -p hdp/centos6
- cd hdp/centos6
- reposync -r HDP-2.3.0.0
- reposync -r HDP-UTILS-1.1.0.20
- createrepo HDP-2.3.0.0
- createrepo HDP-UTILS-1.1.0.20
- edit DocumentRoot and Directory at /usr/local/apache2/conf/httpd.conf or
- cd /usr/local/apache2/htdocs
- ln -s /var/www/html/ambari ambari
- ln -s /var/www/html/hdp hdp
- http://hostname/ambari/centos6/Updates-ambari-2.1.0
- http://hostname/hdp/centos6/HDP-2.3.0.0
- http://hostname/hdp/centos6/HDP-UTILS-1.1.0.20
- option (If you have multiple repositories configured in your environment)
- yum -y install yum-plugin-priorities
- vim /etc/yum/pluginconf.d/priorities.conf
- [main]
- enabled=1
- gpgcheck=0
- stop web server at the end
- /usr/local/apache2/bin/apachectl -k stop
- Upgrading ambari 2.0 to 2.1 (HDP)
- http://mungeol-heo.blogspot.kr/2015/11/upgrading-ambari-20-to-21-hdp.html
- Upgrading ambari metrics (HDP)
- http://mungeol-heo.blogspot.kr/2015/11/upgrading-ambari-metrics-hdp.html
- ambari web -> admin > stack and versions > manage versions > + register version
- enter 0.0
- enter 'http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0' for HDP base URL
- enter 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6' for HDP-UTILS base URL
- save
- go to dashboard > admin > stack and versions > verions > install packages > ok
- record component layoutbrowse to each Service except HDFS and ZooKeeper and perform Stop
- namenode (active) hostlog in to ambari
- cd <dfs.namenode.name.dir>
- Make sure that only a "/current" directory and no "/previous" directory exists
- cp -r current /home/hdfs/
- su hdfs
- cd
- hdfs fsck / -files -blocks -locations > dfs-old-fsck-1.log
- hdfs dfsadmin -report > dfs-old-report-1.log
- hdfs dfsadmin -safemode enter
- hdfs dfsadmin -saveNamespace
- hdfs dfsadmin -finalizeUpgrade
- Using Ambari Web, stop HDFS service and stop ZooKeeper service
- namenode (active) hosthdp-select set all 2.3.0.0-2557 (all hosts)
- cd <dfs.namenode.name.dir>/current
- hdfs oev -i edits_inprogress_* -o edits.out
- Verify edits.out file. It should only have OP_START_LOG_SEGMENT transaction
- mkdir -p /work/upgrade_hdp_2
- cd /work/upgrade_hdp_2
- curl -O https://raw.githubusercontent.com/apache/ambari/branch-2.1/ambari-server/src/main/python/upgradeHelper.py
- chmod 777 upgradeHelper.py
- curl -O https://raw.githubusercontent.com/apache/ambari/branch-2.1/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3.json
- python upgradeHelper.py --hostname $HOSTNAME --user $USERNAME --password $PASSWORD --clustername $CLUSTERNAME --fromStack $FROMSTACK --toStack $TOSTACK --upgradeCatalog UpgradeCatalog_2.2_to_2.3.json update-configs [config-type]curl -O https://raw.githubusercontent.com/apache/ambari/branch-2.1/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.2_to_2.3_step2.json
- ariableValue$HOSTNAMEAmbari Server hostname. This should be the FQDN for the host running the Ambari Server.$USERNAMEAmbari Admin user.$PASSWORDPassword for the user.$CLUSTERNAMEName of the cluster. This is the name you provided when you installed the cluster with Ambari. Login to Ambari and the name can be found in the upper-left of the Ambari Web screen. This is case-sensitive.$FROMSTACKThe “from” stack. Forexample:2.2$TOSTACKThe “to” stack. Forexample:2.3config-typeOptional: the config-type to upgrade. For example:hdfs-site. By default, all configurations are updated.
- upgrade zookeeper
- start it at ambari web
- mv /etc/zookeeper/conf /etc/zookeeper/conf.saved
- ln -s /usr/hdp/current/zookeeper-client/conf /etc/zookeeper/conf
- upgrade HDFS
- \cp -r /etc/hadoop/conf/* /etc/hadoop/2.3.0.0-2557/0/
- mv /etc/hadoop/conf /etc/hadoop/conf.saved
- ln -s /usr/hdp/current/hadoop-client/conf /etc/hadoop/conf
- su -l hdfs -c "/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start namenode -upgrade"
- ps -ef | grep -i NameNode
- su -l hdfs -c "/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start datanode"
- ps -ef | grep DataNode
- ambari web > services > HDFS > restart all
- run service check
- su -l hdfs -c "hdfs dfsadmin -safemode get"
- safe mode is off
- upgrade YARN and MR2note that you may have to upgrade other services to complete the upgrading which depends on your cluster configuration
- su -l hdfs -c "hdfs dfs -mkdir -p /hdp/apps/2.3.0.0-2557/mapreduce/"
- su -l hdfs -c "hdfs dfs -put /usr/hdp/current/hadoop-client/mapreduce.tar.gz /hdp/apps/2.3.0.0-2557/mapreduce/."
- su -l hdfs -c "hdfs dfs -put /usr/hdp/current/hadoop-mapreduce-client/hadoop-streaming.jar /hdp/apps/2.3.0.0-2557/mapreduce/."
- su -l hdfs -c "hdfs dfs -chown -R hdfs:hadoop /hdp"
- su -l hdfs -c "hdfs dfs -chmod -R 555 /hdp/apps/2.3.0.0-2557/mapreduce"
- su -l hdfs -c "hdfs dfs -chmod -R 444 /hdp/apps/2.3.0.0-2557/mapreduce/mapreduce.tar.gz"
- su -l hdfs -c "hdfs dfs -chmod -R 444 /hdp/apps/2.3.0.0-2557/mapreduce/hadoop-streaming.jar"
- su -l yarn -c "yarn resourcemanager -format-state-store"
- start YARN and MR2 from ambari web
- run service check for YARN and MR2
- sudo su -l hdfs -c "hdfs dfsadmin -finalizeUpgrade"
- ambari-server set-current --cluster-name=dev --version-display-name=HDP-2.3.0.0
- option
- If your cluster includes Ranger
- cd /work/upgrade_hdp_2
- python upgradeHelper.py --hostname $HOSTNAME --user $USERNAME --password $PASSWORD --clustername $CLUSTERNAME --fromStack $FROMSTACK --toStack $TOSTACK --upgradeCatalog UpgradeCatalog_2.2_to_2.3_step2.json update-configs [config-type]
- cd /work/upgrade_hdp_2
- If your cluster includes Ranger
Monday, November 30, 2015
Manual Upgrade HDP 2.2 to 2.3
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.