3.3.2. Instructions

  1. On your mirror server, execute the following command to download the appropriate Hortonworks yum client configuration file and save it in /etc/yum.repos.d/ directory on the mirror server host.

    Table 4.8. Deploying HDP - Option III
    Cluster OS HDP Repository Tarballs

    RHEL/ CentOS 5.x

    • HDP Repository:

      wget http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.3.7.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
    • Ambari Repository (Optional):

      wget http://public-repo-1.hortonworks.com/ambari/centos5/1.x/updates/1.4.1.61/ambari.repo -O /etc/yum.repos.d/ambari.repo

    RHEL/ CentOS 6.x

    • HDP Repository:

      wget http://public-repo-1.hortonworks.com/HDP/centos6/1.x/updates/1.3.7.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
    • Ambari Repository (Optional):

      wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.4.1.61/ambari.repo -O /etc/yum.repos.d/ambari.repo

    SLES 11

    • HDP Repository:

      wget http://public-repo-1.hortonworks.com/HDP/suse11/1.x/updates/1.3.7.0/hdp.repo -O /etc/zypp/repos.d/hdp.repo
    • Ambari Repository (Optional):

      wget http://public-repo-1.hortonworks.com/ambari/suse11/1.x/updates/1.4.1.61/ambari.repo -O /etc/zypp/repos.d/ambari.repo

    [Note]Note

    If you are using Ambari to perform the HDP installation, you will need to setup the Ambari repository using the information provided above.

  2. Create an HTTP server.

    • On the mirror server, install an HTTP server (such as Apache httpd) using the instructions provided here.

    • Activate this web server.

    • Ensure that the firewall settings (if any) allow inbound HTTP access from your cluster nodes to your mirror server.

      [Note]Note

      If you are using EC2, make sure that SELinux is disabled.

    • [Optional]: If your mirror server uses SLES, modify the default-server.conf file to enable the docs root folder listing.

      sed -e "s/Options None/Options Indexes MultiViews/ig" /etc/apache2/default-server.conf > /tmp/tempfile.tmp
      mv /tmp/tempfile.tmp /etc/apache2/default-server.conf
  3. On your mirror server, create a directory for your web server.

    • For example, from a shell window, type:

      • For RHEL/CentOS: mkdir –p /var/www/html/hdp/

      • For SLES: mkdir –p /srv/www/htdocs/rpms

    • If you are using a symlink, enable the followsymlinks on your web server.

  4. Copy the contents of entire HDP repository from the remote yum server to your local mirror server.

    Continuing the previous example, from a shell window, type:

    • Naviupdateste to the directory created on your web server previously:

      • For RHEL/CentOS:

        cd /var/www/html/hdp
      • For SLES:

        cd /srv/www/htdocs/rpms
    • Check version for yum-utils library.

      rpm -q yum-utils

      If the current version of yum-utils library is lesser than 1.1.31-7, there is might be a potential problem while running reposync command due a bug. The workaround is available at https://bugzilla.redhat.com/show_bug.cgi?id=882536.

    • Copy the contents of entire HDP repository from the remote yum server to your local mirror server.

      • HDP Repository:

        reposync -r HDP
        reposync -r updates-HDP-1.x
        reposync -r HDP-UTILS-1.1.0.16 
      • Ambari Repository (Optional):

        reposync –r ambari-1.x
        reposync –r updates-ambari-1.4.1.61

  5. Generate appropriate metadata. This step defines each directory as a yum repository.

    From a shell window, type:

    • For RHEL/CentOS:

      • HDP Repository:

        createrepo /var/www/html/hdp/HDP
      • Ambari Repository (Optional):

        createrepo /var/www/html/hdp/ambari-1.x
        createrepo /var/www/html/hdp/updates-ambari-1.4.1.61

    • For SLES:

      HDP Repository:

      createrepo /srv/www/htdocs/rpms/hdp/HDP 
      • Ambari Repository (Optional):

        createrepo /srv/www/htdocs/rpms/hdp/ambari-1.x
        createrepo/srv/www/htdocs/rpms/hdp/updates-ambari-1.4.1.61

      You should see a new repodata directory under the HDP and updates-HDP-1.x directories.

      If using Ambari, you should also see the repodata directory under the ambari-1.x and updates-ambari-1.x directories.

  6. Verify the configuration.

    • The configuration is successful, if you can access the repodata directory (discussed above) through your web browser.

      To test your configuration, browse to the following URLs:

      • HDP Repository:

        http://$yourwebserver/hdp/HDP/$os/1.x/updates/1.3.7.0
      • Ambari Repository (Optional):

        http://$yourwebserver/hdp/ambari/$os/1.x/updates/1.4.1.61

      where

      • $yourwebserver is FQDN of your local mirror server.

      • $os can be centos5, centos6, or suse11. Use the following options table for $os parameter:

         

        Table 4.9. Options for $os parameter in repo URL

        Operating SystemValue

        CentOS 5

        centos5

        RHEL 5
        Oracle 5

        CentOS 6

        centos6

        RHEL 6
        Oracle 6

        SUSE 11

        suse11


    • You should see the directory listing for all the HDP components.

  7. Disable external Internet access for the mirror server, so that the mirror server is within your data center firewall.

  8. Configure the yum or zypper clients on all the nodes in your cluster.

    1. Edit the repo files, changing the value of the baseurl property to the local mirror URL.

      • Edit the /etc/yum.repos.d/hdp.repo file changing the baseurl property as shown below:

        [HDP-1.x]
        name=Hortonworks Data Platform Version - HDP-1.x
        baseurl=http://$yourwebserver/HDP/$os/1.x/updates
        gpgcheck=1
        gpgkey=//public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        
        [HDP-UTILS-1.1.0.16]
        name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.16
        baseurl=http://$yourwebserver/HDP-UTILS-1.1.0.16/repos/$os
        gpgcheck=1
        gpgkey=//public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        
        [updates-HDP-1.x]
        name=HDP-1.x - updates
        baseurl=http://$yourwebserver/HDP/$os/1.x/updates
        gpgcheck=1
        gpgkey=//public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        
      • Edit the /etc/yum.repos.d/ambari.repo file changing the baseurl property as shown below:

        [ambari-1.x]
        name=Ambari 1.x
        baseurl=http://$yourwebserver/hdp/ambari/$os/1.x/updates/ambari.repo
        gpgcheck=1
        gpgkey=//public-repo-1.hortonworks.com/ambari/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        
        [HDP-UTILS-1.1.0.16]
        name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.16
        baseurl=http://$yourwebserver/HDP-UTILS-1.1.0.16/repos/$os
        gpgcheck=0
        gpgkey=//public-repo-1.hortonworks.com/ambari/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        
        [updates-ambari-1.4.1.61]
        name=ambari-1.4.1.61 - updates
        baseurl=http://$yourwebserver/ambari/$os/1.x/updates/1.4.1.61
        gpgcheck=1
        gpgkey=//public-repo-1.hortonworks.com/ambari/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
        enabled=1
        priority=1
        

      where

      • $yourwebserver is FQDN of your local mirror server.

      • $os can be centos5, centos6, or suse11. Use the following options table for $os parameter:

         

        Table 4.10. Options for $os parameter in repo URL

        Operating SystemValue

        CentOS 5

        centos5

        RHEL 5
        Oracle 5

        CentOS 6

        centos6

        RHEL 6
        Oracle 6

        SUSE 11

        suse11


    2. Copy the yum/zypper client configuration file to all nodes in your cluster.

      • For RHEL and CentOS: Use scp or pdsh to copy the client yum configuration file to /etc/yum.repos.d/ directory on every node in the cluster.

      • For SLES: On every node, invoke the following command:

        • HDP Repository:

          zypper addrepo -r http://$yourwebserver/hdp/HDP/suse11/1.x/updates/1.3.7.0/hdp.repo
        • Ambari Repository (Optional):

          zypper addrepo -r http://$yourwebserver/hdp/ambari/suse11/1.x/updates/1.4.1.61/ambari.repo
      • If using Ambari, verify the configuration by deploying Ambari server on one of the cluster nodes.

        yum install ambari-server

  9. If your cluster runs CentOS or RHEL, and if you have multiple repositories configured in your environment, deploy the following priorities plugin on all the nodes in your cluster.

    1. Install the plugin.

      • For RHEL and CentOS v5.x

        yum install yum-priorities
      • For RHEL and CentOS v6.x

        yum install yum-plugin-priorities
    2. Edit the /etc/yum/pluginconf.d/priorities.conf file to add the following:

      [main]
      enabled=1
      gpgcheck=0


loading table of contents...