Commit d74d2c4f authored by tywldx's avatar tywldx

change DB

parent 308aecc7
......@@ -12,58 +12,74 @@ db_sub_backup_folder=$3
re_replace_ip=$4
public_ip="www.q-gp.com"
ip_last=$5
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`
echo $server_host
cd $db_sub_backup_folder
file_count=`ls -l |grep "^-"|wc -l`
hosts=`node $config_server/get_project_config.js`
function transByPort()
{
if [ -n "$3" ];then
echo "$1 $2 $3 $4"
# sed -i "s/\/$3/\/$1-$ip_last.q-gp.com/g" $4
fi
}
function transByUrl()
{
if [ -n "$3" ];then
echo "$1 $2 $3 $4"
# sed -i "s/\/$3/\/${server_host}:$2/g" $4
fi
}
echo "./* file count is $file_count"
if [ "$file_count" -gt 0 ]; then
for entry in ./*
do
echo "is replace ip for db_back_file $entry"
sed -i "s/http\:\/\/m.xyqb.com/http\:\/\/${server_host}:7001/g" $entry
sed -i "s/https\:\/\/m.xyqb.com/http\:\/\/${server_host}:7001/g" $entry
sed -i "s/http\:\/\/bt.xyqb.com/http\:\/\/${server_host}:7050/g" $entry
sed -i "s/https\:\/\/bt.xyqb.com/http\:\/\/${server_host}:7050/g" $entry
sed -i "s/http\:\/\/api.xyqb.com/http\:\/\/${server_host}:7003/g" $entry
sed -i "s/https\:\/\/api.xyqb.com/http\:\/\/${server_host}:7003/g" $entry
sed -i "s/http\:\/\/r.xyqb.com/http\:\/\/${server_host}:7004/g" $entry
sed -i "s/https\:\/\/r.xyqb.com/http\:\/\/${server_host}:7004/g" $entry
sed -i "s/http\:\/\/rapi.xyqb.com/http\:\/\/${server_host}:7005/g" $entry
sed -i "s/https\:\/\/rapi.xyqb.com/http\:\/\/${server_host}:7005/g" $entry
sed -i "s/http\:\/\/payapi.xyqb.com/http\:\/\/${server_host}:7006/g" $entry
sed -i "s/https\:\/\/payapi.xyqb.com/http\:\/\/${server_host}:7006/g" $entry
sed -i "s/http\:\/\/pay.xyqb.com/http\:\/\/${server_host}:7007/g" $entry
sed -i "s/https\:\/\/pay.xyqb.com/http\:\/\/${server_host}:7007/g" $entry
sed -i "s/http\:\/\/off.xyqb.com/http\:\/\/${server_host}:7008/g" $entry
sed -i "s/https\:\/\/off.xyqb.com/http\:\/\/${server_host}:7008/g" $entry
sed -i "s/http\:\/\/offapi.xyqb.com/http\:\/\/${server_host}:7010/g" $entry
sed -i "s/https\:\/\/offapi.xyqb.com/http\:\/\/${server_host}:7010/g" $entry
sed -i "s/http\:\/\/financial.xyqb.com/http\:\/\/${server_host}:7011/g" $entry
sed -i "s/https\:\/\/financial.xyqb.com/http\:\/\/${server_host}:7011/g" $entry
sed -i "s/http\:\/\/fsapi.xyqb.com/http\:\/\/${server_host}:7012/g" $entry
sed -i "s/https\:\/\/fsapi.xyqb.com/http\:\/\/${server_host}:7012/g" $entry
sed -i "s/http\:\/\/auth.xyqb.com/http\:\/\/${server_host}:7013/g" $entry
sed -i "s/https\:\/\/auth.xyqb.com/http\:\/\/${server_host}:7013/g" $entry
sed -i "s/http\:\/\/qapi.xyqb.com/http\:\/\/${server_host}:7014/g" $entry
sed -i "s/https\:\/\/qapi.xyqb.com/http\:\/\/${server_host}:7014/g" $entry
sed -i "s/http\:\/\/mallapi.xyqb.com/http\:\/\/${server_host}:7019/g" $entry
sed -i "s/https\:\/\/mallapi.xyqb.com/http\:\/\/${server_host}:7019/g" $entry
sed -i "s/http\:\/\/scapi.xyqb.com/http\:\/\/${server_host}:7021/g" $entry
sed -i "s/https\:\/\/scapi.xyqb.com/http\:\/\/${server_host}:7021/g" $entry
sed -i "s/http\:\/\/gyxdapi.xyqb.com/http\:\/\/${server_host}:7029/g" $entry
sed -i "s/https\:\/\/gyxdapi.xyqb.com/http\:\/\/${server_host}:7029/g" $entry
sed -i "s/http\:\/\/btapi.xyqb.com/http\:\/\/${server_host}:7025/g" $entry
sed -i "s/https\:\/\/btapi.xyqb.com/http\:\/\/${server_host}:7025/g" $entry
done
if [ "$re_replace_ip" = true ]; then
for entry in ./*
do
sed -i "s/https\:/http\:/g" $entry
if [ "$re_replace_ip" = true ]; then
echo "is replace public ip for $entry"
sed -i "s/${server_host}/${public_ip}/g" $entry
sed -i "s/\:70/:${ip_last}/g" $entry
done
fi
for host in $hosts
do
arr=${host//|/ }
transByPort $arr $entry
done
else
echo "is replace ip for db_back_file $entry"
for host in $hosts
do
arr=${host//|/ }
transByUrl $arr $entry
done
fi
done
fi
# sed -i "s/\/m.xyqb.com/\/xyqb-ui-$ip_last.q-gp.com/g" $entry
# sed -i "s/\/bt.xyqb.com/\/${server_host}:7050/g" $entry
# sed -i "s/\/api.xyqb.com/\/${server_host}:7003/g" $entry
# sed -i "s/\/r.xyqb.com/\/${server_host}:7004/g" $entry
# sed -i "s/\/rapi.xyqb.com/\/${server_host}:7005/g" $entry
# sed -i "s/\/payapi.xyqb.com/\/${server_host}:7006/g" $entry
# sed -i "s/\/pay.xyqb.com/\/${server_host}:7007/g" $entry
# sed -i "s/\/off.xyqb.com/\/${server_host}:7008/g" $entry
# sed -i "s/\/offapi.xyqb.com/\/${server_host}:7010/g" $entry
# sed -i "s/\/financial.xyqb.com/\/${server_host}:7011/g" $entry
# sed -i "s/\/fsapi.xyqb.com/\/${server_host}:7012/g" $entry
# sed -i "s/\/auth.xyqb.com/\/${server_host}:7013/g" $entry
# sed -i "s/\/qapi.xyqb.com/\/${server_host}:7014/g" $entry
# sed -i "s/\/mallapi.xyqb.com/\/${server_host}:7019/g" $entry
# sed -i "s/\/scapi.xyqb.com/\/${server_host}:7021/g" $entry
# sed -i "s/\/gyxdapi.xyqb.com/\/${server_host}:7029/g" $entry
# sed -i "s/\/btapi.xyqb.com/\/${server_host}:7025/g" $entry
\ No newline at end of file
......@@ -16,11 +16,12 @@ var users = [{}, {
pwd: "quantgroup.com"
}];
var pClass = function () {};
var pClass = function() {};
pClass.prototype = {
init: function (isActive, projectType, port, projectName, ssh_git, gitPath, logName, configFile, command, nodeVersion, userIndex, desc, auth, command2, java_target_path) {
init: function(isActive, projectType, port, url, projectName, ssh_git, gitPath, logName, configFile, command, nodeVersion, userIndex, desc, auth, command2, java_target_path) {
this.name = projectName;
this.type = projectType;
this.url=url;
if (!ssh_git) {
this.git_path = "http://" + users[userIndex].name + ":" + users[userIndex].pwd + "@gitabc.xyqb.com/" + gitPath + "/" + projectName + ".git"
} else {
......@@ -39,103 +40,103 @@ pClass.prototype = {
this.target_path = java_target_path;
projects[projectName] = this;
switch (projectType) {
case "java":
this.command = "java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/" + projectName + ".log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar " + projectName + ".jar " + command;
java_projects.push(this);
if (this.target_path == ""){
this.target_path = "./target"
}
break;
case "node":
this.command = command;
node_projects.push(this);
break;
case "ui":
this.command = command;
ui_projects.push(this);
break;
case "python":
this.command = command;
python_projects.push(this);
break;
case "java":
this.command = "java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/" + projectName + ".log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar " + projectName + ".jar " + command;
java_projects.push(this);
if (this.target_path == "") {
this.target_path = "./target"
}
break;
case "node":
this.command = command;
node_projects.push(this);
break;
case "ui":
this.command = command;
ui_projects.push(this);
break;
case "python":
this.command = command;
python_projects.push(this);
break;
}
}
}
// --java
new pClass().init(true, "java", "7003", "xyqb", false, "QG", "xyqb.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "现金贷-server", "","","");
new pClass().init(true, "java", "7025", "baitiao", true, "baitiao", "baitiao.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条-server", "","","./baitiao-api/target");
new pClass().init(true, "java", "7019", "xyqb-mall", false, "QG", "mall.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "商城后台-server", "","","");
new pClass().init(true, "java", "7010", "xyqb-offline", false, "QG", "xyqb_offline.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "线下业务-server", "","","");
new pClass().init(true, "java", "7042", "xyqb-user2", true, "head_group", "xyqb_user.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户注册登录-V2-server", "","","");
new pClass().init(true, "java", "7005", "di-ting", false, "QG", "di_ting.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "风控审计-server", "","","");
new pClass().init(true, "java", "7013", "han-gu-guan", false, "QG", "han-gu-guan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户注册登录-V1-server", "","","");
new pClass().init(true, "java", "7015", "jian-men-guan", false, "QG", "jian_men_guan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "信审服务-server", "","","");
new pClass().init(true, "java", "7028", "black-hole", false, "QG", "black-hole.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "合同中心-server", "","","");
new pClass().init(true, "java", "7006", "gu-bei", false, "funding", "pay-center.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "支付中心-server", "","","");
new pClass().init(true, "java", "7023", "xyqb-quartz", false, "QG", "quartz.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "定时任务-server", "","","");
new pClass().init(true, "java", "7021", "spider-center", false, "QG", "spider-center.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "授信-server", "","","");
new pClass().init(true, "java", "7037", "cash-loan-flow", false, "QG", "cash_loan_flow.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "现金贷流量对接-server", "","","");
new pClass().init(true, "java", "7012", "financial-system", false, "QG", "financial_system.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "财务系统-server", "","","");
new pClass().init(false, "java", "7034", "fund-manage", false, "QG", "fund_manage.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "债转系统-server", "","","");
new pClass().init(false, "java", "7029", "gyxd", false, "QG", "gyxd.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "广源小贷-server", "","","");
new pClass().init(true, "java", "7038", "merchant-backend", false, "QG", "merchant.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "商户后台-server", "凌子华/陈东亮","","");
new pClass().init(true, "java", "7031", "redpacket", true, "baitiao", "redpacket.log", "application.properties", "--worker 1 --currentWorker 1 -t > /dev/null 2>&1 &", null, 2, "红包系统-server", "","","");
new pClass().init(false, "java", "7044", "finance-api", false, "bo.wang", "finance-api.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "财务系统-server", "","","");
new pClass().init(false, "java", "7045", "check-accounts", false, "QG", "check_accounts.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "对账系统-server", "","","");
new pClass().init(true, "java", "7014", "du-jiang-yan", false, "QG", "du_jiang_yan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "第三方对接导流-server", "","","");
new pClass().init(false, "java", "7051", "msg", false, "micro-service", "msg.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "新版消息中心", "","","");
new pClass().init(false, "java", "7052", "xyqb-btzt", true, "qg-op-backend", "xyqb-btzt.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投外部", "","","");
new pClass().init(false, "java", "7053", "xyqb-btzt-internal", true, "qg-op-backend", "xyqb-btzt-internal.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投内部", "","","");
new pClass().init(false, "java", "7060", "xyqb-backend", true, "qg-op-backend", "xyqb-backend.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "运营系统服务", "","","");
new pClass().init(true, "java", "7062", "xyqb-user2-query", true, "head_group", "xyqb_user_query.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户系统查询服务", "","","");
new pClass().init(false, "java", "7063", "traffic-webapp", true, "qg-op-backend", "traffic.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "流量分发系统", "","","");
new pClass().init(false, "java", "7017", "silk-road-eureka", true, "baitiao", "silk-road-eureka.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "Eureka 服务注册发现微服务", "魏巍","","");
new pClass().init(false, "java", "7027", "silk-road-caller", true, "baitiao", "silk-road-caller.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "MQ消息调用中心微服务", "魏巍","","");
new pClass().init(false, "java", "7056", "score", true, "baitiao", "score.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "积分系统", "刑志超","","");
new pClass().init(false, "java", "7065", "silk-road-backman", true, "baitiao", "silk-road-backman.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对内系统2", "张曙","","");
new pClass().init(false, "java", "7066", "silk-road", true, "baitiao", "silk-road.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对外系统2", "魏巍","","");
new pClass().init(false, "java", "7059", "baitiao-zhitou", true, "baitiao", "baitiao-zhitou.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对接资金方", "张斌","","./xyqb-btzt-internal/target/");
new pClass().init(false, "java", "7068", "customer_helpdesk", true, "data-riskcontrol", "customer_helpdesk.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "外部客服-server", "","","");
// --java
new pClass().init(true, "java", "7003", "api.xyqb.com", "xyqb", false, "QG", "xyqb.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "现金贷-server", "", "", "");
new pClass().init(true, "java", "7025", "btapi.xyqb.com", "baitiao", true, "baitiao", "baitiao.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条-server", "", "", "./baitiao-api/target");
new pClass().init(true, "java", "7019", "mallapi.xyqb.com", "xyqb-mall", false, "QG", "mall.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "商城后台-server", "", "", "");
new pClass().init(true, "java", "7010", "offapi.xyqb.com", "xyqb-offline", false, "QG", "xyqb_offline.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "线下业务-server", "", "", "");
new pClass().init(true, "java", "7042", "", "xyqb-user2", true, "head_group", "xyqb_user.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户注册登录-V2-server", "", "", "");
new pClass().init(true, "java", "7005", "rapi.xyqb.com", "di-ting", false, "QG", "di_ting.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "风控审计-server", "", "", "");
new pClass().init(true, "java", "7013", "auth.xyqb.com", "han-gu-guan", false, "QG", "han-gu-guan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户注册登录-V1-server", "", "", "");
new pClass().init(true, "java", "7015", "", "jian-men-guan", false, "QG", "jian_men_guan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "信审服务-server", "", "", "");
new pClass().init(true, "java", "7028", "", "black-hole", false, "QG", "black-hole.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "合同中心-server", "", "", "");
new pClass().init(true, "java", "7006", "payapi.xyqb.com", "gu-bei", false, "funding", "pay-center.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "支付中心-server", "", "", "");
new pClass().init(true, "java", "7023", "", "xyqb-quartz", false, "QG", "quartz.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "定时任务-server", "", "", "");
new pClass().init(true, "java", "7021", "scapi.xyqb.com", "spider-center", false, "QG", "spider-center.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "授信-server", "", "", "");
new pClass().init(true, "java", "7037", "qapi.xyqb.com", "cash-loan-flow", false, "QG", "cash_loan_flow.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "现金贷流量对接-server", "", "", "");
new pClass().init(true, "java", "7012", "fsapi.xyqb.com", "financial-system", false, "QG", "financial_system.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "财务系统-server", "", "", "");
new pClass().init(false, "java", "7034", "", "fund-manage", false, "QG", "fund_manage.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "债转系统-server", "", "", "");
new pClass().init(false, "java", "7029", "gyxdapi.xyqb.com", "gyxd", false, "QG", "gyxd.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "广源小贷-server", "", "", "");
new pClass().init(true, "java", "7038", "", "merchant-backend", false, "QG", "merchant.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "商户后台-server", "凌子华/陈东亮", "", "");
new pClass().init(true, "java", "7031", "", "redpacket", true, "baitiao", "redpacket.log", "application.properties", "--worker 1 --currentWorker 1 -t > /dev/null 2>&1 &", null, 2, "红包系统-server", "", "", "");
new pClass().init(false, "java", "7044", "", "finance-api", false, "bo.wang", "finance-api.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "财务系统-server", "", "", "");
new pClass().init(false, "java", "7045", "", "check-accounts", false, "QG", "check_accounts.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "对账系统-server", "", "", "");
new pClass().init(true, "java", "7014", "", "du-jiang-yan", false, "QG", "du_jiang_yan.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "第三方对接导流-server", "", "", "");
new pClass().init(false, "java", "7051", "", "msg", false, "micro-service", "msg.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "新版消息中心", "", "", "");
new pClass().init(false, "java", "7052", "", "xyqb-btzt", true, "qg-op-backend", "xyqb-btzt.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投外部", "", "", "");
new pClass().init(false, "java", "7053", "", "xyqb-btzt-internal", true, "qg-op-backend", "xyqb-btzt-internal.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投内部", "", "", "");
new pClass().init(false, "java", "7060", "", "xyqb-backend", true, "qg-op-backend", "xyqb-backend.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "运营系统服务", "", "", "");
new pClass().init(true, "java", "7062", "", "xyqb-user2-query", true, "head_group", "xyqb_user_query.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "用户系统查询服务", "", "", "");
new pClass().init(false, "java", "7063", "", "traffic-webapp", true, "qg-op-backend", "traffic.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "流量分发系统", "", "", "");
new pClass().init(false, "java", "7017", "", "silk-road-eureka", true, "baitiao", "silk-road-eureka.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "Eureka 服务注册发现微服务", "魏巍", "", "");
new pClass().init(false, "java", "7027", "", "silk-road-caller", true, "baitiao", "silk-road-caller.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "MQ消息调用中心微服务", "魏巍", "", "");
new pClass().init(false, "java", "7056", "", "score", true, "baitiao", "score.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "积分系统", "刑志超", "", "");
new pClass().init(false, "java", "7065", "", "silk-road-backman", true, "baitiao", "silk-road-backman.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对内系统2", "张曙", "", "");
new pClass().init(false, "java", "7066", "", "silk-road", true, "baitiao", "silk-road.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对外系统2", "魏巍", "", "");
new pClass().init(false, "java", "7059", "", "baitiao-zhitou", true, "baitiao", "baitiao-zhitou.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "白条直投-对接资金方", "张斌", "", "./xyqb-btzt-internal/target/");
new pClass().init(false, "java", "7068", "", "customer_helpdesk", true, "data-riskcontrol", "customer_helpdesk.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "外部客服-server", "", "", "");
// ui----
new pClass().init(true, "ui", "7032", "op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "运营系统-ui", "","","");
new pClass().init(true, "ui", "7040", "activity-ui", false, "QG", null, "src/app/config.js", "npm run build", "node7", 1, "活动中心-ui", "","","");
new pClass().init(true, "ui", "7011", "financial-system-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "财务系统-ui", "","","");
new pClass().init(true, "ui", "7030", "gyxd-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "广源小贷-ui","","");
new pClass().init(true, "ui", "7008", "offline-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "线下白条-ui", "","","");
new pClass().init(true, "ui", "7035", "funding-corp-op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "白条债转系统-ui", "","","");
new pClass().init(true, "ui", "7007", "paycenter-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "支付中心-ui", "","","");
new pClass().init(true, "ui", "7043", "xyqb-user-ui", false, "head_group", null, "src/app/config.js", "npm run qa", "node7", 1, "用户注册登录-V2-ui", "","","");
new pClass().init(true, "ui", "7039", "merchant-op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "商户系统-ui", "","","");
new pClass().init(true, "ui", "7004", "di-ting-ui", false, "QG", null, "client/app/config.js", "grunt build", "node7", 1, "信审-ui", "","","");
new pClass().init(true, "ui", "7020", "spider-center-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "授信中心-ui", "","","");
new pClass().init(true, "ui", "7050", "bt-ui", false, "QG", null, "src/app/config/env.config.js", "npm --registry http://172.16.3.15:4873 run qa", "node7", 1, "新版白条-ui", "","","");
new pClass().init(true, "ui", "7058", "mall-ui", true, "ui", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "商城-ui", "","","");
new pClass().init(true, "ui", "7001", "xyqb-ui", false, "QG", null, "client/app/config.js", "grunt build", "node4", 1, "现金贷和白条-现金贷-ui", "","","");
new pClass().init(true, "ui", "7046", "activity-op-ui", false, "QG", null, "src/config/env.config.js", "npm run build", "node7", 1, "优惠券管理后台-ui", "","","");
new pClass().init(true, "ui", "7048", "order-op-ui", false, "OP", null, "src/js/env.config.js", "gulp build", "node7", 1, "订单系统-ui", "","","");
new pClass().init(true, "ui", "7002", "qgbc-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "白条-ui", "","","");
new pClass().init(true, "ui", "7057", "xjd-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版现金贷-ui", "","","");
new pClass().init(true, "ui", "7007", "new-paycenter-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版支付中心-ui", "","","");
new pClass().init(false, "ui", "7061", "wind-control-op-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "临时项目,未来删除风控平台-ui", "","","");
new pClass().init(false, "ui", "7016", "flow-op-ui", true, "ui", null, "src/config/env.config.js", "npm run build", "node7", 1, "", "","","");
new pClass().init(false, "ui", "7051", "h5-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "h5平台业务", "李长城","","");
new pClass().init(true, "ui", "7057", "ka-spider-center-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版授信UI", "郑少文","","");
new pClass().init(true, "ui", "7032", "", "op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "运营系统-ui", "", "", "");
new pClass().init(true, "ui", "7040", "", "activity-ui", false, "QG", null, "src/app/config.js", "npm run build", "node7", 1, "活动中心-ui", "", "", "");
new pClass().init(true, "ui", "7011", "financial.xyqb.com", "financial-system-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "财务系统-ui", "", "", "");
new pClass().init(true, "ui", "7030", "", "gyxd-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "广源小贷-ui", "", "");
new pClass().init(true, "ui", "7008", "off.xyqb.com", "offline-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "线下白条-ui", "", "", "");
new pClass().init(true, "ui", "7035", "", "funding-corp-op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "白条债转系统-ui", "", "", "");
new pClass().init(true, "ui", "7007", "pay.xyqb.com", "paycenter-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "支付中心-ui", "", "", "");
new pClass().init(true, "ui", "7043", "", "xyqb-user-ui", false, "head_group", null, "src/app/config.js", "npm run qa", "node7", 1, "用户注册登录-V2-ui", "", "", "");
new pClass().init(true, "ui", "7039", "", "merchant-op-ui", false, "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "商户系统-ui", "", "", "");
new pClass().init(true, "ui", "7004", "r.xyqb.com", "di-ting-ui", false, "QG", null, "client/app/config.js", "grunt build", "node7", 1, "信审-ui", "", "", "");
new pClass().init(true, "ui", "7020", "", "spider-center-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "授信中心-ui", "", "", "");
new pClass().init(true, "ui", "7050", "bt.xyqb.com", "bt-ui", false, "QG", null, "src/app/config/env.config.js", "npm --registry http://172.16.3.15:4873 run qa", "node7", 1, "新版白条-ui", "", "", "");
new pClass().init(true, "ui", "7058", "", "mall-ui", true, "ui", null, "src/app/config/env.config.js", "npm run build", "node7", 1, "商城-ui", "", "", "");
new pClass().init(true, "ui", "7001", "m.xyqb.com", "xyqb-ui", false, "QG", null, "client/app/config.js", "grunt build", "node4", 1, "现金贷和白条-现金贷-ui", "", "", "");
new pClass().init(true, "ui", "7046", "", "activity-op-ui", false, "QG", null, "src/config/env.config.js", "npm run build", "node7", 1, "优惠券管理后台-ui", "", "", "");
new pClass().init(true, "ui", "7048", "", "order-op-ui", false, "OP", null, "src/js/env.config.js", "gulp build", "node7", 1, "订单系统-ui", "", "", "");
new pClass().init(true, "ui", "7002", "", "qgbc-ui", false, "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "白条-ui", "", "", "");
new pClass().init(true, "ui", "7057", "", "xjd-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版现金贷-ui", "", "", "");
new pClass().init(true, "ui", "7007", "", "new-paycenter-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版支付中心-ui", "", "", "");
new pClass().init(false, "ui", "7061", "", "wind-control-op-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "临时项目,未来删除风控平台-ui", "", "", "");
new pClass().init(false, "ui", "7016", "", "flow-op-ui", true, "ui", null, "src/config/env.config.js", "npm run build", "node7", 1, "", "", "", "");
new pClass().init(false, "ui", "7051", "", "h5-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "h5平台业务", "李长城", "", "");
new pClass().init(true, "ui", "7057", "", "ka-spider-center-ui", true, "ui", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版授信UI", "郑少文", "", "");
// node
new pClass().init(true, "node", "7018", "AppBackend", false, "QG", null, "config/environment/test.js", "forever start -a -s --uid AppBackend bin/www", null, 1, "APP后台服务-server", "", "forever stop AppBackend","");
new pClass().init(true, "node", "7041", "activity-op", false, "QG", null, "src/config.js", "sh start.sh", null, 1, "优惠券中心-server", "", "sh stop.sh","");
new pClass().init(true, "node", "7047", "op-api", false, "OP", null, "src/dev.config.js", "sh start.sh", null, 1, "系统Api Gateway-server", "", "sh stop.sh","");
new pClass().init(true, "node", "7049", "fe-api", false, "QG", null, "src/config.js", "sh start.sh", null, 1, "科传项目-消息推送", "", "pm2 stop fe-api","");
new pClass().init(true, "node", "7054", "xyqb-h5-backend", false, "QG", null, "src/dev.config.js", "sh start.sh", null, 1, "信用钱包帮助中心", "", "sh stop.sh","");
new pClass().init(true, "node", "7055", "statistics", true, "OP", null, "src/config.js", "sh start.sh", null, 1, "收集前端日志", "", "sh stop.sh","");
new pClass().init(true, "node", "7018", "", "AppBackend", false, "QG", null, "config/environment/test.js", "forever start -a -s --uid AppBackend bin/www", null, 1, "APP后台服务-server", "", "forever stop AppBackend", "");
new pClass().init(true, "node", "7041", "", "activity-op", false, "QG", null, "src/config.js", "sh start.sh", null, 1, "优惠券中心-server", "", "sh stop.sh", "");
new pClass().init(true, "node", "7047", "", "op-api", false, "OP", null, "src/dev.config.js", "sh start.sh", null, 1, "系统Api Gateway-server", "", "sh stop.sh", "");
new pClass().init(true, "node", "7049", "", "fe-api", false, "QG", null, "src/config.js", "sh start.sh", null, 1, "科传项目-消息推送", "", "pm2 stop fe-api", "");
new pClass().init(true, "node", "7054", "", "xyqb-h5-backend", false, "QG", null, "src/dev.config.js", "sh start.sh", null, 1, "信用钱包帮助中心", "", "sh stop.sh", "");
new pClass().init(true, "node", "7055", "", "statistics", true, "OP", null, "src/config.js", "sh start.sh", null, 1, "收集前端日志", "", "sh stop.sh", "");
//python
new pClass().init(true, "python", "7022", "qin-qiong", false, "QG", null, "config/beta/config.properties", null, null, 1, "加密解密-server", "", "","");
new pClass().init(true, "python", "7033", "xyqb-query", false, "QG", null, "server/config/beta/config.ini", null, null, 1, "query-server", "", "","");
new pClass().init(false, "python", "7027", "msg-center", false, "QG", null, "server/config/beta/config.ini", null, null, 1, "短信中心-以前的sms-center", "", "","");
new pClass().init(true, "python", "7022", "", "qin-qiong", false, "QG", null, "config/beta/config.properties", null, null, 1, "加密解密-server", "", "", "");
new pClass().init(true, "python", "7033", "", "xyqb-query", false, "QG", null, "server/config/beta/config.ini", null, null, 1, "query-server", "", "", "");
new pClass().init(false, "python", "7027", "", "msg-center", false, "QG", null, "server/config/beta/config.ini", null, null, 1, "短信中心-以前的sms-center", "", "", "");
var temp = "";
process.argv.forEach(function (val, index, array) {
process.argv.forEach(function(val, index, array) {
if (index >= 2) {
if (index % 2 == 0) {
temp = val.replace(/\-/, "");
......@@ -155,41 +156,41 @@ function getListAttr(projects, attr) {
}
return list.join(" ");
}
var configFunction = function () {};
var configFunction = function() {};
configFunction.prototype = {
getProjectAttr: function (pName, pAttr) {
if (typeof projects[pName] == "undefined") {
getProjectAttr: function(pName, pAttr) {
if (typeof projects[pName] == "undefined") {
console.log("")
} else {
if (typeof projects[pName][pAttr] == "undefined") {
console.log("")
} else {
if (typeof projects[pName][pAttr] == "undefined") {
console.log("")
if (projects[pName][pAttr]) {
console.log(projects[pName][pAttr])
} else {
if (projects[pName][pAttr]) {
console.log(projects[pName][pAttr])
} else {
console.log("")
}
console.log("")
}
}
},
getProjectsAttrs: function (projects,attr) {
var attrs = attr.split("/");
if(attrs.length == 0){
return
}
var list = [];
for (var i = 0; i < projects.length; i++ ) {
var li = [projects[i]["name"]];
for (var j = 0; j < attrs.length; j++ ){
li.push(projects[i][attrs[j]]);
}
list.push(li.join("|"));
}
},
getProjectsAttrs: function(projects, attr) {
var attrs = attr.split("/");
if (attrs.length == 0) {
return
}
var list = [];
for (var i = 0; i < projects.length; i++) {
var li = [projects[i]["name"]];
for (var j = 0; j < attrs.length; j++) {
li.push(projects[i][attrs[j]]);
}
return list.join(" ");
},
getProjectsAttr: function (type, attr) {
switch (type) {
list.push(li.join("|"));
}
return list.join(" ");
},
getProjectsAttr: function(type, attr) {
switch (type) {
case "java":
console.log(getListAttr(java_projects, attr));
break;
......@@ -202,20 +203,20 @@ configFunction.prototype = {
case "node":
console.log(getListAttr(node_projects, attr));
break;
}
}
}
}
var F = new configFunction();
if (param["type"] == "") {
F.getProjectAttr(param["name"], param["attr"]);
} else if(param["type"] == "multi"){
var str = "";
str += F.getProjectsAttrs(java_projects,param["attr"]);
str += " "+F.getProjectsAttrs(ui_projects,param["attr"]);
str += " "+F.getProjectsAttrs(python_projects,param["attr"]);
str += " "+F.getProjectsAttrs(node_projects,param["attr"]);
} else if (param["type"] == "multi") {
var str = "";
str += F.getProjectsAttrs(java_projects, param["attr"]);
str += " " + F.getProjectsAttrs(ui_projects, param["attr"]);
str += " " + F.getProjectsAttrs(python_projects, param["attr"]);
str += " " + F.getProjectsAttrs(node_projects, param["attr"]);
console.log(str)
}else {
} else {
F.getProjectsAttr(param["type"], param["attr"]);
}
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