Commit 4ff2eda2 authored by kewei.jia's avatar kewei.jia

qke java

parent fc7bfefc
#!/bin/bash
echo "start run java"
echo $NAMESPACE
current="/home/quant_group"
echo "current: ${current}"
echo "NAMESPACE is $NAMESPACE"
......@@ -13,7 +13,11 @@ config_path="${module_path}/application.properties"
log_path="/home/quant_group/logs"
echo 192.168.4.50 eos.quantgroups.com >> /etc/hosts
echo 172.17.1.7 apollo-dev.quantgroups.com >> /etc/hosts
if [[ $CLUSTER == 'qke' ]]; then
echo 172.30.3.209 apollo-dev.quantgroups.com >> /etc/hosts
else
echo 172.17.1.7 apollo-dev.quantgroups.com >> /etc/hosts
fi
echo 172.20.3.11 sentry.quantgroups.com >> /etc/hosts
# echo 172.30.3.206 apollo-dev.quantgroups.com >> /etc/hosts
......@@ -28,7 +32,9 @@ sed -i "s#.domain.com#-$NAMESPACE.liangkebang.net#g" ${config_path}
# sed -i "s#xterm.js demo#${SYSTEM_NAME}@${NAMESPACE}#" /home/qg-xterm/demo/index.html
namespace="$NAMESPACE"
cluster="$CLUSTER"
echo "namespace is $namespace"
echo "cluster is $cluster"
echo "unset NAMESPACE" >> ~/.bashrc
echo "alias log='cd logs;tail -500f *log';" >> ~/.bashrc
source ~/.bashrc
......@@ -37,8 +43,14 @@ source ~/.bashrc
basicCmd="java -Xmx512m -XX:CompressedClassSpaceSize=128m -Xloggc:/tmp/${module_name}_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dtest=true"
basicRichCmd="java -Xmx1024m -XX:CompressedClassSpaceSize=128m -Xloggc:/tmp/${module_name}_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dtest=true"
debugCmd="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
apolloCmd="-Denv=dev -Didc=k8s -DNAMESPACE=${namespace} -Dapollo.longPollingInitialDelayInMills=200000"
apolloMockCmd="-Denv=dev -Didc=k8s-mock -DNAMESPACE=${namespace} -Dapollo.longPollingInitialDelayInMills=200000"
if [[ $CLUSTER == 'qke' ]]; then
apolloCmd="-Denv=dev -Didc=k8s -DNAMESPACE=${NAMESPACECLUSTER} -Dapollo.longPollingInitialDelayInMills=200000"
apolloMockCmd="-Denv=dev -Didc=k8s-mock -DNAMESPACE=${NAMESPACECLUSTER} -Dapollo.longPollingInitialDelayInMills=200000"
else
apolloCmd="-Denv=dev -Didc=k8s -DNAMESPACE=${namespace} -Dapollo.longPollingInitialDelayInMills=200000"
apolloMockCmd="-Denv=dev -Didc=k8s-mock -DNAMESPACE=${namespace} -Dapollo.longPollingInitialDelayInMills=200000"
fi
# -jar选项需要在调试和apollo选项后面
jarCmd="-jar ${package_path} --worker 1 --currentWorker 1 -t --server.port=80"
logCmd="-Dlogging.config=classpath:logback-dev.xml"
......@@ -79,7 +91,7 @@ if [[ $DEBUG == 1 ]]; then
nohup $finalCmd &
tail -f ~/.bashrc
else
nohup $finalCmd
nohup $finalCmd
fi
echo done!
\ No newline at end of file
echo done!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment