You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/01/23 09:30:53 UTC

[12/51] [abbrv] incubator-kylin git commit: KYLIN-544 further simply deploy script by disabling remote cli, so that there's no need to prompt for password

KYLIN-544 further simply deploy script by disabling remote cli, so that there's no need to prompt for password


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/08fb8a8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/08fb8a8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/08fb8a8a

Branch: refs/heads/staging
Commit: 08fb8a8af441705e55cb871aacbd0bf4f1c18e38
Parents: a493fee
Author: honma <ho...@ebay.com>
Authored: Tue Jan 20 17:05:00 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Tue Jan 20 17:05:00 2015 +0800

----------------------------------------------------------------------
 .../test_case_data/sandbox/kylin.properties     | 10 +++---
 sandbox_deploy.sh                               | 34 ++++++--------------
 2 files changed, 14 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/08fb8a8a/examples/test_case_data/sandbox/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties
index 5f19add..718d8cc 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -1,7 +1,7 @@
 ## Config for Kylin Engine ##
 
 # List of web servers in use, this enables one web server instance to sync up with other servers.
-kylin.rest.servers=sandbox.hortonworks.com:7070
+kylin.rest.servers=sandbox:7070
 
 # The metadata store in hbase
 kylin.metadata.url=kylin_metadata_qa@hbase
@@ -22,16 +22,16 @@ kylin.job.mapreduce.default.reduce.input.mb=500
 
 # If true, job engine will not assume that hadoop CLI reside on the same server as it self
 # you will have to specify kylin.job.remote.cli.hostname, kylin.job.remote.cli.username and kylin.job.remote.cli.password
-kylin.job.run.as.remote.cmd=true
+kylin.job.run.as.remote.cmd=false
 
 # Only necessary when kylin.job.run.as.remote.cmd=true
-kylin.job.remote.cli.hostname=sandbox.hortonworks.com
+kylin.job.remote.cli.hostname=
 
 # Only necessary when kylin.job.run.as.remote.cmd=true
-kylin.job.remote.cli.username=root
+kylin.job.remote.cli.username=
 
 # Only necessary when kylin.job.run.as.remote.cmd=true
-kylin.job.remote.cli.password=hadoop
+kylin.job.remote.cli.password=
 
 # Used by test cases to prepare synthetic data for sample cube
 kylin.job.remote.cli.working.dir=/tmp/kylin

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/08fb8a8a/sandbox_deploy.sh
----------------------------------------------------------------------
diff --git a/sandbox_deploy.sh b/sandbox_deploy.sh
index 8b55efd..51c5de8 100755
--- a/sandbox_deploy.sh
+++ b/sandbox_deploy.sh
@@ -122,38 +122,22 @@ cd $KYLIN_HOME
 mkdir -p /etc/kylin
 
 HOSTNAME=`hostname`
-CLI_HOSTNAME_DEFAULT="kylin.job.remote.cli.hostname=sandbox.hortonworks.com"
-CLI_PASSWORD_DEFAULT="kylin.job.remote.cli.password=hadoop"
-CHECK_URL_DEFAULT="kylin.job.yarn.app.rest.check.status.url=http://sandbox"
-
-
-NEW_CLI_HOSTNAME_PREFIX="kylin.job.remote.cli.hostname="
-NEW_CLI_PASSWORD_PREFIX="kylin.job.remote.cli.password="
+DEFAULT_CHECK_URL="kylin.job.yarn.app.rest.check.status.url=http://sandbox"
+DEFAULT_SERVER_LIST="kylin.rest.servers=sandbox"
 NEW_CHECK_URL_PREFIX="kylin.job.yarn.app.rest.check.status.url=http://"
-
-echo "Kylin install script requires root password for ${HOSTNAME}"
-echo "(The default root password for hortonworks VM is hadoop, and for cloudera VM is cloudera)"
-
-[[ "$SILENT" ]] || read -r -s -p  "Enter Password for root: " ROOTPASS
+NEW_SERVER_LIST_PREFIX="kylin.rest.servers="
 
 #escape special characters for sed
-CHECK_URL_DEFAULT=$(escape_sed_pattern $CHECK_URL_DEFAULT)
-CLI_HOSTNAME_DEFAULT=$(escape_sed_pattern $CLI_HOSTNAME_DEFAULT)
-CLI_PASSWORD_DEFAULT=$(escape_sed_pattern $CLI_PASSWORD_DEFAULT)
-
+DEFAULT_CHECK_URL=$(escape_sed_pattern $DEFAULT_CHECK_URL)
+DEFAULT_SERVER_LIST=$(escape_sed_pattern $DEFAULT_SERVER_LIST)
 NEW_CHECK_URL_PREFIX=$(escape_sed_replacement $NEW_CHECK_URL_PREFIX)
-NEW_CLI_HOSTNAME_PREFIX=$(escape_sed_replacement $NEW_CLI_HOSTNAME_PREFIX)
-NEW_CLI_PASSWORD_PREFIX=$(escape_sed_replacement $NEW_CLI_PASSWORD_PREFIX)
+NEW_SERVER_LIST_PREFIX=$(escape_sed_replacement $NEW_SERVER_LIST_PREFIX)
 HOSTNAME=$(escape_sed_replacement $HOSTNAME)
-ROOTPASS=$(escape_sed_replacement $ROOTPASS)
-
-
 
 #deploy kylin.properties to /etc/kylin
 cat examples/test_case_data/sandbox/kylin.properties | \
-    sed -e "s/${CHECK_URL_DEFAULT}/${NEW_CHECK_URL_PREFIX}${HOSTNAME}/g" | \
-    sed -e "s/${CLI_HOSTNAME_DEFAULT}/${NEW_CLI_HOSTNAME_PREFIX}${HOSTNAME}/g" | \
-    sed -e "s/${CLI_PASSWORD_DEFAULT}/${NEW_CLI_PASSWORD_PREFIX}${ROOTPASS}/g" >  /etc/kylin/kylin.properties
+    sed -e "s/${DEFAULT_CHECK_URL}/${NEW_CHECK_URL_PREFIX}${HOSTNAME}/g"  | \
+    sed -e "s/${DEFAULT_SERVER_LIST}/${NEW_SERVER_LIST_PREFIX}${HOSTNAME}/g"   >  /etc/kylin/kylin.properties
 
 
 echo "a copy of kylin config is generated at /etc/kylin/kylin.properties:"
@@ -163,7 +147,7 @@ echo ""
 echo "==================================================================="
 echo ""
 
-[[ "$SILENT" ]] || ( read -p "please ensure the CLI address/username/password is correct, and press y to proceed: " -n 1 -r
+[[ "$SILENT" ]] || ( read -p "please ensure the configuration is correct, and press y to proceed: " -n 1 -r
 echo    # (optional) move to a new line
 if [[ ! $REPLY =~ ^[Yy]$ ]]
 then