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 [1/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
Author: rvs
Date: Tue Jun 19 17:24:29 2012
New Revision: 1351781

URL: http://svn.apache.org/viewvc?rev=1351781&view=rev
Log:
BIGTOP-527. Integrate Hue 2.0.0 into Bigtop

Added:
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/init.pp
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/hue.ini
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/
    incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/init.pp
    incubator/bigtop/trunk/bigtop-packages/src/common/hue/
    incubator/bigtop/trunk/bigtop-packages/src/common/hue/do-component-build
    incubator/bigtop/trunk/bigtop-packages/src/common/hue/install_hue.sh
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/changelog
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/compat
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/control
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/copyright
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/docs
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.postinst.tpl
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.prerm.tpl
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-beeswax.install
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.install
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postrm
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.preinst
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.prerm
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.hue.init
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.prerm
    incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules   (with props)
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/BUILD/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/BUILD/.gitignore
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/RPMS/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/RPMS/.gitignore
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/.gitignore
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init.suse
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SPECS/hue.spec
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SRPMS/
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SRPMS/.gitignore
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/pom.xml
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
    incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/
    incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/hue/pom.xml
Modified:
    incubator/bigtop/trunk/bigtop-deploy/puppet/manifests/cluster.pp
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/install_hadoop.sh
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/package/src/main/resources/package_data.xml
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/pom.xml
    incubator/bigtop/trunk/bigtop-tests/test-execution/smokes/pom.xml
    incubator/bigtop/trunk/bigtop.mk
    incubator/bigtop/trunk/src/site/xdoc/index.xml

Modified: incubator/bigtop/trunk/bigtop-deploy/puppet/manifests/cluster.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-deploy/puppet/manifests/cluster.pp?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-deploy/puppet/manifests/cluster.pp (original)
+++ incubator/bigtop/trunk/bigtop-deploy/puppet/manifests/cluster.pp Tue Jun 19 17:24:29 2012
@@ -72,6 +72,9 @@ class hadoop_cluster_node {
 
   $hadoop_zookeeper_ensemble = ["$hadoop_head_node:2888:3888"]
 
+  $hadoop_oozie_url  = "http://${hadoop_head_node}:11000/oozie"
+  $hadoop_httpfs_url = "http://${hadoop_head_node}:14000/webhdfs/v1"
+
   # Set from facter if available
   $roots              = extlookup("hadoop_storage_dirs",       split($hadoop_storage_dirs, ";"))
   $namenode_data_dirs = extlookup("hadoop_namenode_data_dirs", append_each("/namenode", $roots))
@@ -181,6 +184,14 @@ class hadoop_head_node inherits hadoop_c
         kerberos_realm => $kerberos_realm, 
   }
 
+  hue::server { "hue server":
+        webhdfs_url => $hadoop_httpfs_url,
+        rm_host     => $hadoop_rm_host,
+        rm_port     => $hadoop_rm_port,
+        oozie_url   => $hadoop_oozie_url,
+        kerberos_realm => $kerberos_realm,
+  }
+
   hadoop-zookeeper::server { "zookeeper":
         myid => "0",
         ensemble => $hadoop_zookeeper_ensemble,

Added: incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/init.pp?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/init.pp (added)
+++ incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/manifests/init.pp Tue Jun 19 17:24:29 2012
@@ -0,0 +1,46 @@
+# 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.
+
+class hue {
+  define server($webhdfs_url, $rm_host, $rm_port, $oozie_url,
+                $hue_host = "0.0.0.0", $hue_port = "8888", $default_fs = "hdfs://localhost:8020",
+                $kerberos_realm = "") {
+    if ($kerberos_realm) {
+      require kerberos::client
+      kerberos::host_keytab { "hue":
+        spnego => false,
+      }
+    }
+
+    package { "hue":
+      ensure => latest,
+    }
+
+    file { "/etc/hue/conf/hue.ini":
+      content => template("hue/hue.ini"),
+      require => Package["hue"],
+    }
+
+    service { "hue":
+      ensure => running,
+      require => [ Package["hue"], File["/etc/hue/conf/hue.ini"] ],
+      subscribe => [Package["hue"], File["/etc/hue/conf/hue.ini"] ],
+      hasrestart => true,
+      hasstatus => true,
+    } 
+    Kerberos::Host_keytab <| title == "hue" |> -> Service["hue"]
+
+  }
+}

Added: incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/hue.ini
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/hue.ini?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/hue.ini (added)
+++ incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/templates/hue.ini Tue Jun 19 17:24:29 2012
@@ -0,0 +1,389 @@
+# 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 configuration file
+# ===================================
+#
+# For complete documentation about the contents of this file, run
+# 	$ <hue_root>/build/env/bin/hue config_help
+#
+# All .ini files under the current directory are treated equally.  Their
+# contents are merged to form the Hue configuration, which can
+# can be viewed on the Hue at
+# 	http://<hue_host>:<port>/dump_config
+
+
+###########################################################################
+# General configuration for core Desktop features (authentication, etc)
+###########################################################################
+
+[desktop]
+
+  # Set this to a random string, the longer the better.
+  # This is used for secure hashing in the session store.
+  secret_key=deaddeafdeaddeafdeaddeafdeaddeafdeaddeafdeaddeafdeaddeaf
+
+  # Webserver listens on this address and port
+  http_host=<%= hue_host %>
+  http_port=<%= hue_port %>
+
+  # Time zone name
+  time_zone=America/Los_Angeles
+
+  # Turn off debug
+  django_debug_mode=0
+
+  # Turn off backtrace for server error
+  http_500_debug_mode=0
+
+  # Set to true to use CherryPy as the webserver, set to false
+  # to use Spawning as the webserver. Defaults to Spawning if
+  # key is not specified.
+  ## use_cherrypy_server = false
+
+  # Webserver runs as this user
+  server_user=hue
+  server_group=hue
+
+  # If set to false, runcpserver will not actually start the web server.
+  # Used if Apache is being used as a WSGI container.
+  ## enable_server=yes
+
+  # Number of threads used by the CherryPy web server
+  ## cherrypy_server_threads=10
+
+  # Filename of SSL Certificate
+  ## ssl_certificate=
+
+  # Filename of SSL RSA Private Key
+  ## ssl_private_key=
+
+  # Default encoding for site data
+  ## default_site_encoding=utf-8
+
+  # Configuration options for user authentication into the web application
+  # ------------------------------------------------------------------------
+  [[auth]]
+
+    # Authentication backend. Common settings are:
+    # - django.contrib.auth.backends.ModelBackend (entirely Django backend)
+    # - desktop.auth.backend.AllowAllBackend (allows everyone)
+    # - desktop.auth.backend.AllowFirstUserDjangoBackend
+    #     (Default. Relies on Django and user manager, after the first login)
+
+  # Configuration options for connecting to LDAP and Active Directory
+  # -------------------------------------------------------------------
+  [[ldap]]
+
+  # The search base for finding users and groups
+  ## base_dn="DC=mycompany,DC=com"
+
+  # The NT domain to connect to (only for use with Active Directory)
+  ## nt_domain=mycompany.com
+
+  # URL of the LDAP server
+  ## ldap_url=ldap://auth.mycompany.com
+
+  # Path to certificate for authentication over TLS
+  ## ldap_cert=
+
+  # Distinguished name of the user to bind as -- not necessary if the LDAP server
+  # supports anonymous searches
+  ## bind_dn="CN=ServiceAccount,DC=mycompany,DC=com"
+
+  # Password of the bind user -- not necessary if the LDAP server supports
+  # anonymous searches
+  ## bind_password=
+
+  # Pattern for searching for usernames -- Use <username> for the parameter
+  # For use when using LdapBackend for Hue authentication
+  ## ldap_username_pattern="uid=<username>,ou=People,dc=mycompany,dc=com"
+
+      [[[users]]]
+
+      # Base filter for searching for users
+      ## user_filter="objectclass=*"
+
+      # The username attribute in the LDAP schema
+      ## user_name_attr=sAMAccountName
+
+      [[[groups]]]
+
+      # Base filter for searching for groups
+      ## group_filter="objectclass=*"
+
+      # The group name attribute in the LDAP schema
+      ## group_name_attr=cn
+
+      # The attribute of the group object which identifies the members of the group
+      ## group_member_attr=members
+
+  # Configuration options for specifying the Desktop Database.  For more info,
+  # see http://docs.djangoproject.com/en/1.1/ref/settings/#database-engine
+  # ------------------------------------------------------------------------
+  [[database]]
+    # Database engine is typically one of:
+    # postgresql, mysql, sqlite3, or oracle
+    #
+    # Note that for sqlite3, 'name', below is a filename;
+    # for other backends, it is the database name.
+    ## engine=sqlite3
+    ## host=
+    ## port=
+    ## user=
+    ## password=
+    ## name=
+
+
+  # Configuration options for connecting to an external SMTP server
+  # ------------------------------------------------------------------------
+  [[smtp]]
+
+    # The SMTP server information for email notification delivery
+    host=localhost
+    port=25
+    user=
+    password=
+
+    # Whether to use a TLS (secure) connection when talking to the SMTP server
+    tls=no
+
+    # Default email address to use for various automated notification from Hue  
+    ## default_from_email=hue@localhost
+
+
+<% if kerberos_realm != "" %>
+  # Configuration options for Kerberos integration for secured Hadoop clusters
+  # ------------------------------------------------------------------------
+  [[kerberos]]
+    # Path to Hue's Kerberos keytab file
+    hue_keytab=/etc/hue.keytab
+    # Kerberos principal name for Hue
+    hue_principal=hue/<%= fqdn %>
+    # Path to kinit
+    ## kinit_path=/path/to/kinit
+<% end %>
+
+
+###########################################################################
+# Settings to configure your Hadoop cluster.
+###########################################################################
+
+[hadoop]
+
+  # Configuration for HDFS NameNode
+  # ------------------------------------------------------------------------
+  [[hdfs_clusters]]
+
+    [[[default]]]
+      # Enter the filesystem uri
+      fs_defaultfs=<%= default_fs %>
+
+      # Change this if your HDFS cluster is Kerberos-secured
+      security_enabled=<%= if (kerberos_realm != "") ; "true" else "false" end %>
+
+      # Use WebHdfs/HttpFs as the communication mechanism.
+      # This should be the web service root URL, such as
+      # http://namenode:50070/webhdfs/v1
+      webhdfs_url=<%= webhdfs_url %>
+
+      # Settings about this HDFS cluster. If you install HDFS in a
+      # different location, you need to set the following.
+
+      # Defaults to $HADOOP_HDFS_HOME or /usr/lib/hadoop-hdfs
+      ## hadoop_hdfs_home=/usr/lib/hadoop-hdfs
+
+      # Defaults to $HADOOP_BIN or /usr/bin/hadoop
+      ## hadoop_bin=/usr/bin/hadoop
+
+      # Defaults to $HADOOP_CONF_DIR or /etc/hadoop/conf
+      ## hadoop_conf_dir=/etc/hadoop/conf
+
+  # FIXME: HUE-10 Configuration for MapReduce 0.20 JobTracker (MR1)
+  # ------------------------------------------------------------------------
+  #[[mapred_clusters]]
+  #
+  #  [[[default]]]
+  #    # Enter the host on which you are running the Hadoop JobTracker
+  #    jobtracker_host=localhost
+  #    # The port where the JobTracker IPC listens on
+  #    jobtracker_port=8021
+  #    # Thrift plug-in port for the JobTracker
+  #    ## thrift_port=9290
+  #    # Whether to submit jobs to this cluster
+  #    ## submit_to=True
+  #
+  #    # Change this if your MapReduce cluster is Kerberos-secured
+  #    ## security_enabled=false
+  #
+  #    # Settings about this MR1 cluster. If you install MR1 in a
+  #    # different location, you need to set the following.
+  #
+  #    # Defaults to $HADOOP_MR1_HOME or /usr/lib/hadoop-0.20-mapreduce
+  #    hadoop_mapred_home=/usr/lib/hadoop-mapreduce
+  #
+  #    # Defaults to $HADOOP_BIN or /usr/bin/hadoop
+  #    ## hadoop_bin=/usr/bin/hadoop
+  #
+  #    # Defaults to $HADOOP_CONF_DIR or /etc/hadoop/conf
+  #    ## hadoop_conf_dir=/etc/hadoop/conf
+
+  # Configuration for YARN (MR2)
+  # ------------------------------------------------------------------------
+  [[yarn_clusters]]
+
+    [[[default]]]
+      # Enter the host on which you are running the ResourceManager
+      resourcemanager_host=localhost
+      # The port where the ResourceManager IPC listens on
+      resourcemanager_port=8032
+      # Whether to submit jobs to this cluster
+      submit_to=true
+
+      # Change this if your YARN cluster is Kerberos-secured
+      security_enabled=<%= if (kerberos_realm != "") ; "true" else "false" end %>
+
+      # Settings about this MR2 cluster. If you install MR2 in a
+      # different location, you need to set the following.
+
+      # Defaults to $HADOOP_MR2_HOME or /usr/lib/hadoop-mapreduce
+      hadoop_mapred_home=/usr/lib/hadoop-mapreduce
+
+      # Defaults to $HADOOP_BIN or /usr/bin/hadoop
+      ## hadoop_bin=/usr/bin/hadoop
+
+      # Defaults to $HADOOP_CONF_DIR or /etc/hadoop/conf
+      ## hadoop_conf_dir=/etc/hadoop/conf
+
+
+###########################################################################
+# Settings to configure Beeswax
+###########################################################################
+
+[beeswax]
+  # Configure the port the internal metastore daemon runs on. Used only if
+  # hive.metastore.local is true.
+  ## beeswax_meta_server_port=8003
+
+  # Configure the port the beeswax thrift server runs on
+  ## beeswax_server_port=8002
+
+  # Hive home directory
+  ## hive_home_dir=/usr/lib/hive
+
+  # Hive configuration directory, where hive-site.xml is located
+  ## hive_conf_dir=/etc/hive/conf
+
+  # Timeout in seconds for thrift calls to beeswax service
+  ## beeswax_server_conn_timeout=120
+
+  # Timeout in seconds for thrift calls to the hive metastore
+  ## metastore_conn_timeout=10
+
+  # Maximum Java heapsize (in megabytes) used by Beeswax Server.
+  # Note that the setting of HADOOP_HEAPSIZE in $HADOOP_CONF_DIR/hadoop-env.sh
+  # may override this setting.
+  ## beeswax_server_heapsize=1000
+
+  # Share saved queries with all users. If set to false, saved queries are
+  # visible only to the owner and administrators.
+  ## share_saved_queries=true
+
+
+###########################################################################
+# Settings to configure Job Designer
+###########################################################################
+
+[jobsub]
+  # The URL where the Oozie service runs on. This is required in order for
+  # users to submit jobs.
+  oozie_url=<%= oozie_url %>
+
+  security_enabled=<%= if (kerberos_realm != "") ; "true" else "false" end %>
+
+###########################################################################
+# Settings to configure Job Browser.
+###########################################################################
+
+[jobbrowser]
+  # Share submitted jobs information with all users. If set to false,
+  # submitted jobs are visible only to the owner and administrators.
+  ## share_jobs=true
+
+
+###########################################################################
+# Settings to configure the Shell application
+###########################################################################
+
+[shell]
+  # The shell_buffer_amount specifies the number of bytes of output per shell
+  # that the Shell app will keep in memory. If not specified, it defaults to
+  # 524288 (512 MiB).
+  ## shell_buffer_amount=100
+
+  # If you run Hue against a Hadoop cluster with Kerberos security enabled, the
+  # Shell app needs to acquire delegation tokens for the subprocesses to work
+  # correctly. These delegation tokens are stored as temporary files in some
+  # directory. You can configure this directory here. If not specified, it
+  # defaults to /tmp/hue_delegation_tokens.
+  ## shell_delegation_token_dir=/tmp/hue_delegation_tokens
+
+  [[ shelltypes ]]
+
+    # Define and configure a new shell type "flume"
+    # ------------------------------------------------------------------------
+    [[[ flume ]]]
+      nice_name = "Flume Shell"
+      command = "/usr/bin/flume shell"
+      help = "The command-line Flume client interface."
+
+      [[[[ environment ]]]]
+	# You can specify environment variables for the Flume shell
+	# in this section.
+
+    # Define and configure a new shell type "pig"
+    # ------------------------------------------------------------------------
+    [[[ pig ]]]
+      nice_name = "Pig Shell (Grunt)"
+      command = "/usr/bin/pig -l /dev/null"
+      help = "The command-line interpreter for Pig"
+
+      [[[[ environment ]]]]
+	# You can specify environment variables for the Pig shell
+	# in this section. Note that JAVA_HOME must be configured
+	# for the Pig shell to run.
+
+	[[[[[ JAVA_HOME ]]]]]
+	  value = "/usr/lib/jvm/java-6-sun"
+
+    # Define and configure a new shell type "hbase"
+    # ------------------------------------------------------------------------
+    [[[ hbase ]]]
+      nice_name = "HBase Shell"
+      command = "/usr/bin/hbase shell"
+      help = "The command-line HBase client interface."
+
+      [[[[ environment ]]]]
+	# You can configure environment variables for the HBase shell
+	# in this section.
+
+
+###########################################################################
+# Settings for the User Admin application
+###########################################################################
+
+[useradmin]
+  # The name of the default user group that users will be a member of
+  ## default_user_group=default_group

Added: incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/init.pp
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/init.pp?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/init.pp (added)
+++ incubator/bigtop/trunk/bigtop-deploy/puppet/modules/hue/tests/init.pp Tue Jun 19 17:24:29 2012
@@ -0,0 +1,21 @@
+# 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::server { "test-hue-server": 
+  webhdfs_url => "http://localhost:14000/webhdfs/v1",
+  rm_host     => "localhost",
+  rm_port     => "8032",
+  oozie_url   => "http://localhost:11000/oozie",
+}

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/install_hadoop.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/install_hadoop.sh?rev=1351781&r1=1351780&r2=1351781&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/install_hadoop.sh (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/install_hadoop.sh Tue Jun 19 17:24:29 2012
@@ -321,6 +321,16 @@ chmod 644 ${HTTPFS_DIR}/conf/*
 install -d -m 0755 $HTTPFS_ETC_DIR/conf.empty
 mv $HADOOP_ETC_DIR/conf.empty/httpfs* $HTTPFS_ETC_DIR/conf.empty
 sed -i -e '/<\/configuration>/i\
+  <!-- HUE proxy user setting -->\
+  <property>\
+    <name>httpfs.proxyuser.hue.hosts</name>\
+    <value>*</value>\
+  </property>\
+  <property>\
+    <name>httpfs.proxyuser.hue.groups</name>\
+    <value>*</value>\
+  </property>\
+\
   <property>\
     <name>httpfs.hadoop.config.dir</name>\
     <value>/etc/hadoop/conf</value>\

Added: incubator/bigtop/trunk/bigtop-packages/src/common/hue/do-component-build
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hue/do-component-build?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hue/do-component-build (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hue/do-component-build Tue Jun 19 17:24:29 2012
@@ -0,0 +1,21 @@
+#!/bin/sh
+# 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.
+
+set -ex
+
+mvn -f maven/pom.xml clean install "$@"
+
+make apps

Added: incubator/bigtop/trunk/bigtop-packages/src/common/hue/install_hue.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hue/install_hue.sh?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hue/install_hue.sh (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hue/install_hue.sh Tue Jun 19 17:24:29 2012
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+# 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.
+
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to Hue dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into [/usr/share/doc/hue]
+     --lib-dir=DIR               path to install Hue home [/usr/lib/hue]
+     --installed-lib-dir=DIR     path where lib-dir will end up on target system
+     --bin-dir=DIR               path to install bins [/usr/bin]
+     ... [ see source for more similar options ]
+  "
+  exit 1
+}
+
+OPTS=$(getopt \
+  -n $0 \
+  -o '' \
+  -l 'prefix:' \
+  -l 'doc-dir:' \
+  -l 'lib-dir:' \
+  -l 'installed-lib-dir:' \
+  -l 'bin-dir:' \
+  -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+    usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+    case "$1" in
+        --prefix)
+        PREFIX=$2 ; shift 2
+        ;;
+        --build-dir)
+        BUILD_DIR=$2 ; shift 2
+        ;;
+        --doc-dir)
+        DOC_DIR=$2 ; shift 2
+        ;;
+        --lib-dir)
+        LIB_DIR=$2 ; shift 2
+        ;;
+        --installed-lib-dir)
+        INSTALLED_LIB_DIR=$2 ; shift 2
+        ;;
+        --bin-dir)
+        BIN_DIR=$2 ; shift 2
+        ;;
+        --)
+        shift ; break
+        ;;
+        *)
+        echo "Unknown option: $1"
+        usage
+        exit 1
+        ;;
+    esac
+done
+
+for var in PREFIX BUILD_DIR ; do
+  if [ -z "$(eval "echo \$$var")" ]; then
+    echo Missing param: $var
+    usage
+  fi
+done
+
+PREFIX=`echo $PREFIX | sed -e 's#/*$##'`
+BUILD_DIR=`echo $BUILD_DIR | sed -e 's#/*$##'`
+
+CONF_DIR=${CONF_DIR:-/etc/hue}
+LIB_DIR=${LIB_DIR:-/usr/lib/hue}
+HADOOP_DIR=${HADOOP_DIR:-/usr/lib/hadoop/lib}
+
+BUNDLED_BUILD_DIR=$PREFIX/$LIB_DIR/build
+
+# Install all the files 
+(cd $BUILD_DIR ; PREFIX=`dirname $PREFIX/$LIB_DIR` make install)
+
+# Install conf files
+install -d -m 0755 $PREFIX/$CONF_DIR
+mv -f $PREFIX/$LIB_DIR/desktop/conf $PREFIX/${CONF_DIR}/conf.empty
+ln -fs $CONF_DIR/conf $PREFIX/$LIB_DIR/desktop/conf
+
+# Install plugins
+install -d -m 0755 $PREFIX/$HADOOP_DIR
+ln -fs $LIB_DIR/desktop/libs/hadoop/java-lib/*plugin*jar $PREFIX/$HADOOP_DIR
+
+# Hue Shell specific
+install -d -m 0755 $PREFIX/$LIB_DIR/apps/shell/src/shell/build/
+cp -f $BUILD_DIR/apps/shell/src/shell/build/setuid $PREFIX/$LIB_DIR/apps/shell/src/shell/build
+
+# Remove Hue database
+rm -f $PREFIX/$LIB_DIR/desktop/desktop.db
+
+# Preparing filtering command
+SED_FILT="-e s|$PREFIX|| -e s|$BUILD_DIR|$LIB_DIR|"
+
+# Fix broken symlinks
+for sm in $BUNDLED_BUILD_DIR/env/lib*; do
+  if [ -h ${sm} ] ; then
+    SM_ORIG_DEST_FILE=`ls -l "${sm}" | sed -e 's/.*-> //' `
+    SM_DEST_FILE=`echo $SM_ORIG_DEST_FILE | sed $SED_FILT`
+
+    rm ${sm}
+    ln -s ${SM_DEST_FILE} ${sm}
+  fi
+done
+
+# Fix broken python scripts
+HUE_BIN_SCRIPTS=$BUNDLED_BUILD_DIR/env/bin/*
+HUE_EGG_SCRIPTS=$BUNDLED_BUILD_DIR/env/lib*/python*/site-packages/*/EGG-INFO/scripts/*
+for file in $HUE_BIN_SCRIPTS $HUE_EGG_SCRIPTS;
+do
+  if [ -f ${file} ]
+  then
+    sed -i $SED_FILT ${file}
+  fi
+done
+
+# Make binary scripts executables
+chmod 755 $BUNDLED_BUILD_DIR/env/bin/*
+
+# Remove bogus files
+rm -fv `find $PREFIX -iname "build_log.txt"`
+
+ALL_PTH_BORKED=`find $PREFIX -iname "*.pth"`
+ALL_REG_BORKED=`find $PREFIX -iname "app.reg"`
+ALL_PYTHON_BORKED=`find $PREFIX -iname "*.egg-link"`
+for file in $ALL_PTH_BORKED $ALL_REG_BORKED $ALL_PYTHON_BORKED;
+do
+  sed -i $SED_FILT ${file}
+done

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/changelog
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/changelog?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/changelog (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/changelog Tue Jun 19 17:24:29 2012
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/compat
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/compat?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/compat (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/compat Tue Jun 19 17:24:29 2012
@@ -0,0 +1 @@
+7

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/control
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/control?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/control (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/control Tue Jun 19 17:24:29 2012
@@ -0,0 +1,59 @@
+# 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.
+
+Source: hue
+Section: misc
+Priority: extra
+Maintainer: Apache Bigtopr <bigtop-dev@incubator.apache.org>
+Build-Depends: debhelper (>= 7), ant, python2.4-dev | python2.5-dev | python2.6-dev | python2.7-dev, libxml2-dev, libxslt1-dev, zlib1g-dev, libsqlite3-dev, libldap2-dev, libsasl2-dev, libmysqlclient-dev, make, python-setuptools
+Depends: libsasl2, libsqlite3, zlib1g, libxslt1, libxml2Standards-Version: 3.8.0
+Homepage: http://github.com/cloudera/hue
+
+Package: hue-common
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${build:SYS-PYTHON}, libsasl2-modules-gssapi-mit, libxslt1.1, make
+Description: A browser-based desktop interface for Hadoop
+ Hue is a browser-based desktop interface for interacting with Hadoop.
+ It supports a file browser, job tracker interface, cluster health monitor, and more.
+
+# FIXME: Hue plugins don't yet quite work with Hadoop 2.X
+#Package: hue-plugins
+#Architecture: all
+#Depends: hadoop, bigtop-utils
+#Description: Plug-ins for Hadoop to enable integration with Hue
+# These plug-ins enable the Hadoop Daemons to communicate with Hue.
+# This package must be installed on every node in the Hadoop cluster.
+
+Package: hue
+Architecture: all
+Depends: hue-common (= ${source:Version}), hue-server (= ${source:Version}), hue-beeswax (= ${source:Version})
+Description: The hue metapackage
+ .
+
+Package: hue-server
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, hue-common (= ${source:Version})
+Description: The server scripts for Hue.
+ This only has the initscript.
+
+Package: hue-beeswax
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.4), python (<< 3), make (>= 3.8), hue-common (= ${source:Version}), hive
+Description: A UI for Hive on Hue
+ Beeswax is a web interface for Hive.
+ .
+ It allows users to construct and run queries on Hive, manage tables,
+ and import and export data.
+

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/copyright
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/copyright?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/copyright (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/copyright Tue Jun 19 17:24:29 2012
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/docs
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/docs?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/docs (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/docs Tue Jun 19 17:24:29 2012
@@ -0,0 +1 @@
+README

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.postinst.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.postinst.tpl?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.postinst.tpl (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.postinst.tpl Tue Jun 19 17:24:29 2012
@@ -0,0 +1,61 @@
+#!/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.
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+APP=@APP@
+USER=hue
+DO="su $USER -s /bin/bash -c"
+export ROOT=/usr/lib/hue
+APP_DIR=$ROOT/apps/$APP
+export DESKTOP_LOGLEVEL=WARN
+export DESKTOP_LOG_DIR=/var/log/hue
+
+case "$1" in
+    configure)
+        chown -R ${USER}:${USER} $APP_DIR
+        $DO "cd $ROOT; $ROOT/build/env/bin/python $ROOT/tools/app_reg/app_reg.py --remove $APP" ||:
+        $DO "cd $ROOT; $ROOT/build/env/bin/python $ROOT/tools/app_reg/app_reg.py --install $APP_DIR"
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.prerm.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.prerm.tpl?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.prerm.tpl (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-app.prerm.tpl Tue Jun 19 17:24:29 2012
@@ -0,0 +1,64 @@
+#!/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.
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+APP=@APP@
+USER=hue
+DO="su $USER -s /bin/bash -c"
+export ROOT=/usr/lib/hue
+APP_DIR=$ROOT/apps/$APP
+export DESKTOP_LOGLEVEL=WARN
+export DESKTOP_LOG_DIR=/var/log/hue
+env_python="$ROOT/build/env/bin/python"
+app_reg="$ROOT/tools/app_reg/app_reg.py"
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        if test -e $app_reg -a -e $env_python ; then
+	    $DO "$env_python $app_reg --remove $APP" ||:
+        fi
+        find $APP_DIR -name \*.py[co] -exec rm -f {} \; ||:
+        find $APP_DIR -name \*.egg-info -prune -exec rm -Rf {} \; ||:
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-beeswax.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-beeswax.install?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-beeswax.install (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-beeswax.install Tue Jun 19 17:24:29 2012
@@ -0,0 +1 @@
+/usr/lib/hue/apps/beeswax

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.install?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.install (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.install Tue Jun 19 17:24:29 2012
@@ -0,0 +1,26 @@
+/etc/hue/conf.empty
+/usr/lib/hue/desktop
+/usr/lib/hue/ext
+/usr/lib/hue/LICENSE.txt
+/usr/lib/hue/Makefile
+/usr/lib/hue/Makefile.buildvars
+/usr/lib/hue/Makefile.sdk
+/usr/lib/hue/Makefile.vars
+/usr/lib/hue/Makefile.vars.priv
+/usr/lib/hue/README
+/usr/lib/hue/tools
+/usr/lib/hue/VERSION
+/usr/lib/hue/build/env/bin/*
+/usr/lib/hue/build/env/include/
+/usr/lib/hue/build/env/lib*/
+/usr/lib/hue/build/env/stamp
+/usr/lib/hue/apps/Makefile
+/usr/lib/hue/apps/about
+/usr/lib/hue/apps/filebrowser
+/usr/lib/hue/apps/help
+# FIXME: HUE-10
+# /usr/lib/hue/apps/jobbrowser
+/usr/lib/hue/apps/jobsub
+/usr/lib/hue/apps/proxy
+/usr/lib/hue/apps/shell
+/usr/lib/hue/apps/useradmin

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postinst?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postinst (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postinst Tue Jun 19 17:24:29 2012
@@ -0,0 +1,113 @@
+#!/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.
+
+# postinst script for Hue
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+USER=hue
+DO="su $USER -s /bin/bash -c"
+# FIXME: jobbrowser HUE-10
+APPS="about filebrowser help jobsub proxy useradmin shell"
+
+# We dont want ugly printouts of status during
+# install, etc
+export DESKTOP_LOGLEVEL=WARN
+export DESKTOP_LOG_DIR=/var/log/hue
+export ROOT=/usr/lib/hue
+
+mkdir -p $DESKTOP_LOG_DIR
+touch $DESKTOP_LOG_DIR/access.log
+touch $DESKTOP_LOG_DIR/error.log
+touch $DESKTOP_LOG_DIR/kt_renewer.log
+touch $DESKTOP_LOG_DIR/kt_renewer.out
+touch $DESKTOP_LOG_DIR/runcpserver.log
+touch $DESKTOP_LOG_DIR/runcpserver.out
+touch $DESKTOP_LOG_DIR/shell_input.log
+touch $DESKTOP_LOG_DIR/shell_output.log
+touch $DESKTOP_LOG_DIR/supervisor.log
+touch $DESKTOP_LOG_DIR/supervisor.out
+chown -R $USER:$USER $DESKTOP_LOG_DIR
+
+case "$1" in
+    configure)
+        # Install config alternatives
+        update-alternatives  --install /etc/hue/conf hue-conf /etc/hue/conf.empty 30
+
+        chown $USER $ROOT
+        cd $ROOT
+        chown $USER *
+        chown -R $USER apps
+        chown -R $USER build
+        chown -R $USER ext
+        chown -R $USER tools
+        chown -R $USER desktop
+        rm -f .installed.cfg build/env/stamp
+        find . -name \*.pyc -exec rm {} \;
+        $DO "make desktop" 2>&1 > /dev/null
+        # If we're upgrading, copy their backed up db from the old version
+        # and syncdb.
+        if [ ! -z "$2" ]; then
+                OLD_DB=/usr/share/hue/desktop/desktop.db.bak.$2
+                if [ -e $OLD_DB ]; then
+                        echo Upgrading old database...
+                        cp $OLD_DB /usr/share/hue/desktop/desktop.db
+                fi
+        fi
+        $DO "./build/env/bin/hue syncdb --noinput"
+
+
+        for app in $APPS ; do
+          APP_DIR=$ROOT/apps/$app
+          chown -R hue:hue $APP_DIR
+          $DO "cd $ROOT; $ROOT/build/env/bin/python $ROOT/tools/app_reg/app_reg.py --install $APP_DIR"
+        done
+
+        # Take care of hue-shell setuid binary
+        chown root:hue $APP_DIR/src/shell/build/setuid
+        chmod 4750 $APP_DIR/src/shell/build/setuid
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postrm
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postrm?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postrm (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.postrm Tue Jun 19 17:24:29 2012
@@ -0,0 +1,56 @@
+#!/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.
+
+# postrm script for Hue
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        if [ -d /usr/lib/hue ] ; then
+                find /usr/lib/hue -name \*.py[co] -exec rm -f {} \;
+        fi
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.preinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.preinst?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.preinst (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.preinst Tue Jun 19 17:24:29 2012
@@ -0,0 +1,72 @@
+#!/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.
+
+# preinst script for hue
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+USER=hue
+case "$1" in
+    install|upgrade)
+        if ! getent passwd $USER >/dev/null; then
+                adduser \
+                  --system \
+                  --disabled-login \
+                  --group \
+                  --home /usr/lib/hue \
+                  --gecos "Hue daemon" \
+                  $USER >/dev/null
+        fi
+
+        # In upgrade, make a copy of the database, if it's there.
+        if [ "$1" == "upgrade" ] ; then
+                echo "... stopping any running Hue"
+                /etc/init.d/hue stop || :
+                OLD_DESKTOP_DB=/usr/share/hue/desktop/desktop.db
+                if [ -e $OLD_DESKTOP_DB ]; then
+                        echo ... backing up $OLD_DESKTOP_DB as ${OLD_DESKTOP_DB}.bak.$2
+                        cp -a $OLD_DESKTOP_DB ${OLD_DESKTOP_DB}.bak.$2
+                fi
+        fi
+
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.prerm
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.prerm?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.prerm (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-common.prerm Tue Jun 19 17:24:29 2012
@@ -0,0 +1,61 @@
+#!/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.
+
+# prerm script for Hue
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        update-alternatives --remove hue-conf /etc/hue/conf.empty || :
+        if [ -d /usr/lib/hue ]; then
+          cd /usr/lib/hue
+          find . -name \*.py[co] -exec rm -f {} \;
+        fi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.hue.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.hue.init?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.hue.init (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.hue.init Tue Jun 19 17:24:29 2012
@@ -0,0 +1,259 @@
+#!/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.
+
+
+### BEGIN INIT INFO
+# Provides:          hue
+# Required-Start:    $network $local_fs
+# Required-Stop:
+# Should-Start:      $named
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Hue
+# Description:       Hue Web Interface
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+DAEMON=/usr/lib/hue/build/env/bin/supervisor # Introduce the server's location here
+NAME=hue              			# Introduce the short server's name here
+DESC="Hue for Hadoop"                	# Introduce a short description here
+LOGDIR=/var/log/hue  			# Log directory to use
+
+PIDFILE=/var/run/hue/supervisor.pid
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+# Default options, these can be overriden by the information
+# at /etc/default/$NAME
+DAEMON_OPTS="-p $PIDFILE -d -l $LOGDIR" # Additional options given to the server
+
+DIETIME=10              # Time to wait for the server to die, in seconds
+                        # If this value is set too low you might not
+                        # let some servers to die gracefully and
+                        # 'restart' will not work
+
+STARTTIME=5             # Time to wait for the server to start, in seconds
+                        # If this value is set each time the server is
+                        # started (on start or restart) the script will
+                        # stall to try to determine if it is running
+                        # If it is not set and the server takes time
+                        # to setup a pid file the log message might
+                        # be a false positive (says it did not start
+                        # when it actually did)
+
+DAEMONUSER=hue     # Users to run the daemons as. If this value
+                        # is set start-stop-daemon will chuid the server
+
+# Include defaults if available
+if [ -f /etc/default/$NAME ] ; then
+    . /etc/default/$NAME
+fi
+
+# Use this if you want the user to explicitly set 'RUN' in
+# /etc/default/
+#if [ "x$RUN" != "xyes" ] ; then
+#    log_failure_msg "$NAME disabled, please adjust the configuration to your needs "
+#    log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it."
+#    exit 1
+#fi
+
+# Check that the user exists (if we set a user)
+# Does the user exist?
+if [ -n "$DAEMONUSER" ] ; then
+    if getent passwd | grep -q "^$DAEMONUSER:"; then
+        # Obtain the uid and gid
+        DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
+        DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
+    else
+        log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
+        exit 1
+    fi
+fi
+
+
+set -e
+
+running_pid() {
+# Check if a given process pid's cmdline matches a given name
+    pid=$1
+    [ -z "$pid" ] && return 1
+    [ ! -d /proc/$pid ] &&  return 1
+    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+    echo $cmd | grep -q python || return 1
+    return 0
+}
+
+running() {
+# Check if the process is running looking at /proc
+# (works for all users)
+
+    # No pidfile, probably no daemon present
+    [ ! -f "$PIDFILE" ] && return 1
+    pid=`cat $PIDFILE`
+    running_pid $pid || return 1
+    return 0
+}
+
+start_server() {
+# Start the process using the wrapper
+	export PYTHON_EGG_CACHE='/tmp/.hue-python-eggs'
+        mkdir -p /usr/lib/hue/pids/ 
+        mkdir -p ${PYTHON_EGG_CACHE}
+        mkdir -p $(dirname $PIDFILE) $LOGDIR
+        chown -R $DAEMONUSER $(dirname $PIDFILE) $LOGDIR ${PYTHON_EGG_CACHE}
+        # dont setuid, since supervisor will drop privileges on its
+        # own
+        start-stop-daemon --start --quiet --pidfile $PIDFILE \
+                    --exec $DAEMON -- $DAEMON_OPTS
+        errcode=$?
+        return $errcode
+}
+
+stop_server() {
+# Stop the process using the wrapper
+        killproc -p $PIDFILE $DAEMON
+        errcode=$?
+        return $errcode
+}
+
+reload_server() {
+    [ ! -f "$PIDFILE" ] && return 1
+    pid=pidofproc $PIDFILE # This is the daemon's pid
+    # Send a SIGHUP
+    kill -1 $pid
+    return $?
+}
+
+force_stop() {
+# Force the process to die killing it manually
+    [ ! -e "$PIDFILE" ] && return
+    if running ; then
+        kill -15 $pid
+        # Is it really dead?
+        sleep "$DIETIME"s
+        if running ; then
+            kill -9 $pid
+            sleep "$DIETIME"s
+            if running ; then
+                echo "Cannot kill $NAME (pid=$pid)!"
+                exit 1
+            fi
+        fi
+    fi
+    rm -f $PIDFILE
+}
+
+
+case "$1" in
+  start)
+        log_daemon_msg "Starting $DESC " "$NAME"
+        # Check if it's running first
+        if running ;  then
+            log_progress_msg "apparently already running"
+            log_end_msg 0
+            exit 0
+        fi
+        if start_server ; then
+            # NOTE: Some servers might die some time after they start,
+            # this code will detect this issue if STARTTIME is set
+            # to a reasonable value
+            [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time
+            if  running ;  then
+                # It's ok, the server started and is running
+                log_end_msg 0
+            else
+                # It is not running after we did start
+                log_end_msg 1
+            fi
+        else
+            # Either we could not start it
+            log_end_msg 1
+        fi
+        ;;
+  stop)
+        log_daemon_msg "Stopping $DESC" "$NAME"
+        if running ; then
+            # Only stop the server if we see it running
+            errcode=0
+            stop_server || errcode=$?
+            log_end_msg $errcode
+        else
+            # If it's not running don't do anything
+            log_progress_msg "apparently not running"
+            log_end_msg 0
+            exit 0
+        fi
+        ;;
+  force-stop)
+        # First try to stop gracefully the program
+        $0 stop
+        errcode=0
+        if running; then
+            # If it's still running try to kill it more forcefully
+            log_daemon_msg "Stopping (force) $DESC" "$NAME"
+            force_stop || errcode=$?
+        fi
+        # if there are still processes running as hue, just kill them.
+        # we only do this if the user is hue, in case it's been changed
+        # to nobody - we don't want to go and kill a webserver
+        if [ "$DAEMONUSER" -eq hue ] && ps -u hue | grep -q build/env/bin ; then
+          killall -9 -u hue
+          errcode=$?
+        fi
+        log_end_msg $errcode
+        ;;
+  restart|force-reload)
+        log_daemon_msg "Restarting $DESC" "$NAME"
+        errcode=0
+        stop_server || errcode=$?
+        # Wait some sensible amount, some server need this
+        [ -n "$DIETIME" ] && sleep $DIETIME
+        start_server || errcode=$?
+        [ -n "$STARTTIME" ] && sleep $STARTTIME
+        running || errcode=$?
+        log_end_msg $errcode
+        ;;
+  status)
+
+        log_daemon_msg "Checking status of $DESC" "$NAME"
+        if running ;  then
+            log_progress_msg "running"
+            log_end_msg 0
+        else
+            log_progress_msg "apparently not running"
+            log_end_msg 1
+            exit 1
+        fi
+        ;;
+  # Use this if the daemon cannot reload
+  reload)
+        log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
+        log_warning_msg "cannot re-read the config file (use restart)."
+        ;;
+
+  *)
+        N=/etc/init.d/$NAME
+        echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
+        exit 1
+        ;;
+esac
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.prerm
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.prerm?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.prerm (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/hue-server.prerm Tue Jun 19 17:24:29 2012
@@ -0,0 +1,49 @@
+#!/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.
+
+# prerm script for Hue
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ -x "/etc/init.d/hue" ]; then
+        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+                invoke-rc.d hue stop || exit $?
+        else
+                /etc/init.d/hue stop || exit $?
+        fi
+fi
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules Tue Jun 19 17:24:29 2012
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+#
+# 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.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Implicit targets
+SHELL := /bin/bash
+
+APPS=beeswax
+
+$(APPS:%=debian/hue-%.postinst): debian/hue-app.postinst.tpl
+	sed -e 's#@APP@#$(patsubst debian/hue-%.postinst,%,$@)#'  < $< > $@
+
+$(APPS:%=debian/hue-%.prerm): debian/hue-app.prerm.tpl
+	sed -e 's#@APP@#$(patsubst debian/hue-%.prerm,%,$@)#'  < $< > $@
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+	dh_testdir
+	bash -x debian/do-component-build -Dmaven.repo.local=${HOME}/.m2/repository
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp debian/substvars
+	make clean
+	dh_clean
+
+install: build $(APPS:%=debian/hue-%.postinst) $(APPS:%=debian/hue-%.prerm)
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	bash -x debian/install_hue.sh --build-dir=${PWD} --prefix=${PWD}/debian/tmp
+	sed -e 's,^,build:,;' debian/tmp/usr/lib/hue/Makefile.buildvars \
+	  | tr _ - >> debian/hue-common.substvars
+	dh_install --sourcedir=debian/tmp --list-missing
+
+# Build architecture-independent files here.
+binary-indep: install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+	dh_installinit --no-start --name=hue
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure

Propchange: incubator/bigtop/trunk/bigtop-packages/src/deb/hue/rules
------------------------------------------------------------------------------
    svn:executable = *

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

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

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

Added: incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init?rev=1351781&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init (added)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hue/SOURCES/hue.init Tue Jun 19 17:24:29 2012
@@ -0,0 +1,125 @@
+#!/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.
+#
+#       /etc/rc.d/init.d/hue
+#
+#       Hue web server
+#
+# chkconfig: 2345 90 10
+# description: Hue web server
+# pidfile: /usr/lib/hue/pids/supervisor.pid
+
+. /etc/init.d/functions
+
+LOCKFILE=/var/lock/subsys/hue
+DAEMON=/usr/lib/hue/build/env/bin/supervisor # Introduce the server's location here
+LOGDIR=/var/log/hue  # Log directory to use
+PIDFILE=/var/run/hue/supervisor.pid
+USER=hue
+EXEC=/usr/lib/hue/build/env/bin/python
+DAEMON_OPTS="-p $PIDFILE -l $LOGDIR -d"
+
+hue_start() {
+        export PYTHON_EGG_CACHE='/tmp/.hue-python-eggs'
+        RE_REGISTER=/usr/lib/hue/.re_register
+        if [ -e $RE_REGISTER ]; then
+            # Do app_reg on upgraded apps. This is a workaround for DISTRO-11.
+            # We can probably take it out after another release.
+            DO="/sbin/runuser -s /bin/bash $USER -c"
+            APP_REG="/usr/lib/hue/tools/app_reg/app_reg.py"
+            # Upgraded apps write their paths in the re_rgister file.
+            RE_REG_LOG=/var/log/hue/hue_re_register.log
+
+            # Make cwd somewhere that $USER can chdir into
+            pushd / > /dev/null
+            $DO "DESKTOP_LOG_DIR=$LOGDIR $EXEC $APP_REG --install $(cat $RE_REGISTER | xargs echo -n)  >> $RE_REG_LOG 2>&1"
+            ok=$?
+            popd > /dev/null
+            if [ $ok -eq 0 ] ; then
+                rm -f $RE_REGISTER
+            else
+                echo "Failed to register some apps: Details in $RE_REG_LOG"
+            fi
+        fi
+
+        echo -n "Starting hue: "
+        for dir in $(dirname $PIDFILE) $LOGDIR ${PYTHON_EGG_CACHE}
+        do
+            mkdir -p $dir
+            chown -R $USER $dir
+        done
+
+        # Check if already running
+        if [ -e $PIDFILE ] && checkpid $(cat $PIDFILE) ; then
+            echo "already running"
+            return
+        fi
+        # the supervisor itself will setuid down to $USER
+        env - $DAEMON $DAEMON_OPTS
+        ret=$?
+        base=$(basename $0)
+        if [ $ret -eq 0 ]; then
+            sleep 5
+            test -e $PIDFILE && checkpid $(cat $PIDFILE)
+            ret=$?
+        fi
+        if [ $ret -eq 0 ]; then
+            touch $LOCKFILE
+            success $"$base startup"
+        else
+            failure $"$base startup"
+        fi
+        echo
+        return $ret
+}
+
+hue_stop() {
+        echo -n "Shutting down hue: "
+        killproc -p $PIDFILE -d 15 $DAEMON
+        ret=$?
+        echo
+        rm -f $LOCKFILE
+        return $ret
+}
+
+hue_restart() {
+  hue_stop
+  hue_start
+}
+
+case "$1" in
+    start)
+        hue_start
+        ;;
+    stop)
+        hue_stop
+        ;;
+    status)
+        status -p $PIDFILE supervisor
+        ;;
+    restart|reload)
+        hue_restart
+        ;;
+    condrestart)
+        [ -f $LOCKFILE ] && restart || :
+        ;;
+    *)
+        echo "Usage: hue {start|stop|status|reload|restart|condrestart"
+        exit 1
+        ;;
+esac
+exit $?



Mime
View raw message