You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by to...@apache.org on 2012/07/20 03:49:54 UTC

svn commit: r1363615 - in /whirr/branches/branch-0.7: ./ services/cdh/src/main/resources/functions/

Author: tomwhite
Date: Fri Jul 20 01:49:53 2012
New Revision: 1363615

URL: http://svn.apache.org/viewvc?rev=1363615&view=rev
Log:
WHIRR-568. Use the correct CDH version/repository. Contributed by Andrew Bayer.

Modified:
    whirr/branches/branch-0.7/CHANGES.txt
    whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh
    whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hbase.sh
    whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_zookeeper.sh

Modified: whirr/branches/branch-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/CHANGES.txt?rev=1363615&r1=1363614&r2=1363615&view=diff
==============================================================================
--- whirr/branches/branch-0.7/CHANGES.txt (original)
+++ whirr/branches/branch-0.7/CHANGES.txt Fri Jul 20 01:49:53 2012
@@ -48,6 +48,9 @@ Release 0.7.2
 
     WHIRR-459. DNS Failure when trying to spawn HBase cluster (Alex Heneveld via asavu)
 
+    WHIRR-568. Use the correct CDH version/repository.
+    (Andrew Bayer via tomwhite)
+
 Release 0.7.1 - 2012-02-23
 
   IMPROVEMENTS

Modified: whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh?rev=1363615&r1=1363614&r2=1363615&view=diff
==============================================================================
--- whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh (original)
+++ whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hadoop.sh Fri Jul 20 01:49:53 2012
@@ -19,12 +19,20 @@ function register_cloudera_repo() {
   CDH_MAJOR_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9]\).*/\1/')
   CDH_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9][0-9]*\)/\1/')
   if which dpkg &> /dev/null; then
-    cat > /etc/apt/sources.list.d/cloudera.list <<EOF
+    if [ $CDH_MAJOR_VERSION = "4" ]; then
+      cat > /etc/apt/sources.list.d/cloudera-cdh4.list <<EOF
+deb http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+deb-src http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+EOF
+      curl -s http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh/archive.key | apt-key add -
+    else
+      cat > /etc/apt/sources.list.d/cloudera-$REPO.list <<EOF
 deb http://archive.cloudera.com/debian lucid-$REPO contrib
 deb-src http://archive.cloudera.com/debian lucid-$REPO contrib
 EOF
-    curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -
-    retry_apt_get -y update
+      curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add -
+    fi
+    sudo apt-get -y update
   elif which rpm &> /dev/null; then
     rm -f /etc/yum.repos.d/cloudera*.repo
     if [ $CDH_MAJOR_VERSION = "4" ]; then
@@ -45,7 +53,7 @@ gpgkey = http://archive.cloudera.com/red
 gpgcheck = 0
 EOF
     fi
-    retry_yum update -y yum
+    yum update -y yum
   fi
 }
 

Modified: whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hbase.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hbase.sh?rev=1363615&r1=1363614&r2=1363615&view=diff
==============================================================================
--- whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hbase.sh (original)
+++ whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_hbase.sh Fri Jul 20 01:49:53 2012
@@ -15,24 +15,44 @@
 # limitations under the License.
 #
 function register_cloudera_repo() {
+  CDH_MAJOR_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9]\).*/\1/')
+  CDH_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9][0-9]*\)/\1/')
   if which dpkg &> /dev/null; then
-    cat > /etc/apt/sources.list.d/cloudera.list <<EOF
+    if [ $CDH_MAJOR_VERSION = "4" ]; then
+      cat > /etc/apt/sources.list.d/cloudera-cdh4.list <<EOF
+deb http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+deb-src http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+EOF
+      curl -s http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh/archive.key | apt-key add -
+    else
+      cat > /etc/apt/sources.list.d/cloudera-$REPO.list <<EOF
 deb http://archive.cloudera.com/debian lucid-$REPO contrib
 deb-src http://archive.cloudera.com/debian lucid-$REPO contrib
 EOF
-    curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -
-    retry_apt_get update
+      curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add -
+    fi
+    sudo apt-get -y update
   elif which rpm &> /dev/null; then
-    rm -f /etc/yum.repos.d/cloudera.repo
-    REPO_NUMBER=`echo $REPO | sed -e 's/cdh\([0-9][0-9]*\)/\1/'`
-    cat > /etc/yum.repos.d/cloudera-$REPO.repo <<EOF
+    rm -f /etc/yum.repos.d/cloudera*.repo
+    if [ $CDH_MAJOR_VERSION = "4" ]; then
+      cat > /etc/yum.repos.d/cloudera-cdh4.repo <<EOF
+[cloudera-cdh4]
+name=Cloudera's Distribution for Hadoop, Version 4
+baseurl=http://archive.cloudera.com/cdh4/redhat/5/x86_64/cdh/4/
+http://repos.jenkins.sf.cloudera.com/cdh4-nightly/redhat/5/x86_64/cdh/4/
+gpgkey = http://archive.cloudera.com/cdh4/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera 
+gpgcheck = 1
+EOF
+    else
+      cat > /etc/yum.repos.d/cloudera-$REPO.repo <<EOF
 [cloudera-$REPO]
-name=Cloudera's Distribution for Hadoop, Version $REPO_NUMBER
-mirrorlist=http://archive.cloudera.com/redhat/cdh/$REPO_NUMBER/mirrors
+name=Cloudera's Distribution for Hadoop, Version $CDH_VERSION
+mirrorlist=http://archive.cloudera.com/redhat/cdh/$CDH_VERSION/mirrors
 gpgkey = http://archive.cloudera.com/redhat/cdh/RPM-GPG-KEY-cloudera
 gpgcheck = 0
 EOF
-    retry_yum update -y yum
+    fi
+    yum update -y yum
   fi
 }
 

Modified: whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_zookeeper.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_zookeeper.sh?rev=1363615&r1=1363614&r2=1363615&view=diff
==============================================================================
--- whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_zookeeper.sh (original)
+++ whirr/branches/branch-0.7/services/cdh/src/main/resources/functions/install_cdh_zookeeper.sh Fri Jul 20 01:49:53 2012
@@ -18,12 +18,20 @@ function register_cloudera_repo() {
   CDH_MAJOR_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9]\).*/\1/')
   CDH_VERSION=$(echo $REPO | sed -e 's/cdh\([0-9][0-9]*\)/\1/')
   if which dpkg &> /dev/null; then
-    cat > /etc/apt/sources.list.d/cloudera.list <<EOF
+    if [ $CDH_MAJOR_VERSION = "4" ]; then
+      cat > /etc/apt/sources.list.d/cloudera-cdh4.list <<EOF
+deb http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+deb-src http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib
+EOF
+      curl -s http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh/archive.key | apt-key add -
+    else
+      cat > /etc/apt/sources.list.d/cloudera-$REPO.list <<EOF
 deb http://archive.cloudera.com/debian lucid-$REPO contrib
 deb-src http://archive.cloudera.com/debian lucid-$REPO contrib
 EOF
-    curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -
-    retry_apt_get -y update
+      curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add -
+    fi
+    sudo apt-get -y update
   elif which rpm &> /dev/null; then
     rm -f /etc/yum.repos.d/cloudera*.repo
     if [ $CDH_MAJOR_VERSION = "4" ]; then
@@ -44,7 +52,7 @@ gpgkey = http://archive.cloudera.com/red
 gpgcheck = 0
 EOF
     fi
-    retry_yum update -y yum
+    yum update -y yum
   fi
 }