This is the documentation for Cloudera Manager 5.1.x. Documentation for other versions is available at Cloudera Documentation.

Upgrading CDH 5 Using Packages

Required Role:

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.

  1. Before You Begin
  2. Upgrade Unmanaged Components
  3. Upgrade Managed Components
  4. Using the "1-Click" Package
  5. Update Symlinks for the Newly Installed Components
  6. Upgrade the Oozie ShareLib
  7. Upgrade Spark
  8. Upgrade Sqoop
  9. Restart the Services
  10. Configure Cluster CDH Version for Package Installs
  11. 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

Upgrade unmanaged components before proceeding to upgrade managed components. Components that you might have installed that are not managed by Cloudera Manager include:
  • 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.

  1. 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.

  2. 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
      1. Download and install the "1-click Install" package.
        1. 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
        2. 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
      2. (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
    • SLES
      1. Download and install the "1-click Install" package:
        1. 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).

        2. Install the RPM:
          $ sudo rpm -i cloudera-cdh-5-0.x86_64.rpm
        3. Update your system package index by running:
          $ sudo zypper refresh
      2. (Optionally) add a repository key:
        $ sudo rpm --import http://archive.cloudera.com/cdh5/sles/11/x86_64/cdh/RPM-GPG-KEY-cloudera  
    • Ubuntu and Debian
      1. Download and install the "1-click Install" package:
        1. Download the CDH 5 "1-click Install" package:
          OS Version Click this Link
          Wheezy Wheezy link
          Precise Precise link
        2. 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
      2. (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 -
  3. 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.

Update Symlinks for the Newly Installed Components

Restart all the Cloudera Manager Agents to force an update of the symlinks to point to the newly installed components on each host:
$ sudo service cloudera-scm-agent restart

Upgrade the Oozie ShareLib

  1. Go to the Oozie service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Select Actions > Install Oozie ShareLib and click Install Oozie ShareLib to confirm.
  4. When the command completes, click Close.

Upgrade Spark

Required if you are updating from CDH 5.0 to 5.1.

  1. Go to the Spark service.
  2. Select Actions > Upload Spark Jar and click Upload Spark Jar to confirm.
  3. When the command completes, click Close.
  4. Select Actions > Create Spark History Log Dir and click Create Spark History Log Dir to confirm.
  5. When the command completes, click Close.

Upgrade Sqoop

  1. Go to the Sqoop service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Select Actions > Upgrade Sqoop and click Upgrade Sqoop to confirm.
  4. When the command completes, click Close.

Restart the Services

  1. On the Home page, click to the right of the cluster name and select Restart.
  2. 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

  1. On the Home page, click to the right of the cluster name and select Deploy Client Configuration.
  2. Click the Deploy Client Configuration button in the confirmation pop-up that appears.
Page generated September 3, 2015.