Upgrading CDH 5 Using Packages
If you originally used Cloudera Manager to install your CDH service using packages, you can upgrade to a new version of CDH 5 using either packages or parcels. Using parcels is recommended, because the upgrade wizard for parcels handles the upgrade almost completely automatically. But if you want to continue to use packages, you can perform an upgrade following the instructions presented here.
To upgrade CDH using packages, the steps are as follows.
- Before You Begin
- Upgrade Unmanaged Components
- Upgrade Managed Components
- Using the "1-Click" Package
- Update Symlinks for the Newly Installed Components
- Upgrade the Oozie ShareLib
- Upgrade Spark
- Upgrade Sqoop
- Restart the Services
- Configure Cluster CDH Version for Package Installs
- Deploy the New Client Configuration Files
Before You Begin
- Read the CDH 5 Release Notes.
- Read the Cloudera Manager 5 Release Notes.
- Make sure there are no Oozie workflows in RUNNING or SUSPENDED status; otherwise the Oozie database upgrade will fail and you will have to reinstall CDH 4 to complete or kill those running workflows.
- Run the Host Inspector and fix every issue.
- If using security, run the Security Inspector.
- Run hdfs fsck / and hdfs dfsadmin -report and fix any issues.
- Run hbase hbck to make sure there are no inconsistencies.
- Review the upgrade procedure and reserve a maintenance window with enough time allotted to perform all steps. For production clusters, Cloudera recommends allocating up to a full day maintenance window to perform the upgrade, depending on the number of hosts, the amount of experience you have with Hadoop and Linux, and the particular hardware you are using.
- To avoid generating many alerts during the upgrade process, you can enable maintenance mode on your cluster before you start the upgrade. Be sure to exit maintenance mode when you have finished the upgrade, in order to re-enable Cloudera Manager alerts.
Upgrade Unmanaged Components
- Pig
- Whirr
- Mahout
For information on upgrading these unmanaged components, see the CDH 5 Installation Guide.
Upgrade Managed Components
Use one of the following strategies to upgrade CDH 5:- Use your operating system's package management tools to update all packages to the latest version using standard repositories. This approach works well because it minimizes the amount of configuration required and uses the simplest commands. Be aware that this can take a considerable amount of time if you have not upgraded the system recently. To update all packages on your system, use the following command:
Operating System Command RHEL $ sudo yum update
SLES $ sudo zypper up
Ubuntu or Debian $ sudo apt-get upgrade
- Use Cloudera's "1-click Install" package. This is the simplest way to upgrade only the Cloudera packages. Follow the instructions in Using the "1-Click" Package.
Using the "1-Click" Package
Follow the instructions below if you have decided to use the "1-click" package.
- Check whether you have the CDH 5 "1-click" repository installed.
- Red Hat/CentOS-compatible and SLES
rpm -q CDH 5-repository
If you are upgrading from CDH 5 Beta 1 or later, and you used the "1-click" package for the previous CDH 5 release, you should see:
CDH5-repository-1-0
In this case, skip to installing the CDH 5 packages. If instead you see:
package CDH 5-repository is not installed
proceed with installing the 1-click package.
- Ubuntu and Debian
dpkg -l | grep CDH 5-repository
If the repository is installed, skip to installing the CDH 5 packages; otherwise proceed with installing the "1-click" package.
- Red Hat/CentOS-compatible and SLES
- If the CDH 5 "1-click" repository is not already installed on each host in the cluster, follow the instructions below for that host's operating system.
- Red Hat compatible
- Download and install the "1-click Install" package.
- Download the CDH 5 "1-click Install" package.
Click the entry in the table below that matches your Red Hat or CentOS system, choose Save File, and save the file to a directory to which you have write access (it can be your home directory).
OS Version Click this Link Red Hat/CentOS/Oracle 5 Red Hat/CentOS/Oracle 5 link Red Hat/CentOS/Oracle 6 Red Hat/CentOS/Oracle 6 link - Install the RPM:
- Red Hat/CentOS/Oracle 5
$ sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm
- Red Hat/CentOS/Oracle 6
$ sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm
- Red Hat/CentOS/Oracle 5
- Download the CDH 5 "1-click Install" package.
- (Optionally) add a repository key:
- Red Hat/CentOS/Oracle 5
$ sudo rpm --import http://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera
- Red Hat/CentOS/Oracle 6
$ sudo rpm --import http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera
- Red Hat/CentOS/Oracle 5
- Download and install the "1-click Install" package.
- SLES
- Download and install the "1-click Install" package:
- Download the CDH 5 "1-click Install" package.
Click this link, choose Save File, and save it to a directory to which you have write access (it can be your home directory).
- Install the RPM:
$ sudo rpm -i cloudera-cdh-5-0.x86_64.rpm
- Update your system package index by running:
$ sudo zypper refresh
- Download the CDH 5 "1-click Install" package.
- (Optionally) add a repository key:
$ sudo rpm --import http://archive.cloudera.com/cdh5/sles/11/x86_64/cdh/RPM-GPG-KEY-cloudera
- Download and install the "1-click Install" package:
- Ubuntu and Debian
- Download and install the "1-click Install" package:
- Download the CDH 5 "1-click Install" package:
OS Version Click this Link Wheezy Wheezy link Precise Precise link - Install the package. Do one of the following:
- Choose Open with in the download window to use the package manager.
- Choose Save File, save the package to a directory to which you have write access (it can be your home directory) and install it from the command line, for example:
sudo dpkg -i cdh5-repository_1.0_all.deb
- Download the CDH 5 "1-click Install" package:
- (Optionally) add a repository key:
- Ubuntu Lucid
$ curl -s http://archive.cloudera.com/cdh5/ubuntu/lucid/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Precise
$ curl -s http://archive.cloudera.com/cdh5/ubuntu/precise/amd64/cdh/archive.key | sudo apt-key add -
- Debian Wheezy
$ curl -s http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Lucid
- Download and install the "1-click Install" package:
- Red Hat compatible
- Install the CDH packages:
- Red Hat compatible
$ sudo yum clean all $ sudo yum install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr
- SLES
$ sudo zypper clean --all $ sudo zypper install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr
- Ubuntu and Debian
$ sudo apt-get update $ sudo apt-get install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr
Note: Installing these packages will also install all the other CDH packages that are needed for a full CDH 5 installation. - Red Hat compatible
Update Symlinks for the Newly Installed Components
$ sudo service cloudera-scm-agent restart
Upgrade the Oozie ShareLib
- Go to the Oozie service.
- Select Stop to confirm. and click
- Select Install Oozie ShareLib to confirm. and click
- When the command completes, click Close.
Upgrade Spark
Required if you are updating from CDH 5.0 to 5.1.
- Go to the Spark service.
- Select Upload Spark Jar to confirm. and click
- When the command completes, click Close.
- Select Create Spark History Log Dir to confirm. and click
- When the command completes, click Close.
Upgrade Sqoop
- Go to the Sqoop service.
- Select Stop to confirm. and click
- Select Upgrade Sqoop to confirm. and click
- When the command completes, click Close.
Restart the Services
- On the Home page, click to the right of the cluster name and select Restart.
- Click the Restart button in the confirmation pop-up that appears. The Command Details window shows the progress of starting services.
Configure Cluster CDH Version for Package Installs
If you have installed CDH as a package, after an install or upgrade make sure that the cluster CDH version matches the package CDH version, using the procedure in Configuring the CDH Version for a Cluster in Managing Clusters with Cloudera Manager. If the cluster CDH version does not match the package CDH version, Cloudera Manager will incorrectly enable and disable service features based on the cluster's configured CDH version.
Deploy the New Client Configuration Files
- On the Home page, click to the right of the cluster name and select Deploy Client Configuration.
- Click the Deploy Client Configuration button in the confirmation pop-up that appears.
<< Upgrading CDH 5 Using Parcels | Upgrading to CDH 5 >> | |