Skip to content

Commit

Permalink
1.Automated installation enhancements.
Browse files Browse the repository at this point in the history
2.Adapt to linkis changes.
3.Add jdbc node type.
4.Resolving module dependency conflicts
close #79 #80 #81 #82
  • Loading branch information
chaogefeng authored and yangzhiyue committed Jan 13, 2020
1 parent d74b8aa commit 4e35305
Show file tree
Hide file tree
Showing 43 changed files with 801 additions and 313 deletions.
45 changes: 45 additions & 0 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,51 @@
<artifactId>jackson-core</artifactId>
<version>2.9.6</version>
</dependency>
<dependency>
<groupId>net.databinder.dispatch</groupId>
<artifactId>dispatch-core_2.11</artifactId>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>net.databinder.dispatch</groupId>
<artifactId>dispatch-json4s-jackson_2.11</artifactId>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core</artifactId>
<version>3.1.0-incubating</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.7</version>
</dependency>
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.8.10</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
<version>1.8.0</version>
</dependency>
</dependencies>

<artifactId>dss-assembly</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions bin/checkEnv.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
#
# Copyright 2019 WeBank
#
Expand All @@ -13,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
#!/bin/sh
say() {
printf 'check command fail \n %s\n' "$1"
}
Expand All @@ -32,7 +32,7 @@ need_cmd() {
err "need '$1' (your linux command not found)"
fi
}
echo "<-----start to check linux cmd:yum java mysql unzip expect telnet sed tar---->"
echo "<-----start to check used cmd---->"
need_cmd yum
need_cmd java
need_cmd mysql
Expand All @@ -42,4 +42,4 @@ need_cmd telnet
need_cmd tar
need_cmd sed
need_cmd dos2unix
echo "<-----end to check linux cmd:yum java mysql unzip expect telnet sed tar------>"
echo "<-----end to check used cmd---->"
59 changes: 50 additions & 9 deletions bin/checkMicro.sh → bin/checkServices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,59 @@ shellDir=`dirname $0`
workDir=`cd ${shellDir}/..;pwd`

##load config
source ${workDir}/conf/config.sh
source ${workDir}/conf/db.sh
export LINKIS_DSS_CONF_FILE=${LINKIS_DSS_CONF_FILE:-"${workDir}/conf/config.sh"}
export DISTRIBUTION=${DISTRIBUTION:-"${workDir}/conf/config.sh"}
source ${LINKIS_DSS_CONF_FILE}
source ${DISTRIBUTION}

MICRO_SERVICE_NAME=$1
MICRO_SERVICE_IP=$2
MICRO_SERVICE_PORT=$3
echo "<--------------------------------------------------------------------------->"
echo "Start to Check if your microservice:$MICRO_SERVICE_NAME is normal via telnet"
echo ""
if [ ! -d $DSS_INSTALL_HOME/$MICRO_SERVICE_NAME ];then
echo "$MICRO_SERVICE_NAME is not installed,the check steps will be skipped"
exit 0

local_host="`hostname --fqdn`"

ipaddr="`hostname -i`"

function isLocal(){
if [ "$1" == "127.0.0.1" ];then
return 0
elif [ $1 == "localhost" ]; then
return 0
elif [ $1 == $local_host ]; then
return 0
elif [ $1 == $ipaddr ]; then
return 0
fi
return 1
}

function executeCMD(){
isLocal $1
flag=$?
echo "Is local "$flag
if [ $flag == "0" ];then
eval $2
else
ssh -p $SSH_PORT $1 $2
fi

}

#echo "<--------------------------------------------------------------------------->"
#echo "Start to Check if your microservice:$MICRO_SERVICE_NAME is normal via telnet"
#echo ""
#if ! executeCMD $SERVER_IP "test -e $DSS_INSTALL_HOME/$MICRO_SERVICE_NAME"; then
# echo "$MICRO_SERVICE_NAME is not installed,the check steps will be skipped"
# exit 0
#fi
echo "==========================================================="
echo $MICRO_SERVICE_NAME
echo $MICRO_SERVICE_IP
echo $MICRO_SERVICE_PORT
echo "==========================================================="

if [ $MICRO_SERVICE_NAME == "visualis-server" ]||[ $MICRO_SERVICE_IP == "127.0.0.1" ]; then
MICRO_SERVICE_IP="`hostname -i`"
fi

result=`echo -e "\n" | telnet $MICRO_SERVICE_IP $MICRO_SERVICE_PORT 2>/dev/null | grep Connected | wc -l`
Expand All @@ -42,7 +83,7 @@ else
echo "ERROR your $MICRO_SERVICE_NAME microservice is not start successful !!! ERROR logs as follows :"
echo "PLEAESE CHECK DETAIL LOG,LOCATION:$DSS_INSTALL_HOME/$MICRO_SERVICE_NAME/logs/linkis.out"
echo '<------------------------------------------------------------->'
tail -n 50 $DSS_INSTALL_HOME/$MICRO_SERVICE_NAME/logs/*.out
executeCMD $MICRO_SERVICE_IP "tail -n 50 $DSS_INSTALL_HOME/$MICRO_SERVICE_NAME/logs/*.out"
echo '<-------------------------------------------------------------->'
echo "PLEAESE CHECK DETAIL LOG,LOCATION:$DSS_INSTALL_HOME/$MICRO_SERVICE_NAME/logs/linkis.out"
exit 1
Expand Down
Loading

0 comments on commit 4e35305

Please sign in to comment.