Commit 4e22e35a authored by QA-甘 盛聪's avatar QA-甘 盛聪
parents 3b685255 0a0fac50
...@@ -64,7 +64,7 @@ elif [[ $database_name = 'dujiangyan' ]]; then ...@@ -64,7 +64,7 @@ elif [[ $database_name = 'dujiangyan' ]]; then
port='3310' port='3310'
elif [[ $database_name = 'mall' ]]; then elif [[ $database_name = 'mall' ]]; then
# 白条商城 # 白条商城
sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project mall_category product product_sku product_sku_image product_spu product_nature nature_value product_category spu_image product_nature_value goods_after_sale_step goods_after_sale_config' sys_table_list='mall_config activity_3c_product ad_detail new_3c_product supplier 3c_product 3c_product_spec apix_phone_recharge_detail apix_recharge_project apix_recharge_project_bak category configuration course_detail_info course_info merchant pay19_recharge_project mall_category product product_sku product_sku_image product_spu product_nature nature_value product_category spu_image product_nature_value goods_after_sale_step goods_after_sale_config brand'
port='3310' port='3310'
elif [[ $database_name = 'qinqiong' ]]; then elif [[ $database_name = 'qinqiong' ]]; then
# qinqiong # qinqiong
......
...@@ -10,6 +10,11 @@ cd $project_path ...@@ -10,6 +10,11 @@ cd $project_path
project_folder=`find ./ -maxdepth 1 -name "$project_name"` project_folder=`find ./ -maxdepth 1 -name "$project_name"`
if [ -n "$project_folder" ];then if [ -n "$project_folder" ];then
desc=`node $config_server/get_project_config.js -name $project_name -attr desc` desc=`node $config_server/get_project_config.js -name $project_name -attr desc`
type=`node $config_server/get_project_config.js -name $project_name -attr type`
if [ "$type" = "node" ];then
command2=`node $config_server/get_project_config.js -name $project_name -attr command2`
command2
fi
sh $config_server/show_info.sh $project_name pull代码 $desc sh $config_server/show_info.sh $project_name pull代码 $desc
cd ./$project_name cd ./$project_name
git checkout ./ git checkout ./
...@@ -23,7 +28,7 @@ if [ -n "$project_folder" ];then ...@@ -23,7 +28,7 @@ if [ -n "$project_folder" ];then
git pull git pull
else else
echo "Fail to checkout branch $git_branch". echo "Fail to checkout branch $git_branch".
exit 128 exit -1
fi fi
else else
echo "checkout default branch master" echo "checkout default branch master"
......
...@@ -12,6 +12,11 @@ function getCode() ...@@ -12,6 +12,11 @@ function getCode()
for project in ${projects[@]} for project in ${projects[@]}
do do
desc=`node $config_server/get_project_config.js -name $project -attr desc` desc=`node $config_server/get_project_config.js -name $project -attr desc`
type=`node $config_server/get_project_config.js -name $project_name -attr type`
if [ "$type" = "node" ];then
command2=`node $config_server/get_project_config.js -name $project_name -attr command2`
command2
fi
cd $project_path cd $project_path
project_folder=`find ./ -maxdepth 1 -name "$project"` project_folder=`find ./ -maxdepth 1 -name "$project"`
if [ -n "$project_folder" ];then if [ -n "$project_folder" ];then
......
...@@ -50,7 +50,7 @@ function restartJavaProject() ...@@ -50,7 +50,7 @@ function restartJavaProject()
echo "-----project:$project while be run command: java -Xmx256m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t > /dev/null 2>&1 &" echo "-----project:$project while be run command: java -Xmx256m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t > /dev/null 2>&1 &"
log_name=`node $config_server/get_project_config.js -name $project -attr log_name` log_name=`node $config_server/get_project_config.js -name $project -attr log_name`
mv $project_path/logs/$log_name $project_path/logs/$project-$time.log mv $project_path/logs/$log_name $project_path/logs/$project.log.$time
if [[ $project == "redpacket" ]]; then if [[ $project == "redpacket" ]]; then
echo `java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &` echo `java -Xmx512m -XX:PermSize64m -Xloggc:/tmp/${project}.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -jar ${project}.jar --worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &`
......
...@@ -30,7 +30,7 @@ function restartJavaProject() ...@@ -30,7 +30,7 @@ function restartJavaProject()
sleep 2s sleep 2s
fi fi
log_name=`node $config_server/get_project_config.js -name $project -attr log_name` log_name=`node $config_server/get_project_config.js -name $project -attr log_name`
mv $project_path/logs/$log_name $project_path/logs/$project-$time.log mv $project_path/logs/$log_name $project_path/logs/$project.log.$time
config_file=`find ./ -maxdepth 2 -name "application.properties"` config_file=`find ./ -maxdepth 2 -name "application.properties"`
if [ -n "$config_file" ] if [ -n "$config_file" ]
then then
......
12 13 14 15 16 17 22 24 50 151 152 12 13 14 15 16 17 22 23 24 50 151 152
...@@ -18,10 +18,15 @@ var users = [{}, { ...@@ -18,10 +18,15 @@ var users = [{}, {
var pClass = function() {}; var pClass = function() {};
pClass.prototype = { pClass.prototype = {
init: function(isActive, projectType, port, projectName, gitPath, logName, configFile, command, nodeVersion, userIndex, desc, auth, command2) { init: function(isActive, projectType, port, projectName, ssh_git, gitPath, logName, configFile, command, nodeVersion, userIndex, desc, auth, command2) {
this.name = projectName; this.name = projectName;
this.type = projectType; this.type = projectType;
this.git_path = "http://" + users[userIndex].name + ":" + users[userIndex].pwd + "@gitabc.xyqb.com/" + gitPath + "/" + projectName + ".git" if (!ssh_git){
this.git_path = "http://" + users[userIndex].name + ":" + users[userIndex].pwd + "@gitabc.xyqb.com/" + gitPath + "/" + projectName + ".git"
}else{
this.git_path = gitPath
}
this.log_name = logName; this.log_name = logName;
this.config_file = configFile; this.config_file = configFile;
this.command = command; this.command = command;
...@@ -48,56 +53,56 @@ pClass.prototype = { ...@@ -48,56 +53,56 @@ pClass.prototype = {
} }
} }
} }
// projectName,projectType,port,gitPath,logName,configFile,command,nodeVersion // projectName,projectType,port,gitPath,logName,configFile,command,nodeVersion false,
new pClass().init(true, "java", "7003", "xyqb", "QG", "xyqb.log", "application.properties", null, null, 2, "现金贷-server",""); new pClass().init(true, "java", "7003", "xyqb", false, "QG", "xyqb.log", "application.properties", null, null, 2, "现金贷-server","");
new pClass().init(true, "java", "7025", "baitiao", "QG", "baitiao.log", "application.properties", null, null, 2, "白条-server",""); new pClass().init(true, "java", "7025", "baitiao", false, "QG", "baitiao.log", "application.properties", null, null, 2, "白条-server","");
new pClass().init(true, "java", "7019", "xyqb-mall", "QG", "mall.log", "application.properties", null, null, 2, "商城后台-server",""); new pClass().init(true, "java", "7019", "xyqb-mall", false, "QG", "mall.log", "application.properties", null, null, 2, "商城后台-server","");
new pClass().init(true, "java", "7010", "xyqb-offline", "QG", "xyqb_offline.log", "application.properties", null, null, 2, "线下业务-server",""); new pClass().init(true, "java", "7010", "xyqb-offline", false, "QG", "xyqb_offline.log", "application.properties", null, null, 2, "线下业务-server","");
new pClass().init(true, "java", "7042", "xyqb-user2", "head_group", "xyqb_user.log", "application.properties", null, null, 2, "用户注册登录-V2-server",""); new pClass().init(true, "java", "7042", "xyqb-user2", true, "git@gitabc.xyqb.com:head_group/xyqb-user2.git", "xyqb_user.log", "application.properties", null, null, 2, "用户注册登录-V2-server","");
new pClass().init(true, "java", "7005", "di-ting", "QG", "di_ting.log", "application.properties", null, null, 2, "风控审计-server",""); new pClass().init(true, "java", "7005", "di-ting", false, "QG", "di_ting.log", "application.properties", null, null, 2, "风控审计-server","");
new pClass().init(true, "java", "7013", "han-gu-guan", "QG", "han-gu-guan.log", "application.properties", null, null, 2, "用户注册登录-V1-server",""); new pClass().init(true, "java", "7013", "han-gu-guan", false, "QG", "han-gu-guan.log", "application.properties", null, null, 2, "用户注册登录-V1-server","");
new pClass().init(true, "java", "7015", "jian-men-guan", "QG", "jian_men_guan.log", "application.properties", null, null, 2, "信审服务-server",""); new pClass().init(true, "java", "7015", "jian-men-guan", false, "QG", "jian_men_guan.log", "application.properties", null, null, 2, "信审服务-server","");
new pClass().init(true, "java", "7028", "black-hole", "QG", "black-hole.log", "application.properties", null, null, 2, "合同中心-server",""); new pClass().init(true, "java", "7028", "black-hole", false, "QG", "black-hole.log", "application.properties", null, null, 2, "合同中心-server","");
new pClass().init(true, "java", "7006", "gu-bei", "QG", "pay-center.log", "application.properties", null, null, 2, "支付中心-server",""); new pClass().init(true, "java", "7006", "gu-bei", false, "QG", "pay-center.log", "application.properties", null, null, 2, "支付中心-server","");
new pClass().init(true, "java", "7023", "xyqb-quartz", "QG", "quartz.log", "application.properties", null, null, 2, "定时任务-server",""); new pClass().init(true, "java", "7023", "xyqb-quartz", false, "QG", "quartz.log", "application.properties", null, null, 2, "定时任务-server","");
new pClass().init(true, "java", "7021", "spider-center", "QG", "spider-center.log", "application.properties", null, null, 2, "授信-server",""); new pClass().init(true, "java", "7021", "spider-center", false, "QG", "spider-center.log", "application.properties", null, null, 2, "授信-server","");
new pClass().init(true, "java", "7037", "cash-loan-flow", "QG", "cash_loan_flow.log", "application.properties", null, null, 2, "现金贷流量对接-server",""); new pClass().init(true, "java", "7037", "cash-loan-flow", false, "QG", "cash_loan_flow.log", "application.properties", null, null, 2, "现金贷流量对接-server","");
new pClass().init(true, "java", "7012", "financial-system", "QG", "financial_system.log", "application.properties", null, null, 2, "财务系统-server",""); new pClass().init(true, "java", "7012", "financial-system", false, "QG", "financial_system.log", "application.properties", null, null, 2, "财务系统-server","");
new pClass().init(true, "java", "7034", "fund-manage", "QG", "fund_manage.log", "application.properties", null, null, 2, "债转系统-server",""); new pClass().init(true, "java", "7034", "fund-manage", false, "QG", "fund_manage.log", "application.properties", null, null, 2, "债转系统-server","");
new pClass().init(true, "java", "7029", "gyxd", "QG", "gyxd.log", "application.properties", null, null, 2, "广源小贷-server",""); new pClass().init(true, "java", "7029", "gyxd", false, "QG", "gyxd.log", "application.properties", null, null, 2, "广源小贷-server","");
new pClass().init(true, "java", "7038", "merchant-backend", "QG", "merchant.log", "application.properties", null, null, 2, "商户后台-server","凌子华/陈东亮"); new pClass().init(true, "java", "7038", "merchant-backend", false, "QG", "merchant.log", "application.properties", null, null, 2, "商户后台-server","凌子华/陈东亮");
new pClass().init(true, "java", "7031", "redpacket", "QG", "redpacket.log", "application.properties", null, null, 2, "红包系统-server",""); new pClass().init(true, "java", "7031", "redpacket", false, "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", "7044", "finance-api", false, "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", "7045", "check-accounts", false, "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", false, "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"); // new pClass(true,"java","7027","sms-center","QG","sms-center.log",null,null,null,"短信中心-server");
// ui---- // ui----
// projectName,projectType,port,gitPath,logName,configFile,command,nodeVersion // projectName,projectType,port,gitPath,logName,configFile,command,nodeVersion
new pClass().init(true, "ui", "7032", "op-ui", "QG", null, "src/js/env.config.js", "npm run build", "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", "QG", null, "src/app/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", "QG", null, "src/js/env.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", "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", "QG", null, "src/app/config/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", "QG", null, "src/js/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", "QG", null, "src/app/config/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", "head_group", null, "src/app/config.js", "npm run qa", "node7", 1, "用户注册登录-V2-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", "QG", null, "src/js/env.config.js", "npm run build", "node7", 1, "商户系统-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", "QG", null, "client/app/config.js", "grunt 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", "QG", null, "src/app/config/env.config.js", "npm run qa", "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", "qgbc-ui", "QG", null, "src/app/config/env.config.js", "npm run build_production", "node7", 1, "白条-ui",""); new pClass().init(true, "ui", "7050", "qgbc-ui", false, "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", "7001", "xyqb-ui", false, "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", "npm run build", "node7", 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", "OP", null, "src/js/env.config.js", "gulp 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", "bt-ui", "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版白条-ui",""); new pClass().init(true, "ui", "7002", "bt-ui", false, "QG", null, "src/app/config/env.config.js", "npm run qa", "node7", 1, "新版白条-ui","");
// node // node
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","","forever stop AppBackend"); 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", "QG", null, "src/config.js", "sh start.sh", null, 1, "优惠券中心-server","","sh stop.sh"); 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", "OP", null, "src/config.js", "sh start.sh", null, 1, "系统Api Gateway-server","","sh stop.sh"); new pClass().init(true, "node", "7047", "op-api", false, "OP", null, "src/config.js", "sh start.sh", null, 1, "系统Api Gateway-server","","sh stop.sh");
new pClass().init(true, "node", "7049", "fe-api", "QG", null, "src/config.js", "sh start.sh", null, 1, "科传项目-消息推送","","pm2 stop fe-api"); new pClass().init(true, "node", "7049", "fe-api", false, "QG", null, "src/config.js", "sh start.sh", null, 1, "科传项目-消息推送","","pm2 stop fe-api");
//python //python
new pClass().init(true, "python", "7022", "qin-qiong", "QG", null, "config/beta/config.properties", null, null, 1, "加密解密-server","",""); 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", "QG", null, "server/config/beta/config.ini", null, null, 1, "query-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", "QG", null, "server/config/beta/config.ini", null, null, 1, "短信中心-以前的sms-center","",""); new pClass().init(false, "python", "7027", "msg-center", false, "QG", null, "server/config/beta/config.ini", null, null, 1, "短信中心-以前的sms-center","","");
var temp = ""; var temp = "";
......
...@@ -78,7 +78,9 @@ tranceConfig java "7025" "7003" "192.168.4.152" "baitiao.properties" ...@@ -78,7 +78,9 @@ tranceConfig java "7025" "7003" "192.168.4.152" "baitiao.properties"
tranceConfig node "112233445512345.ittun.com" "activity-op-22.ss.xyqb.loan" "192.168.4.22" "activity-op.js" tranceConfig node "112233445512345.ittun.com" "activity-op-22.ss.xyqb.loan" "192.168.4.22" "activity-op.js"
tranceConfig nginx "7002" "7050" "192.168.4.13" "qgbc-ui.conf" tranceConfig nginx "7002" "7050" "192.168.4.13" "qgbc-ui.conf"
tranceConfig nginx "7050" "7002" "192.168.4.13" "bt-ui.conf" tranceConfig nginx "7050" "7002" "192.168.4.13" "bt-ui.conf"
tranceConfig node "7002" "7050" "192.168.4.12" "AppBackend.js" tranceConfig ui "7002" "7050" "192.168.4.13" "bt-ui.js"
#tranceConfig node "7002" "7050" "192.168.4.12" "AppBackend.js"
#tranceConfig nginx "7002" "7050" "192.168.4.17" "qgbc-ui.conf"
#tranceConfig nginx "7050" "7002" "192.168.4.17" "bt-ui.conf"
#1/bin/bash
cd /home/quant_group/logs
rm -rf *.log.*
for i in `find . -name "*.log"`; do cat /dev/null >$i; done
...@@ -3,43 +3,72 @@ pwd_path="/home/qa-deploy-utils/qa_shell_script" ...@@ -3,43 +3,72 @@ pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_shell_path="$pwd_path" config_shell_path="$pwd_path"
config_server="$pwd_path/config_server" config_server="$pwd_path/config_server"
filename=/home/config_files/special/ngrok_confg.yml filename=/home/config_files/special/ngrok_confg.yml
vipfilename=/home/config_files/special/ngrok_vip_confg.yml
IP_host_first="192.168.4."
ips=`cat $config_server/get_env_ip.sh`
function addFileHead()
{
rm -rf $1
echo "server_addr: ss.xyqb.loan:4443" >> $1
echo "trust_host_root_certs: false" >> $1
echo "tunnels:" >> $1
}
addFileHead $filename
addFileHead $vipfilename
rm -rf $filename
echo "server_addr: ss.xyqb.loan:4443" >> $filename
echo "trust_host_root_certs: false" >> $filename
echo "tunnels:" >> $filename
function addFile() function addFile()
{ {
echo "$1 : $2 " echo "$1 : $2 "
echo " $1-iplast:" >> $filename if [ -n $4 ]
echo " proto:" >> $filename then
echo " http: \"$2\"" >> $filename echo " $1-$4:" >> $3
else
echo " $1-iplast:" >> $3
fi
echo " proto:" >> $3
echo " http: \"$2\"" >> $3
} }
projects=(`node $config_server/get_project_config.js -type java -attr name`) projects=(`node $config_server/get_project_config.js -type java -attr name`)
for project in ${projects[@]} for project in ${projects[@]}
do do
port=`node $config_server/get_project_config.js -name $project -attr port` port=`node $config_server/get_project_config.js -name $project -attr port`
addFile $project $port addFile $project $port $filename
done done
projects=(`node $config_server/get_project_config.js -type ui -attr name`) projects=(`node $config_server/get_project_config.js -type ui -attr name`)
for project in ${projects[@]} for project in ${projects[@]}
do do
port=`node $config_server/get_project_config.js -name $project -attr port` port=`node $config_server/get_project_config.js -name $project -attr port`
addFile $project $port addFile $project $port $filename
done done
projects=(`node $config_server/get_project_config.js -type node -attr name`) projects=(`node $config_server/get_project_config.js -type node -attr name`)
for project in ${projects[@]} for project in ${projects[@]}
do do
port=`node $config_server/get_project_config.js -name $project -attr port` port=`node $config_server/get_project_config.js -name $project -attr port`
addFile $project $port addFile $project $port $filename
done done
projects=(`node $config_server/get_project_config.js -type python -attr name`) projects=(`node $config_server/get_project_config.js -type python -attr name`)
for project in ${projects[@]} for project in ${projects[@]}
do do
port=`node $config_server/get_project_config.js -name $project -attr port` port=`node $config_server/get_project_config.js -name $project -attr port`
addFile $project $port addFile $project $port $filename
done done
projects_of_out_proxy=( gu-bei activity-op op-api spider-center )
for ip_last in ${ips[@]}
do
for project in ${projects_of_out_proxy[@]}
do
port=`node $config_server/get_project_config.js -name $project -attr port`
addFile $project $IP_host_first$ip_last:$port $vipfilename $ip_last
done
done
server_addr: ss.xyqb.loan:4443
trust_host_root_certs: false
tunnels:
xyqb-iplast:
proto:
http: 192.168.4.23:7001
#!/bin/bash
mq_path=/usr/lib/rabbitmq/bin
$mq_path/rabbitmqctl add_user qa qatest
$mq_path/rabbitmqctl set_user_tags qa administrator
$mq_path/rabbitmqctl list_users
#/bin/bash
/usr/lib/rabbitmq/bin/rabbitmqctl stop
/usr/lib/rabbitmq/bin/rabbitmq-server -detached
...@@ -4,4 +4,4 @@ config_file=/home/config_files/special ...@@ -4,4 +4,4 @@ config_file=/home/config_files/special
cp $config_file/msg_center_white_list.py $project_path/server/white_list.py cp $config_file/msg_center_white_list.py $project_path/server/white_list.py
sed -i "s/import json/import json\nfrom white_list import white_list\nfrom white_list import phone_white_list/g" $project_path/server/mq/*.py sed -i "s/import json/import json\nfrom white_list import white_list\nfrom white_list import phone_white_list/g" $project_path/server/mq/*.py
sed -i "s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s不再白名单之列\", msg[\"source\"])\n if msg[\"phoneNo\"] not in phone_white_list:\n logging.info(\"Phone:%s不再白名单之列,短信中心禁止发送该条短信。\", msg[\"phoneNo\"])\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g" $project_path/server/mq/*.py sed -i "s/msg = json.loads(body, \"utf8\")/msg = json.loads(body, \"utf8\")\n if msg[\"source\"] not in white_list:\n logging.info(\"IP:%s不再白名单之列,将检查手机号白名单\", msg[\"source\"])\n if msg[\"phoneNo\"] not in phone_white_list:\n logging.info(\"Phone:%s不再白名单之列,短信中心禁止发送该条短信。\", msg)\n self.acknowledge_message(basic_deliver.delivery_tag)\n return/g" $project_path/server/mq/*.py
#!/bin/bash #!/bin/bash
IP_host_first="192.168.4." IP_host_first="192.168.4."
public_ip="139.198.2.95" public_ip="139.198.2.95"
pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_server="$pwd_path/config_server"
ips=`cat $config_server/get_env_ip.sh`
mkdir /home/sub_config_file_dont_rm mkdir /home/sub_config_file_dont_rm
for ip_last_num in 12 13 14 15 16 17 22 24 50 151 152 for ip_last_num in ${ips[@]}
do do
cd /home/sub_config_file_dont_rm cd /home/sub_config_file_dont_rm
mkdir ${IP_host_first}${ip_last_num} mkdir ${IP_host_first}${ip_last_num}
...@@ -25,17 +28,11 @@ do ...@@ -25,17 +28,11 @@ do
cp -rf /home/config_files/java/* $dir/public/java/ cp -rf /home/config_files/java/* $dir/public/java/
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/java/* sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/java/*
sed -i "s/target_mq_host_name/${IP_host_first}${ip_last_num}/" $dir/java/* sed -i "s/target_mq_host_name/${IP_host_first}${ip_last_num}/" $dir/java/*
# if [ $ip_last_num -lt 100 ]; then
# sed -i "s/target_host_name:7/${public_ip}:${ip_last_num}/g" $dir/public/java/*
# #gu-bei的回调接口都改成外网接口
# sed -i "s/callback=http:\/\/${IP_host_first}${ip_last_num}:7006/callback=http:\/\/${public_ip}:${ip_last_num}006/g" $dir/java/gu-bei.properties
# sed -i "s/pay_notify_url=http:\/\/${IP_host_first}${ip_last_num}:7006/pay_notify_url=http:\/\/${public_ip}:${ip_last_num}006/g" $dir/java/gu-bei.properties
# else
sed -i "s/target_host_name:70/${public_ip}:${ip_last_num}/g" $dir/public/java/* sed -i "s/target_host_name:70/${public_ip}:${ip_last_num}/g" $dir/public/java/*
#gu-bei的回调接口都改成外网接口 #gu-bei的回调接口都改成外网接口
sed -i "s/callback=http:\/\/${IP_host_first}${ip_last_num}:7006/callback=http:\/\/${public_ip}:${ip_last_num}06/g" $dir/java/gu-bei.properties #sed -i "s/callback=http:\/\/${IP_host_first}${ip_last_num}:7006/callback=http:\/\/${public_ip}:${ip_last_num}06/g" $dir/java/gu-bei.properties
sed -i "s/pay_notify_url=http:\/\/${IP_host_first}${ip_last_num}:7006/pay_notify_url=http:\/\/${public_ip}:${ip_last_num}06/g" $dir/java/gu-bei.properties #sed -i "s/pay_notify_url=http:\/\/${IP_host_first}${ip_last_num}:7006/pay_notify_url=http:\/\/${public_ip}:${ip_last_num}06/g" $dir/java/gu-bei.properties
# fi # fi
sed -i "s/target_host_name/${public_ip}/g" $dir/public/java/* sed -i "s/target_host_name/${public_ip}/g" $dir/public/java/*
sed -i "s/target_mq_host_name/${IP_host_first}${ip_last_num}/" $dir/public/java/* sed -i "s/target_mq_host_name/${IP_host_first}${ip_last_num}/" $dir/public/java/*
sed -i "s/${public_ip}:3306/${IP_host_first}${ip_last_num}:3306/g" $dir/public/java/* sed -i "s/${public_ip}:3306/${IP_host_first}${ip_last_num}:3306/g" $dir/public/java/*
...@@ -43,6 +40,9 @@ do ...@@ -43,6 +40,9 @@ do
sed -i "s/redis.master.host=${public_ip}/redis.master.host=${IP_host_first}${ip_last_num}/g" $dir/public/java/* sed -i "s/redis.master.host=${public_ip}/redis.master.host=${IP_host_first}${ip_last_num}/g" $dir/public/java/*
sed -i "s/zk.connect.url=${public_ip}/zk.connect.url=${IP_host_first}${ip_last_num}/g" $dir/public/java/* sed -i "s/zk.connect.url=${public_ip}/zk.connect.url=${IP_host_first}${ip_last_num}/g" $dir/public/java/*
sed -i "s/ip_last/$ip_last_num/g" $dir/public/java/*
sed -i "s/ip_last/$ip_last_num/g" $dir/java/*
cp -rf /home/config_files/special/* $dir/special/ cp -rf /home/config_files/special/* $dir/special/
sed -i "s/iplast/${ip_last_num}/g" $dir/special/ngrok_confg.yml sed -i "s/iplast/${ip_last_num}/g" $dir/special/ngrok_confg.yml
...@@ -51,11 +51,17 @@ do ...@@ -51,11 +51,17 @@ do
mkdir $dir/python mkdir $dir/python
cp -rf /home/config_files/python/* $dir/python/ cp -rf /home/config_files/python/* $dir/python/
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/python/* sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/python/*
sed -i "s/ip_last/$ip_last_num/g" $dir/python/*
#node项目发布 #node项目发布
rm -rf $dir/node rm -rf $dir/node
mkdir $dir/node mkdir $dir/node
cp -rf /home/config_files/node/* $dir/node/ cp -rf /home/config_files/node/* $dir/node/
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/node/* sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/node/*
sed -i "s/ip_last/$ip_last_num/g" $dir/node/*
#ui配置发布 #ui配置发布
rm -rf $dir/ui rm -rf $dir/ui
mkdir $dir/ui mkdir $dir/ui
...@@ -65,14 +71,16 @@ do ...@@ -65,14 +71,16 @@ do
cp -rf /home/config_files/ui/* $dir/ui/ cp -rf /home/config_files/ui/* $dir/ui/
cp -rf /home/config_files/ui/* $dir/public/ui/ cp -rf /home/config_files/ui/* $dir/public/ui/
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/ui/* sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/ui/*
if [ $ip_last_num -lt 100 ]; then if [ $ip_last_num -lt 100 ]; then
sed -i "s/target_host_name:7/${public_ip}:${ip_last_num}/g" $dir/public/ui/* sed -i "s/target_host_name:7/${public_ip}:${ip_last_num}/g" $dir/public/ui/*
else else
sed -i "s/target_host_name:70/${public_ip}:${ip_last_num}/g" $dir/public/ui/* sed -i "s/target_host_name:70/${public_ip}:${ip_last_num}/g" $dir/public/ui/*
fi fi
sed -i "s/target_host_name/${public_ip}/g" $dir/public/ui/* sed -i "s/target_host_name/${public_ip}/g" $dir/public/ui/*
sed -i "s/${public_ip}:3306/${IP_host_first}${ip_last_num}:3306/g" $dir/public/ui/* sed -i "s/${public_ip}:3306/${IP_host_first}${ip_last_num}:3306/g" $dir/public/ui/*
sed -i "s/ip_last/$ip_last_num/g" $dir/public/ui/*
sed -i "s/ip_last/$ip_last_num/g" $dir/ui/*
#ngxin conf.d发布 #ngxin conf.d发布
rm -rf $dir/nginx_conf.d rm -rf $dir/nginx_conf.d
mkdir $dir/nginx_conf.d mkdir $dir/nginx_conf.d
......
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