Commit c26c9ed9 authored by tywldx's avatar tywldx

增加order-op-ui

parent e424983b
#!/bin/bash
project_type=$1
pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_server="$pwd_path/config_server"
project_path=`cat $config_server/project_path.sh`
config_path=`cat $config_server/config_path.sh`
node4_path=`cat $config_server/node_4_path.sh`
node7_path=`cat $config_server/node_7_path.sh`
profile=test
function restartJavaProject()
{
projects=(`node $config_server/get_project_config.js -type java -attr name`)
for project in ${projects[@]}
do
desc=`node $config_server/get_project_config.js -name $project -attr desc`
sh $config_server/show_info.sh $project 关闭 $desc
cd $project_path/$project
cd ./target
P_UUID=`ps -ef|grep ${project}.jar |grep -v 'grep'|awk '{print $2}'`
if [ -n "${P_UUID}" ];then
echo "-----KILL $project PPID=${P_UUID}"
echo `kill -9 ${P_UUID}`
fi
done
}
function restartNodeProject()
{
projects=(`node $config_server/get_project_config.js -type node -attr name`)
for project in ${projects[@]}
do
desc=`node $config_server/get_project_config.js -name $project -attr desc`
sh $config_server/show_info.sh $project 关闭 $desc
cd $project_path/$project
forever stop $project
forever stop $project-www
done
}
function restartPythonProject()
{
projects=(`node $config_server/get_project_config.js -type python -attr name`)
for project in ${projects[@]}
do
desc=`node $config_server/get_project_config.js -name $project -attr desc`
sh $config_server/show_info.sh $project 关闭 $desc
cd $project_path/$project
setup_path_temp=`find ./ -name "run.py"`
python_project_path=$project_path/$project${setup_path_temp/\.\//\/}
P_UUID=`ps -ef|grep $project |grep -v 'grep'|awk '{print $2}'`
if [[ "${P_UUID}" != "" ]];then
echo "-----KILL $project PPID=${P_UUID}"
echo `kill -9 ${P_UUID}`
fi
done
}
function restartUiProject()
{
nginx -t; nginx -s reload
}
if [ "$project_type" = "java" ]; then
restartJavaProject
elif [ "$project_type" = "node" ]; then
restartNodeProject
elif [ "$project_type" = "python" ]; then
restartPythonProject
elif [ "$project_type" = "ui" ]; then
restartUiProject
else
restartJavaProject
restartNodeProject
restartPythonProject
restartUiProject
fi
......@@ -18,7 +18,7 @@ var users = [{}, {
var pClass = function() {};
pClass.prototype = {
init: function(isActive, projectType, port, projectName, gitPath, logName, configFile, command, nodeVersion, userIndex, desc,auth) {
init: function(isActive, projectType, port, projectName, gitPath, logName, configFile, command, nodeVersion, userIndex, desc, auth) {
this.name = projectName;
this.type = projectType;
this.git_path = "http://" + users[userIndex].name + ":" + users[userIndex].pwd + "@gitabc.xyqb.com/" + gitPath + "/" + projectName + ".git"
......@@ -67,7 +67,7 @@ new pClass().init(true, "java", "7038", "merchant-backend", "QG", "merchant.log"
new pClass().init(true, "java", "7031", "redpacket", "QG", "redpacket.log", "application.properties", null, null, 2, "红包系统-server");
new pClass().init(true, "java", "7044", "finance-api", "bo.wang", "finance-api.log", "application.properties", null, null, 2, "财务系统-server");
new pClass().init(true, "java", "7045", "check-accounts", "QG", "check_accounts.log", "application.properties", null, null, 2, "对账系统-server");
new pClass().init(true, "java", "7014", "du-jiang-yan", "QG", "du_jiang_yan.log", "application.properties", null, null, 2, "第三方对接-server");
new pClass().init(true, "java", "7014", "du-jiang-yan", "QG", "du_jiang_yan.log", "application.properties", null, null, 2, "第三方对接导流-server");
// new pClass(true,"java","7027","sms-center","QG","sms-center.log",null,null,null,"短信中心-server");
// ui----
// projectName,projectType,port,gitPath,logName,configFile,command,nodeVersion
......@@ -85,10 +85,11 @@ new pClass().init(true, "ui", "7020", "spider-center-ui", "QG", null, "src/app/c
new pClass().init(true, "ui", "7002", "qgbc-ui", "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "现金贷和白条-白条-ui");
new pClass().init(true, "ui", "7001", "xyqb-ui", "QG", null, "client/app/config.js", "grunt build", "node4", 1, "现金贷和白条-现金贷-ui");
new pClass().init(true, "ui", "7046", "activity-op-ui", "QG", null, "src/js/env.config.js", "gulp build", "node7", 1, "优惠券管理后台-ui");
new pClass().init(true, "ui", "7048", "order-op-ui", "OP", null, "src/js/env.config.js", "gulp build", "node7", 1, "订单系统-ui");
// node
new pClass().init(true, "node", "7018", "AppBackend", "QG", null, "config/environment/test.js", null, null, 1, "APP后台服务-server");
new pClass().init(true, "node", "7041", "activity-op", "QG", null, "src/config.js", null, null, 1, "优惠券中心-server");
new pClass().init(true, "node", "9050", "op-api", "OP", null, "src/config.js", null, null, 1, "系统Api Gateway-server");
new pClass().init(true, "node", "7018", "AppBackend", "QG", null, "config/environment/test.js", "forever start -a -s --uid AppBackend bin/www", null, 1, "APP后台服务-server");
new pClass().init(true, "node", "7041", "activity-op", "QG", null, "src/config.js", "forever start -a -s --uid activity-op src/app.js", null, 1, "优惠券中心-server");
new pClass().init(true, "node", "9050", "op-api", "OP", null, "src/config.js", "pm2 start ./bin/server.js --node-args=\"--harmony\" -n op-api", null, 1, "系统Api Gateway-server");
//python
new pClass().init(true, "python", "7022", "qin-qiong", "QG", null, "config/beta/config.properties", null, null, 1, "加密解密-server");
new pClass().init(true, "python", "7033", "xyqb-query", "QG", null, "server/config/beta/config.ini", null, null, 1, "query-server");
......
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