incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1351781 [2/2] - in /incubator/bigtop/trunk: ./ bigtop-deploy/puppet/manifests/ bigtop-deploy/puppet/modules/hue/ bigtop-deploy/puppet/modules/hue/manifests/ bigtop-deploy/puppet/modules/hue/templates/ bigtop-deploy/puppet/modules/hue/tests...
Date Tue, 19 Jun 2012 17:24:31 GMT
Added: incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse Tue Jun 19 17:24:29
2012
@@ -0,0 +1,156 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Hue web server
+#
+# chkconfig: 345 90 10
+# description: Hue web server
+# pidfile: /usr/lib/hue/pids/supervisor.pid
+#
+### BEGIN INIT INFO
+# Provides:          hue_webserver
+# Required-Start:    $syslog $remote_fs
+# Should-Start:
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop:
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Hue web server
+### END INIT INFO
+
+source /lib/lsb/init-functions
+
+
+STATUS_RUNNING=0
+STATUS_DEAD=1
+STATUS_DEAD_AND_LOCK=2
+STATUS_NOT_RUNNING=3
+
+
+ERROR_PROGRAM_NOT_INSTALLED=5
+ERROR_PROGRAM_NOT_CONFIGURED=6
+
+
+RETVAL=0
+LOCKFILE=/var/lock/subsys/hue_webserver
+LOGDIR=/var/log/hue  # Log directory to use
+PIDFILE=/var/run/hue/supervisor.pid
+DAEMON=/usr/lib/hue/build/env/bin/supervisor # Introduce the server's location here
+DAEMON_OPTS="-p $PIDFILE -l $LOGDIR -d"
+DESC="Hue web server"
+USER=hue
+
+export PYTHON_EGG_CACHE=/tmp/.hue-python-eggs
+
+hue_start() {
+  [ -x $DAEMON ] || exit $ERROR_PROGRAM_NOT_INSTALLED
+  log_success_msg "Starting $DESC: "
+
+  for dir in $(dirname $PIDFILE) $LOGDIR ${PYTHON_EGG_CACHE}
+  do
+    mkdir -p $dir
+    chown -R $USER $dir
+  done
+
+  start_daemon -u $USER $DAEMON $DAEMON_OPTS
+  RETVAL=$?
+  echo
+  [ $RETVAL -eq 0 ] && touch $LOCKFILE
+  return $RETVAL
+}
+
+hue_stop() {
+  log_success_msg "Stopping $DESC: "
+  killproc -p $PIDFILE $DAEMON
+  RETVAL=$?
+  sleep 5
+  echo
+  [ $RETVAL -eq 0 ] && rm -f $LOCKFILE $PIDFILE
+}
+
+hue_restart() {
+  hue_stop
+  hue_start
+}
+
+
+checkstatus(){
+  pidofproc -p $PIDFILE $DAEMON > /dev/null
+  status=$?
+
+  case "$status" in
+    $STATUS_RUNNING)
+      log_success_msg "$DESC is running"
+      ;;
+    $STATUS_DEAD)
+      log_failure_msg "$DESC is dead and pid file exists"
+      ;;
+    $STATUS_DEAD_AND_LOCK)
+      log_failure_msg "$DESC is dead and lock file exists"
+      ;;
+    $STATUS_NOT_RUNNING)
+      log_failure_msg "$DESC is not running"
+      ;;
+    *)
+      log_failure_msg "$DESC status is unknown"
+      ;;
+  esac
+  return $status
+}
+
+hue_condrestart(){
+  [ -e $LOCKFILE ] && restart || :
+}
+
+check_for_root() {
+  if [ $(id -ur) -ne 0 ]; then
+    echo 'Error: root user required'
+    echo
+    exit 1
+  fi
+}
+
+service() {
+  case "$1" in
+    start)
+      check_for_root
+      hue_start
+      ;;
+    stop)
+      check_for_root
+      hue_stop
+      ;;
+    status)
+      checkstatus
+      ;;
+    restart)
+      check_for_root
+      hue_restart
+      ;;
+    condrestart|try-restart)
+      check_for_root
+      hue_condrestart
+      ;;
+    *)
+      echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart}"
+      exit 1
+  esac
+}
+
+service "$1"
+
+exit $RETVAL

Added: incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/hue.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/hue.spec?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/hue.spec (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/hue.spec Tue Jun 19 17:24:29
2012
@@ -0,0 +1,378 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+##### HUE METAPACKAGE ######
+Name:    hue
+Version: %{hue_version}
+Release: %{hue_release}
+Group: Applications/Engineering
+Summary: The hue metapackage
+License: ASL 2.0
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
+Source0: %{name}-%{hue_base_version}.tar.gz
+Source1: %{name}.init
+Source2: %{name}.init.suse
+Source3: do-component-build
+Source4: install_hue.sh
+URL: http://github.com/cloudera/hue
+Requires: %{name}-common = %{version}-%{release}
+Requires: %{name}-server = %{version}-%{release}
+Requires: %{name}-beeswax = %{version}-%{release}
+
+################ RPM CUSTOMIZATION ##############################
+# Disable automatic Provides generation - otherwise we will claim to provide all of the
+# .so modules that we install inside our private lib directory, which will falsely
+# satisfy dependencies for other RPMs on the target system.
+AutoProv: no
+AutoReqProv: no
+%define _use_internal_dependency_generator 0
+
+# Disable post hooks (brp-repack-jars, etc) that just take forever and sometimes cause issues
+%define __os_install_post \
+    %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
+%{nil}
+%define __jar_repack %{nil}
+%define __prelink_undo_cmd %{nil}
+
+# Disable debuginfo package, since we never need to gdb
+# our own .sos anyway
+%define debug_package %{nil}
+
+# there are some file by-products we don't want to actually package
+%define _unpackaged_files_terminate_build 0
+
+# Init.d directory has different locations dependeing on the OS
+%if  %{!?suse_version:1}0
+%define alternatives_cmd alternatives
+%global initd_dir %{_sysconfdir}/rc.d/init.d
+%else
+%define alternatives_cmd update-alternatives
+%global initd_dir %{_sysconfdir}/rc.d
+%endif
+
+
+############### DESKTOP SPECIFIC CONFIGURATION ##################
+
+# customization of install spots
+%define hue_dir /usr/lib/hue
+%define hadoop_home /usr/lib/hadoop
+%define hadoop_lib %{hadoop_home}/lib
+%define username hue
+
+%define apps_dir %{hue_dir}/apps
+%define about_app_dir %{hue_dir}/apps/about
+%define beeswax_app_dir %{hue_dir}/apps/beeswax
+%define filebrowser_app_dir %{hue_dir}/apps/filebrowser
+%define help_app_dir %{hue_dir}/apps/help
+%define jobbrowser_app_dir %{hue_dir}/apps/jobbrowser
+%define jobsub_app_dir %{hue_dir}/apps/jobsub
+%define proxy_app_dir %{hue_dir}/apps/proxy
+%define shell_app_dir %{hue_dir}/apps/shell
+%define useradmin_app_dir %{hue_dir}/apps/useradmin
+%define etc_hue /etc/hue/conf 
+
+# Path to the HADOOP_HOME to build against - these
+# are not substituted into the build products anywhere!
+%if ! %{?build_hadoop_home:1} %{!?build_hadoop_home:0}
+  %define build_hadoop_home %{hadoop_home}
+%endif
+
+# Post macro for apps
+%define app_post_macro() \
+%post -n %{name}-%1 \
+DO="su --shell=/bin/bash -l %{username} -c" \
+export ROOT=%{hue_dir} \
+export DESKTOP_LOGLEVEL=WARN \
+export DESKTOP_LOG_DIR=/var/log/hue \
+chown -R %{username}:%{username} %{hue_dir}/apps/%1 \
+if [ "$1" != 1 ] ; then \
+  echo %{hue_dir}/apps/%1 >> %{hue_dir}/.re_register \
+fi \
+$DO "%{hue_dir}/build/env/bin/python %{hue_dir}/tools/app_reg/app_reg.py --install %{apps_dir}/%1"
+
+# Preun macro for apps
+%define app_preun_macro() \
+%preun -n %{name}-%1 \
+if [ "$1" = 0 ] ; then \
+  DO="su --shell=/bin/bash -l %{username} -c" \
+  ENV_PYTHON="%{hue_dir}/build/env/bin/python" \
+  export ROOT=%{hue_dir} \
+  export DESKTOP_LOGLEVEL=WARN \
+  export DESKTOP_LOG_DIR=/var/log/hue \
+  if [ -e $ENV_PYTHON ] ; then \
+    $DO "$ENV_PYTHON %{hue_dir}/tools/app_reg/app_reg.py --remove %1" ||: \
+  fi \
+  find %{apps_dir}/%1 -name \*.egg-info -type f -print0 | xargs -0 /bin/rm -fR   \
+fi \
+find %{apps_dir}/%1 -iname \*.py[co] -type f -print0 | xargs -0 /bin/rm -f  
+
+%description
+Hue is a browser-based desktop interface for interacting with Hadoop.
+It supports a file browser, job tracker interface, cluster health monitor, and more.
+
+%clean
+%__rm -rf $RPM_BUILD_ROOT
+
+%prep
+%setup -n %{name}-%{hue_base_version}
+
+########################################
+# Build
+########################################
+%build
+bash -x %{SOURCE3}  
+
+########################################
+# Install
+########################################
+%install
+bash -x %{SOURCE4} --prefix=$RPM_BUILD_ROOT --build-dir=${PWD}
+
+%if  %{?suse_version:1}0
+orig_init_file=$RPM_SOURCE_DIR/%{name}.init.suse
+%else
+orig_init_file=$RPM_SOURCE_DIR/%{name}.init
+%endif
+
+# TODO maybe dont need this line anymore:
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}
+cp $orig_init_file $RPM_BUILD_ROOT/%{initd_dir}/hue
+
+#### PLUGINS ######
+
+%package -n %{name}-common
+Summary: A browser-based desktop interface for Hadoop
+BuildRequires: python-devel, python-setuptools, gcc, gcc-c++
+BuildRequires: libxml2-devel, libxslt-devel, zlib-devel
+BuildRequires: cyrus-sasl-devel
+BuildRequires: openssl
+Group: Applications/Engineering
+Requires: cyrus-sasl-gssapi, libxml2, libxslt, zlib, python, sqlite
+Provides: %{name}-common = %{version}, config(%{name}-common) = %{version}
+
+%if  %{?suse_version:1}0
+BuildRequires: sqlite3-devel, openldap2-devel, libmysqlclient-devel, libopenssl-devel
+# Required for init scripts
+Requires: insserv, python-xml
+%else
+BuildRequires: /sbin/runuser, sqlite-devel, openldap-devel, mysql-devel, openssl-devel
+# Required for init scripts
+Requires: redhat-lsb
+%endif
+
+# Disable automatic Provides generation - otherwise we will claim to provide all of the
+# .so modules that we install inside our private lib directory, which will falsely
+# satisfy dependencies for other RPMs on the target system.
+AutoReqProv: no
+
+%description -n %{name}-common
+Hue is a browser-based desktop interface for interacting with Hadoop.
+It supports a file browser, job tracker interface, cluster health monitor, and more.
+
+########################################
+# Preinstall
+########################################
+%pre -n %{name}-common -p /bin/bash
+getent group %{username} 2>/dev/null >/dev/null || /usr/sbin/groupadd -r %{username}
+getent passwd %{username} 2>&1 > /dev/null || /usr/sbin/useradd -c "Hue" -s /sbin/nologin
-g %{username} -r -d %{hue_dir} %{username} 2> /dev/null || :
+
+
+# If there is an old DB in place, make a backup.
+if [ -e %{hue_dir}/desktop/desktop.db ]; then
+  echo "Backing up previous version of Hue database..."
+  cp -a %{hue_dir}/desktop/desktop.db %{hue_dir}/desktop/desktop.db.rpmsave.$(date +'%Y%m%d.%H%M%S')
+fi
+
+########################################
+# Postinstall
+########################################
+%post -n %{name}-common -p /bin/bash
+
+%{alternatives_cmd} --install %{etc_hue} hue-conf %{etc_hue}.empty 30
+
+cd %{hue_dir}
+DO="su --shell=/bin/bash -l %{username} -c"
+DESKTOP_LOG_DIR=/var/log/hue
+# FIXME: jobbrowser HUE-10
+APPS="about filebrowser help jobsub proxy useradmin shell"
+
+mkdir -p $DESKTOP_LOG_DIR
+chown %{username}:%{username} $DESKTOP_LOG_DIR
+
+# Set permissions
+chown %{username}:%{username} %{hue_dir}/*
+chown %{username}:%{username} %{hue_dir}/apps
+chown -R %{username}:%{username} %{hue_dir}/ext
+chown -R %{username}:%{username} %{hue_dir}/tools
+chown -R %{username}:%{username} %{hue_dir}/desktop
+
+# Force regeneration of the virtual-env
+rm -f %{hue_dir}/build/env/stamp
+
+# Delete all pyc files since they contain the wrong path ()
+find %{hue_dir} -iname \*.py[co]  -exec rm -f {} \;
+
+# Install everything into the virtual environment
+export DESKTOP_LOG_DIR=$DESKTOP_LOG_DIR
+export DESKTOP_LOGLEVEL=WARN
+# TODO: Should this be in /var/log/hue?
+$DO "make desktop" >& %{hue_dir}/build_log.txt
+
+# Upgrading database...
+$DO "build/env/bin/hue syncdb --noinput"
+
+# Register or core apps
+for app in $APPS ; do
+  $DO "build/env/bin/python tools/app_reg/app_reg.py --install apps/$app"
+done
+
+# Delete all pyc files since they contain the wrong path ()
+find %{hue_dir} -iname \*.py[co]  -exec rm -f {} \;
+
+%preun -n %{name}-common -p /bin/bash
+if [ "$1" = 0 ]; then
+        %{alternatives_cmd} --remove hue-conf %{etc_hue}.empty || :
+fi
+
+
+########################################
+# Post-uninstall
+########################################
+%postun -n %{name}-common -p /bin/bash
+
+if [ -d %{hue_dir} ]; then
+  find %{hue_dir} -name \*.py[co] -exec rm -f {} \;
+fi
+
+if [ $1 -eq 0 ]; then
+  # TODO this seems awfully aggressive
+  # NOTE  Despite dependency, hue-common could get removed before the apps are.
+  #       We should remove app.reg because apps won't have a chance to
+  #       unregister themselves.
+  rm -Rf %{hue_dir}/desktop %{hue_dir}/build %{hue_dir}/pids %{hue_dir}/app.reg
+fi
+
+
+%files -n %{name}-common
+%defattr(-,%{username},%{username})
+%attr(0755,root,root) %config(noreplace) %{etc_hue}.empty 
+%dir %{hue_dir}
+%{hue_dir}/desktop
+%{hue_dir}/ext
+%{hue_dir}/LICENSE.txt
+%{hue_dir}/Makefile
+%{hue_dir}/Makefile.buildvars
+%{hue_dir}/Makefile.sdk
+%{hue_dir}/Makefile.vars
+%{hue_dir}/Makefile.vars.priv
+%{hue_dir}/README
+%{hue_dir}/tools
+%{hue_dir}/VERSION
+%attr(0755,%{username},%{username}) %{hue_dir}/build/env/bin/*
+%{hue_dir}/build/env/include/
+%{hue_dir}/build/env/lib*/
+%{hue_dir}/build/env/stamp
+## We exclude app.reg to prevent it getting overwritten,
+##  postinstall should generate this
+%exclude %{hue_dir}/app.reg
+%{hue_dir}/apps/Makefile
+%dir %{hue_dir}/apps
+# Hue core apps
+%{about_app_dir}
+%{filebrowser_app_dir}
+%{help_app_dir}
+# FIXME: HUE-10
+# %{jobbrowser_app_dir}
+%{jobsub_app_dir}
+%{proxy_app_dir}
+%{useradmin_app_dir}
+%{shell_app_dir}
+%attr(4750,root,hue) %{shell_app_dir}/src/shell/build/setuid
+
+%exclude %{beeswax_app_dir}
+
+# %exclude %{hadoop_lib}
+
+############################################################
+# No-arch packages - plugins and conf
+############################################################
+
+#### Service Scripts ######
+%package -n %{name}-server
+Summary: Service Scripts for Hue
+Requires: %{name}-common = %{version}-%{release}
+Requires: /sbin/chkconfig
+Requires(pre): %{name} = %{version}-%{release}
+Group: Applications/Engineering
+
+%description -n %{name}-server
+
+This package provides the service scripts for Hue server.
+
+%files -n %{name}-server
+%attr(0755,root,root) %{initd_dir}/hue
+
+# Install and start init scripts
+
+%post -n %{name}  
+/sbin/chkconfig --add hue
+
+########################################
+# Pre-uninstall
+########################################
+
+%preun  -n %{name}-server 
+if [ $1 = 0 ] ; then 
+        service %{name} stop > /dev/null 2>&1 
+        chkconfig --del %{name} 
+fi 
+%postun  -n %{name}-server
+if [ $1 -ge 1 ]; then 
+        service %{name} condrestart >/dev/null 2>&1 
+fi
+
+#### PLUGINS ######
+# FIXME: Hue plugins don't quite work with Hadoop 2.X
+# %package -n %{name}-plugins
+# Summary: Hadoop plugins for Hue
+# Requires: hadoop, bigtop-utils
+# Group: Applications/Engineering
+# %description -n %{name}-plugins
+# Plugins for Hue
+#
+# This package should be installed on each node in the Hadoop cluster.
+#
+# %files -n %{name}-plugins
+# %{hadoop_lib}/
+
+
+#### HUE-BEESWAX PLUGIN ######
+%package -n %{name}-beeswax
+Summary: A UI for Hive on Hue
+Group: Applications/Engineering
+Requires: %{name}-common = %{version}-%{release}, hive, make
+
+%description -n %{name}-beeswax
+Beeswax is a web interface for Hive.
+
+It allows users to construct and run queries on Hive, manage tables,
+and import and export data.
+
+%app_post_macro beeswax
+%app_preun_macro beeswax
+
+%files -n %{name}-beeswax
+%defattr(-, %{username}, %{username})
+%{beeswax_app_dir}

Added: incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SRPMS/.gitignore
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SRPMS/.gitignore?rev=1351781&view=auto
==============================================================================
    (empty)

Added: incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/pom.xml?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/pom.xml (added)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/pom.xml Tue Jun 19 17:24:29 2012
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.bigtop.itest</groupId>
+    <artifactId>bigtop-smokes</artifactId>
+    <version>0.4.0-incubating-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.bigtop.itest</groupId>
+  <artifactId>hue-smoke</artifactId>
+  <version>0.4.0-incubating-SNAPSHOT</version>
+
+  <name>huesmoke</name>
+
+</project>

Added: incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
(added)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
Tue Jun 19 17:24:29 2012
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bigtop.itest.giraph.smoke
+
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertTrue
+
+import org.apache.bigtop.itest.JarContent
+import org.apache.bigtop.itest.shell.Shell
+import org.junit.Test
+
+public class TestHueSmoke {
+  final static String hueServer = "http://localhost:8888"
+  final static String loginURL = "${hueServer}/accounts/login/";
+  final static String checkURL = "${hueServer}/debug/check_config";
+  final static String creds = "username=admin&password=admin";
+  final static Map checkApps = [ "about"            : "<title>About Hue</title>",
+                                 "filebrowser/view" : "<title>File Browser</title>",
+                                 "help"             : "<title>Hue Help</title>",
+                                 // FIXME: HUE-10 "jobbrowser"       : "<title>Error</title>",
+                                 "jobsub"           : "<title>Job Designer</title>",
+                                 "useradmin"        : "<title>Hue Users</title>",
+                                 "beeswax"          : "<title>Hive Query</title>"
];
+
+  Shell sh = new Shell();
+
+  @Test
+  void testHueCheckConfig() {
+    String sessionId;
+    List<String> failedApps = [];
+
+    // first call creates admin/admin username/keypair
+    sh.exec("curl -m 60 --data '${creds}' ${loginURL}");
+
+    sh.exec("curl -m 60 -i --data '${creds}' ${loginURL} | sed -e 's#Set-Cookie: *##' -e
's#;.*\$##' | grep '^sessionid'");
+    sessionId = sh.getOut().join('');
+
+    sh.exec("curl -m 60 -b '${sessionId}' ${checkURL}");
+    assertTrue("Global configuration check failed",
+               sh.getOut().grep( ~/.*All ok. Configuration check passed.*/ ).size() >
0);
+    checkApps.each { app, expected ->
+      sh.exec("curl -m 60 -b '${sessionId}' ${hueServer}/${app}/");
+      if (sh.getOut().join(' ').indexOf(expected) == -1) {
+        failedApps.add(app);
+      }
+    }
+    assertEquals("Application(s) ${failedApps} failed to respond",
+                 failedApps.size(), 0);
+  }
+}

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data.xml?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data.xml
(original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data.xml
Tue Jun 19 17:24:29 2012
@@ -863,4 +863,60 @@ but all on the same machine.</descriptio
     <hadoop-libhdfs>/self</hadoop-libhdfs>
   </deps>
 </hadoop-hdfs-fuse>
+<hue-common>
+  <metadata>
+    <summary>A browser-based desktop interface for Hadoop</summary>
+    <description>Hue is a browser-based desktop interface for interacting with Hadoop.
+It supports a file browser, job tracker interface, cluster health monitor, and more.</description>
+    <url>http://github.com/cloudera/hue</url>
+  </metadata>
+  <deps>
+    <hue-server>/self</hue-server>
+    <hue-beeswax>/self</hue-beeswax>
+  </deps>
+  <alternatives>
+    <hue-conf>
+      <status>auto</status>
+      <link>/etc/hue/conf</link>
+      <value>/etc/hue/conf.dist</value>
+      <alt>/etc/hue/conf.dist</alt>
+    </hue-conf>
+  </alternatives>
+</hue-common>
+<hue-server>
+  <metadata>
+    <summary>Service Scripts for Hue</summary>
+    <description>This package provides the service scripts for Hue server.</description>
+    <url>http://github.com/cloudera/hue</url>
+  </metadata>
+  <deps>
+    <hue-common>/self</hue-common>
+  </deps>
+</hue-server>
+<hue-beeswax>
+  <metadata>
+    <summary>A UI for Hive on Hue</summary>
+    <description>Beeswax is a web interface for Hive.
+
+It allows users to construct and run queries on Hive, manage tables,
+and import and export data.</description>
+    <url>http://github.com/cloudera/hue</url>
+  </metadata>
+  <deps>
+    <hue-common>/self</hue-common>
+    <hive/>
+    <make/>
+  </deps>
+</hue-beeswax>
+<hue>
+  <metadata>
+    <summary>The hue metapackage</summary>
+    <description>Will install the entire set of hue and its plugins/applications</description>
+    <url>http://github.com/cloudera/hue</url>
+  </metadata>
+  <deps>
+    <hue-server>/self</hue-server>
+    <hue-beeswax>/self</hue-beeswax>
+  </deps>
+</hue>
 </packages>

Modified: incubator/bigtop/trunk/bigtop-tests/test-artifacts/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/pom.xml?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/pom.xml (original)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/pom.xml Tue Jun 19 17:24:29 2012
@@ -42,6 +42,7 @@
     <module>sqoop</module>
     <module>mahout</module>
     <module>giraph</module>
+    <module>hue</module>
   </modules>
 
   <properties>

Added: incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/pom.xml?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/pom.xml (added)
+++ incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/pom.xml Tue Jun 19 17:24:29
2012
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.apache.bigtop.itest</groupId>
+    <artifactId>smoke-tests</artifactId>
+    <version>0.4.0-incubating-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.bigtop.itest</groupId>
+  <artifactId>hue-smoke-execution</artifactId>
+  <version>0.4.0-incubating-SNAPSHOT</version>
+  <name>Giraph smoke test execution</name>
+
+  <properties>
+    <org.apache.maven-dependency-plugin.groupId>org.apache.bigtop.itest</org.apache.maven-dependency-plugin.groupId>
+    <org.apache.maven-dependency-plugin.artifactId>hue-smoke</org.apache.maven-dependency-plugin.artifactId>
+    <org.apache.maven-dependency-plugin.version>${hue-smoke.version}</org.apache.maven-dependency-plugin.version>
+    <org.apache.maven-dependency-plugin.type>jar</org.apache.maven-dependency-plugin.type>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.bigtop.itest</groupId>
+      <artifactId>hue-smoke</artifactId>
+      <version>${hue-smoke.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Modified: incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/pom.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/pom.xml?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/pom.xml (original)
+++ incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/pom.xml Tue Jun 19 17:24:29
2012
@@ -51,6 +51,7 @@
     <mahout-smoke.version>0.4.0-incubating-SNAPSHOT</mahout-smoke.version>
     <oozie-smoke.version>0.4.0-incubating-SNAPSHOT</oozie-smoke.version>
     <giraph-smoke.version>0.4.0-incubating-SNAPSHOT</giraph-smoke.version>
+    <hue-smoke.version>0.4.0-incubating-SNAPSHOT</hue-smoke.version>
     <package-smoke.version>0.4.0-incubating-SNAPSHOT</package-smoke.version>
     <!--
       End of BOM definitions
@@ -73,6 +74,7 @@
     <module>hbase</module>
     <module>mahout</module>
     <module>giraph</module>
+    <module>hue</module>
     -->
   </modules>
 

Modified: incubator/bigtop/trunk/bigtop.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop.mk?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop.mk (original)
+++ incubator/bigtop/trunk/bigtop.mk Tue Jun 19 17:24:29 2012
@@ -171,9 +171,21 @@ GIRAPH_TARBALL_DST=$(GIRAPH_NAME)-$(GIRA
 GIRAPH_TARBALL_SRC=79962a3
 GIRAPH_SITE=https://github.com/apache/giraph/tarball
 GIRAPH_ARCHIVE=$(GIRAPH_SITE)
-
 $(eval $(call PACKAGE,giraph,GIRAPH))
 
+# Hue
+HUE_NAME=hue
+HUE_RELNOTES_NAME=Hadoop User Experience
+HUE_PKG_NAME=hue
+HUE_BASE_VERSION=2.0.1
+HUE_PKG_VERSION=2.0.1
+HUE_RELEASE_VERSION=1
+HUE_TARBALL_DST=hue-$(HUE_BASE_VERSION).tar.gz
+HUE_TARBALL_SRC=hue-$(HUE_BASE_VERSION).tgz
+HUE_SITE=https://github.com/downloads/cloudera/hue
+HUE_ARCHIVE=$(HUE_SITE)
+$(eval $(call PACKAGE,hue,HUE))
+
 # Bigtop-utils
 BIGTOP_UTILS_NAME=bigtop-utils
 BIGTOP_UTILS__RELNOTES_NAME=Bigtop-utils

Modified: incubator/bigtop/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/src/site/xdoc/index.xml?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/src/site/xdoc/index.xml (original)
+++ incubator/bigtop/trunk/src/site/xdoc/index.xml Tue Jun 19 17:24:29 2012
@@ -38,22 +38,58 @@ xsi:schemaLocation="http://maven.apache.
       <li>Apache Forrest 0.8 (requires 32bit version of Java JDK 1.5)</li>
       <li>Apache Ant</li>
       <li>Apache Maven</li>
+      <li>wget</li>
+      <li>tar</li>
       <li>git</li>
       <li>subversion</li>
+      <li>gcc</li>
+      <li>gcc-c++</li>
+      <li>make</li>
+      <li>fuse</li>
+      <li>protobuf-compiler</li>
       <li>autoconf</li>
       <li>automake</li>
-      <li>liblzo2-dev</li>
-      <li>libzip-dev</li>
+      <li>libtool</li>
       <li>sharutils</li>
-      <li>libfuse-dev</li>
-      <li>libssl-dev</li>
       <li>asciidoc</li>
       <li>xmlto</li>
-      <li>libssl-dev</li>
     </ul>
-    <p>On Debian-based systems one also needs</p>
+    <p>On RPM-based systems one also needs</p>
     <ul>
-      <li>build-essential dh-make debhelper devscripts</li>
+      <li>lzo-devel</li>
+      <li>zlib-devel</li>
+      <li>fuse-devel</li>
+      <li>openssl-devel</li>
+      <li>python-devel</li>
+      <li>libxml2-devel</li>
+      <li>libxslt-devel</li>
+      <li>cyrus-sasl-devel</li>
+      <li>sqlite-devel</li>
+      <li>mysql-devel</li>
+      <li>openldap-devel</li>
+      <li>rpm-build</li>
+      <li>createrepo</li>
+      <li>redhat-rpm-config</li>
+    </ul>
+    <p>On DEB-based systems one also needs</p>
+    <ul>
+      <li>libxslt1-dev</li>
+      <li>libkrb5-dev</li>
+      <li>libldap2-dev</li>
+      <li>libmysqlclient-dev</li>
+      <li>libsasl2-dev</li>
+      <li>libsqlite3-dev</li>
+      <li>libxml2-dev</li>
+      <li>python-dev</li>
+      <li>python-setuptools</li>
+      <li>liblzo2-dev</li>
+      <li>libzip-dev</li>
+      <li>libfuse-dev</li>
+      <li>libssl-dev</li>
+      <li>build-essential</li>
+      <li>dh-make</li>
+      <li>debhelper</li> 
+      <li>devscripts</li>
       <li>reprepro</li>
     </ul>
     <subsection name="Disclaimer"></subsection>



Mime
View raw message