ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject [1/2] git commit: ARGUS-73: Modified package script to allow enable/disable of components and able to keep multiple versions of components in the same box
Date Thu, 25 Sep 2014 21:14:41 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 7a01fbbe2 -> ad55c2bbe


ARGUS-73: Modified package script to allow enable/disable of components and able to keep multiple versions of components in the same box


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/031c8483
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/031c8483
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/031c8483

Branch: refs/heads/master
Commit: 031c84836ea08db0fe888a554110ae5e9718ce6d
Parents: 7a01fbb
Author: sneethiraj <sneethir@apache.org>
Authored: Thu Sep 25 10:15:47 2014 -0700
Committer: sneethiraj <sneethir@apache.org>
Committed: Thu Sep 25 10:15:47 2014 -0700

----------------------------------------------------------------------
 agents-common/scripts/enable-agent.sh           | 416 +++++++++++++++++++
 .../utils/install/XmlConfigChanger.java         |  20 +
 hbase-agent/disable-conf/hbase-site-changes.cfg |   2 +
 hdfs-agent/conf/xasecure-hadoop-env.sh          |   2 +-
 hive-agent/disable-conf/hive-site-changes.cfg   |   1 +
 .../disable-conf/hiveserver2-site-changes.cfg   |   2 +
 src/main/assembly/hbase-agent.xml               | 116 ++++--
 src/main/assembly/hdfs-agent.xml                |  90 ++--
 src/main/assembly/hive-agent.xml                | 122 +++---
 src/main/assembly/knox-agent.xml                | 135 +++---
 src/main/assembly/storm-agent.xml               |  98 +++--
 11 files changed, 773 insertions(+), 231 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh
new file mode 100755
index 0000000..d5a0754
--- /dev/null
+++ b/agents-common/scripts/enable-agent.sh
@@ -0,0 +1,416 @@
+#!/bin/bash
+
+#
+# Base env variable for ARGUS related files/directories
+#
+
+PROJ_NAME=argus
+BASE_CONF_DIR=/etc/${PROJ_NAME}
+
+#
+# Identify the component, action from the script file
+#
+
+
+basedir=`dirname $0`
+if [ "${basedir}" = "." ]
+then
+    basedir=`pwd`
+elif [ "${basedir}" = ".." ]
+then
+    basedir=`(cd .. ;pwd)`
+fi
+
+#
+# As this script is common to all component, find the component name based on the script-name
+#
+
+COMPONENT_NAME=`basename $0 | cut -d. -f1 | sed -e 's:^disable-::' | sed -e 's:^enable-::'`
+
+echo "${COMPONENT_NAME}" | grep 'agent' > /dev/null 2>&1
+
+if [ $? -ne 0 ]
+then
+	echo "$0 : is not applicable for component [${COMPONENT_NAME}]. It is applicable only for argus agent component; Exiting ..."
+	exit 0 
+fi
+
+HCOMPONENT_NAME=`echo ${COMPONENT_NAME} | sed -e 's:-agent::'`
+
+CFG_OWNER_INF="${HCOMPONENT_NAME}:hadoop"
+
+if [ "${HCOMPONENT_NAME}" = "hdfs" ]
+then
+	HCOMPONENT_NAME="hadoop"
+fi
+
+#
+# Based on script name, identify if the action is enabled or disabled
+#
+
+basename $0 | cut -d. -f1 | grep '^enable-' > /dev/null 2>&1
+
+if [ $? -eq 0 ]
+then
+	action=enable
+else
+	action=disable
+fi
+
+
+#
+# environment variables for enable|disable scripts 
+#
+
+PROJ_INSTALL_DIR=`(cd ${basedir} ; pwd)`
+SET_ENV_SCRIPT_NAME=set-${COMPONENT_NAME}-env.sh
+SET_ENV_SCRIPT_TEMPLATE=${PROJ_INSTALL_DIR}/install/conf.templates/enable/${SET_ENV_SCRIPT_NAME}
+DEFAULT_XML_CONFIG=${PROJ_INSTALL_DIR}/install/conf.templates/default/configuration.xml
+PROJ_LIB_DIR=${PROJ_INSTALL_DIR}/lib
+PROJ_INSTALL_LIB_DIR="${PROJ_INSTALL_DIR}/install/lib"
+INSTALL_ARGS="${PROJ_INSTALL_DIR}/install.properties"
+JAVA=java
+
+hdir=${PROJ_INSTALL_DIR}/../../${HCOMPONENT_NAME}
+
+#
+# TEST - START
+#
+if [ ! -d ${hdir} ]
+then
+	mkdir -p ${hdir}
+fi
+#
+# TEST - END
+#
+HCOMPONENT_INSTALL_DIR=`(cd ${hdir} ; pwd)`
+HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/lib
+if [ "${HCOMPONENT_NAME}" = "knox" ]
+then
+	HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/ext
+fi
+HCOMPONENT_CONF_DIR=${HCOMPONENT_INSTALL_DIR}/conf
+HCOMPONENT_ARCHIVE_CONF_DIR=${HCOMPONENT_CONF_DIR}/.archive
+SET_ENV_SCRIPT=${HCOMPONENT_CONF_DIR}/${SET_ENV_SCRIPT_NAME}
+
+
+if [ ! -d "${HCOMPONENT_INSTALL_DIR}" ]
+then
+	echo "ERROR: Unable to find the install directory of component [${HCOMPONENT_NAME}]; dir [${HCOMPONENT_INSTALL_DIR}] not found."
+	echo "Exiting installation."
+	exit 1
+fi
+
+if [ ! -d "${HCOMPONENT_CONF_DIR}" ]
+then
+	echo "ERROR: Unable to find the conf directory of component [${HCOMPONENT_NAME}]; dir [${HCOMPONENT_CONF_DIR}] not found."
+	echo "Exiting installation."
+	exit 1
+fi
+
+if [ ! -d "${HCOMPONENT_LIB_DIR}" ]
+then
+	echo "ERROR: Unable to find the lib directory of component [${HCOMPONENT_NAME}];  dir [${HCOMPONENT_LIB_DIR}] not found."
+	echo "Exiting installation."
+	exit 1
+fi
+
+#
+# Common functions used by all enable/disable scripts
+#
+
+log() {
+	echo "+ `date` : $*"
+}
+
+
+create_jceks() {
+
+	alias=$1
+	pass=$2
+	jceksFile=$3
+
+	if [ -f "${jceksFile}" ]
+	then
+		jcebdir=`dirname ${jceksFile}`
+		jcebname=`basename ${jceksFile}`
+		archive_jce=${jcebdir}/.${jcebname}.`date '+%Y%m%d%H%M%S'`
+		log "Saving current JCE file: ${jceksFile} to ${archive_jce} ..."
+		cp ${jceksFile} ${archive_jce}
+	fi
+
+	tempFile=/tmp/jce.$$.out
+
+    java -cp ":${PROJ_INSTALL_LIB_DIR}/*:" com.hortonworks.credentialapi.buildks create "${alias}" -value "${pass}" -provider "jceks://file${jceksFile}" > ${tempFile} 2>&1
+
+	if [ $? -ne 0 ]
+	then
+		echo "Unable to store password in non-plain text format. Error: [`cat ${tempFile}`]"
+		echo "Exiting agent installation"
+		rm -f ${tempFile}
+		exit 0
+	fi
+	
+	rm -f ${tempFile}
+}
+
+#
+# If there is a set-argus-${COMPONENT}-env.sh, install it
+#
+dt=`date '+%Y%m%d-%H%M%S'`
+
+if [ -f "${SET_ENV_SCRIPT_TEMPLATE}" ]
+then
+	#
+	# If the setenv script already exists, move it to the archive folder
+	#
+	if [ -f "${SET_ENV_SCRIPT}" ]
+	then
+		if [ ! -d "${HCOMPONENT_ARCHIVE_CONF_DIR}" ]
+		then
+			mkdir -p ${HCOMPONENT_ARCHIVE_CONF_DIR}
+		fi
+		log "Saving current ${SET_ENV_SCRIPT_NAME} to ${HCOMPONENT_ARCHIVE_CONF_DIR} ..."
+		mv ${SET_ENV_SCRIPT} ${HCOMPONENT_ARCHIVE_CONF_DIR}/${SET_ENV_SCRIPT_NAME}.${dt}
+	fi
+	
+	if [ "${action}" = "enable" ]
+	then
+		cp ${SET_ENV_SCRIPT_TEMPLATE} ${SET_ENV_SCRIPT}
+		if [ -f ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh ]
+		then
+
+			grep 'xasecure-.*-env.sh' ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh > /dev/null 2>&1
+			if [ $? -eq 0 ]
+			then
+				ts=`date '+%Y%m%d%H%M%S'`
+				grep -v 'xasecure-.*-env.sh' ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh > ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts} 
+				if [ $? -eq 0 ]
+				then
+					log "Removing old reference to xasecure setenv source ..."
+					cat ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts} > ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh
+					rm -f ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh.${ts}
+				fi
+			fi
+
+			grep "[ \t]*.[ \t]*${SET_ENV_SCRIPT}" ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh  > /dev/null
+			if [ $? -ne 0 ]
+			then
+				log "Appending sourcing script, ${SET_ENV_SCRIPT_NAME} in the file: ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh "
+				cat >> ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh <<!
+if [ -f ${SET_ENV_SCRIPT} ]
+then
+	.  ${SET_ENV_SCRIPT}
+fi
+!
+			else
+				log "INFO: ${SET_ENV_SCRIPT_NAME} is being sourced from file: ${HCOMPONENT_CONF_DIR}/${HCOMPONENT_NAME}-env.sh "
+			fi
+		fi
+	fi
+fi
+
+#
+# Run, the enable|disable ${COMPONENT} configurations 
+#
+
+if [ -d "${PROJ_INSTALL_DIR}/install/conf.templates/${action}" ]
+then
+
+
+	INSTALL_CP="${PROJ_INSTALL_LIB_DIR}/*" 
+	if [ "${action}" = "enable" ]
+	then
+		for cf in ${PROJ_INSTALL_DIR}/install/conf.templates/${action}/*.xml
+		do
+			cfb=`basename ${cf}`
+			if [ -f "${HCOMPONENT_CONF_DIR}/${cfb}" ]
+			then
+				log "Saving ${HCOMPONENT_CONF_DIR}/${cfb} to ${HCOMPONENT_CONF_DIR}/.${cfb}.${dt} ..."
+				cp ${HCOMPONENT_CONF_DIR}/${cfb} ${HCOMPONENT_CONF_DIR}/.${cfb}.${dt}
+			fi
+			cp ${cf} ${HCOMPONENT_CONF_DIR}/
+			chown ${CFG_OWNER_INF} ${HCOMPONENT_CONF_DIR}/${cfb}
+		done
+	fi
+
+	for f in ${PROJ_INSTALL_DIR}/install/conf.templates/${action}/*.cfg
+	do
+		if [ -f "${f}" ]
+		then
+			fn=`basename $f`
+        	orgfn=`echo $fn | sed -e 's:-changes.cfg:.xml:'`
+        	fullpathorgfn="${HCOMPONENT_CONF_DIR}/${orgfn}"
+        	if [ ! -f ${fullpathorgfn} ]
+        	then
+				if [ -f ${DEFAULT_XML_CONFIG} ]
+				then
+					log "Creating default file from [${DEFAULT_XML_CONFIG}] for [${fullpathorgfn}] .."
+					cp ${DEFAULT_XML_CONFIG} ${fullpathorgfn}
+				else
+        			echo "ERROR: Unable to find ${fullpathorgfn}"
+        			exit 1
+				fi
+        	fi
+			archivefn="${HCOMPONENT_CONF_DIR}/.${orgfn}.${dt}"
+        	newfn="${HCOMPONENT_CONF_DIR}/.${orgfn}-new.${dt}"
+			log "Saving current config file: ${fullpathorgfn} to ${archivefn} ..."
+            cp ${fullpathorgfn} ${archivefn}
+			if [ $? -eq 0 ]
+			then
+				${JAVA} -cp "${INSTALL_CP}" com.xasecure.utils.install.XmlConfigChanger -i ${archivefn} -o ${newfn} -c ${f} -p  ${INSTALL_ARGS}
+				if [ $? -eq 0 ]
+                then
+                	diff -w ${newfn} ${fullpathorgfn} > /dev/null 2>&1
+                    if [ $? -ne 0 ]
+                    then
+                    	cp ${newfn} ${fullpathorgfn}
+                    fi
+               	else
+				    echo "ERROR: Unable to make changes to config. file: ${fullpathorgfn}"
+                    echo "exiting ...."
+                    exit 1
+				fi
+			else
+				echo "ERROR: Unable to save config. file: ${fullpathorgfn}  to ${archivefn}"
+                echo "exiting ...."
+                exit 1
+			fi
+		fi
+	done
+fi
+
+#
+# Create library link
+#
+
+if [ "${action}" = "enable" ]
+then
+
+	if [ -d "${PROJ_LIB_DIR}" ]
+	then
+		dt=`date '+%Y%m%d%H%M%S'`
+		dbJar=`grep '^SQL_CONNECTOR_JAR' ${INSTALL_ARGS} | awk -F= '{ print $2 }'`
+		for f in ${PROJ_LIB_DIR}/*.jar ${dbJar}
+		do
+			if [ -f "${f}" ]
+			then	
+				bn=`basename $f`
+				if [ -f ${HCOMPONENT_LIB_DIR}/${bn} ]
+				then
+					log "Saving lib file: ${HCOMPONENT_LIB_DIR}/${bn} to ${HCOMPONENT_LIB_DIR}/.${bn}.${dt} ..."
+					mv ${HCOMPONENT_LIB_DIR}/${bn} ${HCOMPONENT_LIB_DIR}/.${bn}.${dt}
+				fi
+				if [ ! -f ${HCOMPONENT_LIB_DIR}/${bn} ]
+				then
+					ln -s ${f} ${HCOMPONENT_LIB_DIR}/${bn}
+				fi
+			fi
+		done
+	fi
+
+	#
+	# Encrypt the password and keep it secure in Credential Provider API
+	#
+	
+	CredFile=`grep '^CREDENTIAL_PROVIDER_FILE' ${INSTALL_ARGS} | awk -F= '{ print $2 }'`
+	
+	if ! [ `echo ${CredFile} | grep '^/.*'` ]
+	then
+  	echo "ERROR:Please enter the Credential File Store with proper file path"
+  	exit 1
+	fi
+	
+	pardir=`dirname ${CredFile}`
+	
+	if [ ! -d "${pardir}" ]
+	then
+		mkdir -p "${pardir}" 
+	
+		if [ $? -ne 0 ]
+		then
+    		echo "ERROR: Unable to create credential store file path"
+			exit 1
+		fi
+		chmod go+rx "${pardir}"
+	fi
+
+	#
+	# Generate Credential Provider file and Credential for Audit DB access.
+	#
+	
+	
+	auditCredAlias="auditDBCred"
+	
+	auditdbCred=`grep '^XAAUDIT.DB.PASSWORD' ${INSTALL_ARGS} | awk -F= '{ print $2 }'`
+	
+	create_jceks "${auditCredAlias}"  "${auditdbCred}"  "${CredFile}"
+	
+	
+	#
+	# Generate Credential Provider file and Credential for SSL KEYSTORE AND TRUSTSTORE
+	#
+	
+	
+	sslkeystoreAlias="sslKeyStore"
+	
+	sslkeystoreCred=`grep '^SSL_KEYSTORE_PASSWORD' ${INSTALL_ARGS} | awk -F= '{ print $2 }'`
+	
+	create_jceks "${sslkeystoreAlias}" "${sslkeystoreCred}" "${CredFile}"
+	
+	
+	ssltruststoreAlias="sslTrustStore"
+	
+	ssltruststoreCred=`grep '^SSL_TRUSTSTORE_PASSWORD' ${INSTALL_ARGS} | awk -F= '{ print $2 }'`
+	
+	create_jceks "${ssltruststoreAlias}" "${ssltruststoreCred}" "${CredFile}"
+	
+	chown ${CFG_OWNER_INF} ${CredFile}
+	
+fi
+
+#
+# Knox specific configuration
+#
+#
+
+if [ "${HCOMPONENT_NAME}" = "knox" ]
+then
+	if [ "${action}" = "enable" ]
+	then
+		authFrom="AclsAuthz"
+		authTo="XASecurePDPKnox"
+	else
+		authTo="AclsAuthz"
+		authFrom="XASecurePDPKnox"
+	fi
+
+	dt=`date '+%Y%m%d%H%M%S'`
+	for fn in `ls ${HCOMPONENT_CONF_DIR}/topologies/*.xml 2> /dev/null`
+	do
+  		if [ -f "${fn}" ]
+  		then
+    		dn=`dirname ${fn}`
+    		bn=`basename ${fn}`
+    		bf=${dn}/.${bn}.${dt}
+    		echo "backup of ${fn} to ${bf} ..."
+    		cp ${fn} ${bf}
+    		echo "Updating topology file: [${fn}] ... " 
+    		cat ${fn} | sed -e "s-<name>${authFrom}</name>-<name>${authTo}</name>-" > ${fn}.${dt}.new
+    		if [ $? -eq 0 ]
+    		then
+        		cat ${fn}.${dt}.new > ${fn}
+        		rm ${fn}.${dt}.new
+    		fi 
+  		fi
+	done
+fi
+
+
+#
+# Set notice to restart the ${HCOMPONENT_NAME}
+#
+
+echo "ARGUS Plugin for ${HCOMPONENT_NAME} has been ${action}d. Please restart ${HCOMPONENT_NAME} to ensure that changes are effective."
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/agents-installer/src/main/java/com/xasecure/utils/install/XmlConfigChanger.java
----------------------------------------------------------------------
diff --git a/agents-installer/src/main/java/com/xasecure/utils/install/XmlConfigChanger.java b/agents-installer/src/main/java/com/xasecure/utils/install/XmlConfigChanger.java
index c7a3346..e0e9910 100644
--- a/agents-installer/src/main/java/com/xasecure/utils/install/XmlConfigChanger.java
+++ b/agents-installer/src/main/java/com/xasecure/utils/install/XmlConfigChanger.java
@@ -244,6 +244,26 @@ public class XmlConfigChanger {
 						}
 					}
 				}
+				else if ("delval".equals(actionType)) {
+					String curVal =  getProperty(propName) ;
+					if (curVal != null) {
+						String appendDelimitor = (tokens.length > 4 ? tokens[4] : " ") ;
+						if (curVal.contains(propValue)) {
+							String[] valTokens = curVal.split(appendDelimitor) ;
+							StringBuilder sb = new StringBuilder() ;
+							for(String v : valTokens) {
+								if (! v.equals(propValue)) {
+									if (sb.length() > 0) {
+										sb.append(appendDelimitor) ;
+									}
+									sb.append(v);
+								}
+							}
+							String newVal = sb.toString() ;
+							modProperty(propName, newVal,createIfNotExists) ;
+						}
+					}
+				}
 				else {
 					throw new RuntimeException("Unknown Command Found: [" + actionType + "], Supported Types:  add modify del append") ;
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/hbase-agent/disable-conf/hbase-site-changes.cfg
----------------------------------------------------------------------
diff --git a/hbase-agent/disable-conf/hbase-site-changes.cfg b/hbase-agent/disable-conf/hbase-site-changes.cfg
new file mode 100644
index 0000000..defdcb0
--- /dev/null
+++ b/hbase-agent/disable-conf/hbase-site-changes.cfg
@@ -0,0 +1,2 @@
+hbase.coprocessor.master.classes	com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor delval - ,
+hbase.coprocessor.region.classes	com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor delval - ,

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/hdfs-agent/conf/xasecure-hadoop-env.sh
----------------------------------------------------------------------
diff --git a/hdfs-agent/conf/xasecure-hadoop-env.sh b/hdfs-agent/conf/xasecure-hadoop-env.sh
index e711ccd..f88de75 100644
--- a/hdfs-agent/conf/xasecure-hadoop-env.sh
+++ b/hdfs-agent/conf/xasecure-hadoop-env.sh
@@ -3,7 +3,7 @@
 echo "$0" | grep -q beeswax_server.sh > /dev/null 2>&1
 if [ $? -ne 0 ]
 then
-	XASECURE_AGENT_PATH="`ls -1 /usr/hdp/current/hadoop/lib/hdfs-agent-*.jar | head -1`"
+	XASECURE_AGENT_PATH="`ls -1 ${HADOOP_HOME}/lib/hdfs-agent-*.jar | head -1`"
 	if [ -f "${XASECURE_AGENT_PATH}" ]
 	then
 	    if [ "${XASECURE_INIT}" != "0" ]

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/hive-agent/disable-conf/hive-site-changes.cfg
----------------------------------------------------------------------
diff --git a/hive-agent/disable-conf/hive-site-changes.cfg b/hive-agent/disable-conf/hive-site-changes.cfg
new file mode 100644
index 0000000..288ac9d
--- /dev/null
+++ b/hive-agent/disable-conf/hive-site-changes.cfg
@@ -0,0 +1 @@
+hive.security.authorization.manager	org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider	mod		create-if-not-exists

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/hive-agent/disable-conf/hiveserver2-site-changes.cfg
----------------------------------------------------------------------
diff --git a/hive-agent/disable-conf/hiveserver2-site-changes.cfg b/hive-agent/disable-conf/hiveserver2-site-changes.cfg
new file mode 100644
index 0000000..fb2e3f1
--- /dev/null
+++ b/hive-agent/disable-conf/hiveserver2-site-changes.cfg
@@ -0,0 +1,2 @@
+hive.security.authenticator.manager	org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator	mod	create-if-not-exists
+hive.security.authorization.manager	org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider	mod		create-if-not-exists

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/src/main/assembly/hbase-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hbase-agent.xml b/src/main/assembly/hbase-agent.xml
index 32144a0..8ecde2d 100644
--- a/src/main/assembly/hbase-agent.xml
+++ b/src/main/assembly/hbase-agent.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <assembly>
   <id>hbase-agent</id> 
   <formats>
      <format>tar</format>
+	 <format>zip</format>
   </formats>
   <baseDirectory>${project.name}-${project.version}-hbase-agent</baseDirectory>
   <includeBaseDirectory>true</includeBaseDirectory>
@@ -23,7 +23,7 @@
                 <unpack>false</unpack>
             </dependencySet>
         </dependencySets>
-        <outputDirectory>/dist</outputDirectory>
+        <outputDirectory>/lib</outputDirectory>
      </binaries>
      <includes>
 	<include>security_agents.agents-audit:agents-audit</include>
@@ -36,52 +36,84 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/installer/lib</outputDirectory>
+        <dependencySets>
+                <dependencySet>
+                    <outputDirectory>/install/lib</outputDirectory>
+                    <unpack>false</unpack>
+                    <includes>
+                        <include>commons-cli:commons-cli</include>
+                        <include>commons-collections:commons-collections</include>
+                        <include>commons-configuration:commons-configuration:jar:${commons.configuration.version}</include>
+                        <include>commons-lang:commons-lang</include>
+                        <include>commons-logging:commons-logging:jar:${commons.logging.version}</include>
+                        <include>com.google.guava:guava:jar:${guava.version}</include>
+                        <include>org.hamcrest:hamcrest-all</include>
+                        <include>junit:junit</include>
+                        <include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
+                        <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
+                        <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
+                    </includes>
+                </dependencySet>
+        </dependencySets>
+        <outputDirectory>/install/lib</outputDirectory>
         <unpack>false</unpack>
      </binaries>
      <includes>
-	<include>security_agents.agents-installer:agents-installer</include>
+		<include>security_agents.agents-installer:agents-installer</include>
+		<include>com.hortonworks.hadoop.security:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	
+
   <fileSets>
-	<fileSet>
-		<outputDirectory>/conf</outputDirectory>
-		<directory>hbase-agent/conf</directory>
-		<excludes>
-			<exclude>*.cfg</exclude>
-		</excludes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/installer/conf</outputDirectory>
-		<directory>hbase-agent/conf</directory>
-		<includes>
-			<include>*.cfg</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hbase-agent/scripts</directory>
-		<excludes>
-			<exclude>*.sh</exclude>
-		</excludes>
-		<fileMode>700</fileMode>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hbase-agent/scripts</directory>
-		<includes>
-			<include>*.sh</include>
-		</includes>
-		<fileMode>544</fileMode>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>${project.build.directory}</directory>
-		<includes>
-			<include>version</include>
-		</includes>
-		<fileMode>444</fileMode>
-	</fileSet>
+    <!-- conf.templates for enable -->
+    <fileSet>
+        <outputDirectory>/install/conf.templates/enable</outputDirectory>
+        <directory>hbase-agent/conf</directory>
+        <excludes>
+            <exclude>*.sh</exclude>
+        </excludes>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/disable</outputDirectory>
+        <directory>hbase-agent/disable-conf</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/default</outputDirectory>
+        <directory>hive-agent/template</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <!-- version file -->
+    <fileSet>
+        <outputDirectory>/</outputDirectory>
+        <directory>${project.build.outputDirectory}</directory>
+        <includes>
+            <include>version</include>
+        </includes>
+        <fileMode>444</fileMode>
+    </fileSet>
   </fileSets>
+  <!-- enable/disable script for agent -->
+  <files>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>enable-hbase-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>disable-hbase-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+        <source>hbase-agent/scripts/install.properties</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>install.properties</destName>
+        <fileMode>755</fileMode>
+    </file>
+  </files>
 </assembly>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/src/main/assembly/hdfs-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hdfs-agent.xml b/src/main/assembly/hdfs-agent.xml
index 2f888b9..a17e83b 100644
--- a/src/main/assembly/hdfs-agent.xml
+++ b/src/main/assembly/hdfs-agent.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <assembly>
   <id>hdfs-agent</id> 
   <formats>
      <format>tar</format>
+	 <format>zip</format>
   </formats>
   <baseDirectory>${project.name}-${project.version}-hdfs-agent</baseDirectory>
   <includeBaseDirectory>true</includeBaseDirectory>
@@ -24,7 +24,7 @@
 				<unpack>false</unpack>
   			</dependencySet>
   		</dependencySets>
-        <outputDirectory>/dist</outputDirectory>
+        <outputDirectory>/lib</outputDirectory>
      </binaries>
      <includes>
 	<include>security_agents.agents-audit:agents-audit</include>
@@ -37,59 +37,79 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/installer/lib</outputDirectory>
+  		<dependencySets>
+                <dependencySet>
+                    <outputDirectory>/install/lib</outputDirectory>
+                    <unpack>false</unpack>
+                    <includes>
+                        <include>commons-cli:commons-cli</include>
+                        <include>commons-collections:commons-collections</include>
+                        <include>commons-configuration:commons-configuration:jar:${commons.configuration.version}</include>
+                        <include>commons-lang:commons-lang</include>
+                        <include>commons-logging:commons-logging:jar:${commons.logging.version}</include>
+                        <include>com.google.guava:guava:jar:${guava.version}</include>
+                        <include>org.hamcrest:hamcrest-all</include>
+                        <include>junit:junit</include>
+                        <include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
+                        <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
+                        <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
+                    </includes>
+                </dependencySet>
+  		</dependencySets>
+        <outputDirectory>/install/lib</outputDirectory>
         <unpack>false</unpack>
      </binaries>
      <includes>
-	<include>security_agents.agents-installer:agents-installer</include>
+		<include>security_agents.agents-installer:agents-installer</include>
+        <include>com.hortonworks.hadoop.security:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	
   <fileSets>
+    <!-- conf.templates for enable -->
 	<fileSet>
-		<outputDirectory>/conf</outputDirectory>
-		<directory>hdfs-agent/conf</directory>
-		<excludes>
-			<exclude>*.cfg</exclude>
-		</excludes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/installer/conf</outputDirectory>
+		<outputDirectory>/install/conf.templates/enable</outputDirectory>
 		<directory>hdfs-agent/conf</directory>
-		<includes>
-			<include>*.cfg</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hdfs-agent/scripts</directory>
 		<excludes>
 			<exclude>*.sh</exclude>
 		</excludes>
 		<fileMode>700</fileMode>
 	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hdfs-agent/scripts</directory>
-		<includes>
-			<include>*.sh</include>
-		</includes>
-		<fileMode>544</fileMode>
-	</fileSet>
+    <!-- version file -->
 	<fileSet>
 		<outputDirectory>/</outputDirectory>
 		<directory>${project.build.outputDirectory}</directory>
 		<includes>
 			<include>version</include>
 		</includes>
+		<fileMode>444</fileMode>
 	</fileSet>
-        <fileSet>
-                <outputDirectory>/</outputDirectory>
-                <directory>${project.build.directory}</directory>
-                <includes>
-                        <include>version</include>
-                </includes>
-				<fileMode>444</fileMode>
-        </fileSet>
   </fileSets>
+  <!-- enable/disable script for agent -->
+  <files>
+	<file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+		<outputDirectory>/</outputDirectory>
+		<destName>enable-hdfs-agent.sh</destName>
+		<fileMode>755</fileMode>
+	</file>
+	<file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+		<outputDirectory>/</outputDirectory>
+		<destName>disable-hdfs-agent.sh</destName>
+		<fileMode>755</fileMode>
+	</file>
+	<file>
+		<source>hdfs-agent/scripts/install.properties</source>
+		<outputDirectory>/</outputDirectory>
+		<destName>install.properties</destName>
+		<fileMode>755</fileMode>
+	</file>
+    <file>
+		<source>hdfs-agent/conf/xasecure-hadoop-env.sh</source>
+		<outputDirectory>/install/conf.templates/enable</outputDirectory>
+		<destName>set-hdfs-agent-env.sh</destName>
+		<fileMode>755</fileMode>
+    </file>	
+  </files>
 </assembly>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/src/main/assembly/hive-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/hive-agent.xml b/src/main/assembly/hive-agent.xml
index 131b0c3..07c27c8 100644
--- a/src/main/assembly/hive-agent.xml
+++ b/src/main/assembly/hive-agent.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <assembly>
   <id>hive-agent</id> 
   <formats>
      <format>tar</format>
+	 <format>zip</format>
   </formats>
   <baseDirectory>${project.name}-${project.version}-hive-agent</baseDirectory>
   <includeBaseDirectory>true</includeBaseDirectory>
@@ -24,7 +24,7 @@
                 <unpack>false</unpack>
             </dependencySet>
         </dependencySets>
-        <outputDirectory>/dist</outputDirectory>
+        <outputDirectory>/lib</outputDirectory>
      </binaries>
      <includes>
 	<include>security_agents.agents-audit:agents-audit</include>
@@ -37,59 +37,83 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/installer/lib</outputDirectory>
+       <dependencySets>
+                <dependencySet>
+                    <outputDirectory>/install/lib</outputDirectory>
+                    <unpack>false</unpack>
+                    <includes>
+                        <include>commons-cli:commons-cli</include>
+                        <include>commons-collections:commons-collections</include>
+                        <include>commons-configuration:commons-configuration:jar:${commons.configuration.version}</include>
+                        <include>commons-lang:commons-lang</include>
+                        <include>commons-logging:commons-logging:jar:${commons.logging.version}</include>
+                        <include>com.google.guava:guava:jar:${guava.version}</include>
+                        <include>org.hamcrest:hamcrest-all</include>
+                        <include>junit:junit</include>
+                        <include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
+                        <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
+                        <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
+                    </includes>
+                </dependencySet>
+        </dependencySets>
+        <outputDirectory>/install/lib</outputDirectory>
         <unpack>false</unpack>
      </binaries>
      <includes>
-	<include>security_agents.agents-installer:agents-installer</include>
+	    <include>security_agents.agents-installer:agents-installer</include>
+        <include>com.hortonworks.hadoop.security:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	
   <fileSets>
-	<fileSet>
-		<outputDirectory>/conf</outputDirectory>
-		<directory>hive-agent/conf</directory>
-		<excludes>
-			<exclude>*.cfg</exclude>
-		</excludes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/installer/conf</outputDirectory>
-		<directory>hive-agent/conf</directory>
-		<includes>
-			<include>*.cfg</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/template</outputDirectory>
-		<directory>hive-agent/template</directory>
-		<includes>
-			<include>*</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hive-agent/scripts</directory>
-		<excludes>
-			<exclude>*.sh</exclude>
-		</excludes>
-		<fileMode>700</fileMode>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>hive-agent/scripts</directory>
-		<includes>
-			<include>*.sh</include>
-		</includes>
-		<fileMode>544</fileMode>
-	</fileSet>
-        <fileSet>
-                <outputDirectory>/</outputDirectory>
-                <directory>${project.build.directory}</directory>
-                <includes>
-                        <include>version</include>
-                </includes>
-				<fileMode>444</fileMode>
-        </fileSet>
+   <!-- conf.templates for enable -->
+    <fileSet>
+        <outputDirectory>/install/conf.templates/enable</outputDirectory>
+        <directory>hive-agent/conf</directory>
+        <excludes>
+            <exclude>*.sh</exclude>
+        </excludes>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/disable</outputDirectory>
+        <directory>hive-agent/disable-conf</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/default</outputDirectory>
+        <directory>hive-agent/template</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <!-- version file -->
+    <fileSet>
+        <outputDirectory>/</outputDirectory>
+        <directory>${project.build.outputDirectory}</directory>
+        <includes>
+            <include>version</include>
+        </includes>
+        <fileMode>444</fileMode>
+    </fileSet>
   </fileSets>
+  <!-- enable/disable script for agent -->
+  <files>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>enable-hive-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>disable-hive-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+        <source>hive-agent/scripts/install.properties</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>install.properties</destName>
+        <fileMode>755</fileMode>
+    </file>
+  </files>
 </assembly>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/src/main/assembly/knox-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/knox-agent.xml b/src/main/assembly/knox-agent.xml
index c8d2100..e48e34e 100644
--- a/src/main/assembly/knox-agent.xml
+++ b/src/main/assembly/knox-agent.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <assembly>
   <id>knox-agent</id> 
   <formats>
      <format>tar</format>
+	 <format>zip</format>
   </formats>
   <baseDirectory>${project.name}-${project.version}-knox-agent</baseDirectory>
   <includeBaseDirectory>true</includeBaseDirectory>
@@ -18,7 +18,7 @@
                 <outputDirectory>/lib</outputDirectory>
                 <includes>
                     <include>commons-configuration:commons-configuration</include>
-                    <include>org.apache.hadoop:hadoop-common</include>
+                    <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
                     <include>org.apache.hadoop:hadoop-common-plus</include>
                     <include>org.glassfish.jersey.core:jersey-client</include>
                     <include>com.google.code.gson:gson*</include>
@@ -27,26 +27,8 @@
                 </includes>
                 <unpack>false</unpack>
             </dependencySet>
-                <dependencySet>
-                    <outputDirectory>/cred/lib</outputDirectory>
-                    <unpack>false</unpack>
-                    <includes>
-                        <include>commons-cli:commons-cli</include>
-                        <include>commons-collections:commons-collections</include>
-                        <include>commons-configuration:commons-configuration</include>
-                        <include>commons-lang:commons-lang</include>
-                        <include>commons-logging:commons-logging</include>
-                        <include>com.google.guava:guava</include>
-                        <include>org.hamcrest:hamcrest-all</include>
-                        <include>junit:junit</include>
-						<include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
-                        <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
-                        <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
-                        <include>com.hortonworks.hadoop.security:credentialbuilder</include>
-                    </includes>
-                </dependencySet>
         </dependencySets>
-        <outputDirectory>/dist</outputDirectory>
+        <outputDirectory>/lib</outputDirectory>
      </binaries>
      <includes>
 		<include>security_agents.agents-audit:agents-audit</include>
@@ -59,52 +41,83 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/installer/lib</outputDirectory>
+        <outputDirectory>/install/lib</outputDirectory>
         <unpack>false</unpack>
+        <dependencySets>
+           <dependencySet>
+               <outputDirectory>/install/lib</outputDirectory>
+               <unpack>false</unpack>
+               <includes>
+                        <include>commons-cli:commons-cli</include>
+                        <include>commons-collections:commons-collections</include>
+                        <include>commons-configuration:commons-configuration:jar:${commons.configuration.version}</include>
+                        <include>commons-lang:commons-lang</include>
+                        <include>commons-logging:commons-logging:jar:${commons.logging.version}</include>
+                        <include>com.google.guava:guava:jar:${guava.version}</include>
+                        <include>org.hamcrest:hamcrest-all</include>
+                        <include>junit:junit</include>
+						<include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
+                        <include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
+                        <include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
+               </includes>
+           </dependencySet>
+        </dependencySets>
      </binaries>
      <includes>
-	<include>security_agents.agents-installer:agents-installer</include>
+		<include>security_agents.agents-installer:agents-installer</include>
+    	<include>com.hortonworks.hadoop.security:credentialbuilder</include>
      </includes>
     </moduleSet>
   </moduleSets> 	
   <fileSets>
-	<fileSet>
-		<outputDirectory>/conf</outputDirectory>
-		<directory>knox-agent/conf</directory>
-		<excludes>
-			<exclude>*.cfg</exclude>
-		</excludes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/installer/conf</outputDirectory>
-		<directory>knox-agent/conf</directory>
-		<includes>
-			<include>*.cfg</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>knox-agent/scripts</directory>
-		<excludes>
-			<exclude>*.sh</exclude>
-		</excludes>
-		<fileMode>700</fileMode>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>knox-agent/scripts</directory>
-		<includes>
-			<include>*.sh</include>
-		</includes>
-		<fileMode>544</fileMode>
-	</fileSet>
-        <fileSet>
-                <outputDirectory>/</outputDirectory>
-                <directory>${project.build.directory}</directory>
-                <includes>
-                        <include>version</include>
-                </includes>
-				<fileMode>444</fileMode>
-        </fileSet>
+   <!-- conf.templates for enable -->
+    <fileSet>
+        <outputDirectory>/install/conf.templates/enable</outputDirectory>
+        <directory>knox-agent/conf</directory>
+        <excludes>
+            <exclude>*.sh</exclude>
+        </excludes>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/disable</outputDirectory>
+        <directory>knox-agent/disable-conf</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/default</outputDirectory>
+        <directory>knox-agent/template</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <!-- version file -->
+    <fileSet>
+        <outputDirectory>/</outputDirectory>
+        <directory>${project.build.outputDirectory}</directory>
+        <includes>
+            <include>version</include>
+        </includes>
+        <fileMode>444</fileMode>
+    </fileSet>
   </fileSets>
+  <!-- enable/disable script for agent -->
+  <files>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>enable-knox-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>disable-knox-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+        <source>knox-agent/scripts/install.properties</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>install.properties</destName>
+        <fileMode>755</fileMode>
+    </file>
+  </files>
 </assembly>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/031c8483/src/main/assembly/storm-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/storm-agent.xml b/src/main/assembly/storm-agent.xml
index 0c28750..62fa3ba 100644
--- a/src/main/assembly/storm-agent.xml
+++ b/src/main/assembly/storm-agent.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <assembly>
   <id>storm-agent</id> 
   <formats>
      <format>tar</format>
+	 <format>zip</format>
   </formats>
   <baseDirectory>${project.name}-${project.version}-storm-agent</baseDirectory>
   <includeBaseDirectory>true</includeBaseDirectory>
@@ -29,7 +29,7 @@
                 </includes>
             </dependencySet>
             <dependencySet>
-                    <outputDirectory>/cred/lib</outputDirectory>
+                    <outputDirectory>/install/lib</outputDirectory>
                     <unpack>false</unpack>
             		<directoryMode>755</directoryMode>
             		<fileMode>644</fileMode>
@@ -50,7 +50,7 @@
                     </includes>
             </dependencySet>
         </dependencySets>
-        <outputDirectory>/dist</outputDirectory>
+        <outputDirectory>/lib</outputDirectory>
      </binaries>
      <includes>
 		<include>security_agents.agents-audit:agents-audit</include>
@@ -63,52 +63,64 @@
     <moduleSet>
      <binaries>
         <includeDependencies>false</includeDependencies>
-        <outputDirectory>/installer/lib</outputDirectory>
+        <outputDirectory>/install/lib</outputDirectory>
         <unpack>false</unpack>
      </binaries>
      <includes>
 	<include>security_agents.agents-installer:agents-installer</include>
+	<include>com.hortonworks.hadoop.security:credentialbuilder</include>
      </includes>
     </moduleSet>
    </moduleSets>
-  <fileSets>
-	<fileSet>
-		<outputDirectory>/conf</outputDirectory>
-		<directory>storm-agent/conf</directory>
-		<excludes>
-			<exclude>*.cfg</exclude>
-		</excludes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/installer/conf</outputDirectory>
-		<directory>storm-agent/conf</directory>
-		<includes>
-			<include>*.cfg</include>
-		</includes>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>storm-agent/scripts</directory>
-		<excludes>
-			<exclude>*.sh</exclude>
-		</excludes>
-		<fileMode>700</fileMode>
-	</fileSet>
-	<fileSet>
-		<outputDirectory>/</outputDirectory>
-		<directory>storm-agent/scripts</directory>
-		<includes>
-			<include>*.sh</include>
-		</includes>
-		<fileMode>544</fileMode>
-	</fileSet>
-        <fileSet>
-                <outputDirectory>/</outputDirectory>
-                <directory>${project.build.directory}</directory>
-                <includes>
-                        <include>version</include>
-                </includes>
-				<fileMode>444</fileMode>
-        </fileSet>
+   <fileSets>
+   <!-- conf.templates for enable -->
+    <fileSet>
+        <outputDirectory>/install/conf.templates/enable</outputDirectory>
+        <directory>storm-agent/conf</directory>
+        <excludes>
+            <exclude>*.sh</exclude>
+        </excludes>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/disable</outputDirectory>
+        <directory>storm-agent/disable-conf</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <fileSet>
+        <outputDirectory>/install/conf.templates/default</outputDirectory>
+        <directory>storm-agent/template</directory>
+        <fileMode>700</fileMode>
+    </fileSet>
+    <!-- version file -->
+    <fileSet>
+        <outputDirectory>/</outputDirectory>
+        <directory>${project.build.outputDirectory}</directory>
+        <includes>
+            <include>version</include>
+        </includes>
+        <fileMode>444</fileMode>
+    </fileSet>
   </fileSets>
+  <!-- enable/disable script for agent -->
+ <files>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>enable-storm-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+		<source>agents-common/scripts/enable-agent.sh</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>disable-storm-agent.sh</destName>
+        <fileMode>755</fileMode>
+    </file>
+    <file>
+        <source>storm-agent/scripts/install.properties</source>
+        <outputDirectory>/</outputDirectory>
+        <destName>install.properties</destName>
+        <fileMode>755</fileMode>
+    </file>
+  </files>
 </assembly>


Mime
View raw message