Commit c143f117 authored by qa_quantgroup's avatar qa_quantgroup

update

parent c43bcab1
......@@ -64,7 +64,7 @@ pClass.prototype = {
}
// --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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "./baitiao-api/target");
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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
......@@ -87,7 +87,7 @@ new pClass().init(false, "java", "7014", "", "du-jiang-yan", false, "QG", "du_ji
new pClass().init(false, "java", "8051", "", "msg", false, "micro-service", "msg.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "新版消息中心", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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, "白条直投外部", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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, "白条直投内部", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
new pClass().init(false, "java", "7060", "", "baitiao-op-backend", true, "baitiao", "baitiao-op-backend.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "运营系统服务", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "./xyqb-backend/target");
new pClass().init(false, "java", "7060", "", "baitiao-op-backend", true, "baitiao", "xyqb-backend.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts > /dev/null 2>&1 &", null, 2, "运营系统服务", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "xyqb-backend/target");
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, "用户系统查询服务", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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, "流量分发系统", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
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 服务注册发现微服务", "魏巍", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
......
#!/bin/bash
IP_host_first="192.168.4."
public_ip="q-gp.com" #"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 -p /home/sub_config_file_dont_rm
multis=`node $config_server/get_project_config.js -type multi -attr port`
#for ip_last_num in '15'
for ip_last_num in ${ips[@]}
do
echo "开始生成${IP_host_first}${ip_last_num}"
cd /home/sub_config_file_dont_rm
mkdir -p ${IP_host_first}${ip_last_num}
cd ${IP_host_first}${ip_last_num}
dir=`pwd`
#java项目发布
mkdir -p $dir/java
mkdir -p $dir/public/java
cp -rf /home/config_files/java/* $dir/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/public/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/public/java/*
#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/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/ip_last/$ip_last_num/g" $dir/java/*
sed -i "s/ip_last/$ip_last_num/g" $dir/public/java/*
#python项目发布
mkdir -p $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/ip_last/$ip_last_num/g" $dir/python/*
#node项目发布
mkdir -p $dir/node
mkdir -p $dir/public/node
cp -rf /home/config_files/node/* $dir/node/
cp -rf /home/config_files/node/* $dir/public/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}/g" $dir/public/node/*
sed -i "s/ip_last/$ip_last_num/g" $dir/node/*
sed -i "s/ip_last/$ip_last_num/g" $dir/public/node/*
#ui配置发布
mkdir -p $dir/ui
mkdir -p $dir/public/ui
cp -rf /home/config_files/ui/* $dir/ui/
cp -rf /home/config_files/ui/* $dir/public/ui/
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/g" $dir/ui/*
sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/g" $dir/public/ui/*
#if [ $ip_last_num -lt 100 ]; then
# sed -i "s/target_host_name:7/${public_ip}:${ip_last_num}/g" $dir/public/ui/*
#else
#fi
sed -i "s/ip_last/$ip_last_num/g" $dir/public/ui/*
sed -i "s/ip_last/$ip_last_num/g" $dir/ui/*
#替换公网
for multi in ${multis[@]}
do
{
pro=`echo $multi | awk -F '|' '{print $1}'`
port=`echo $multi | awk -F '|' '{print $2}'`
#find $dir/public/ -type f -print | xargs -i sed -i "s/${IP_host_first}${ip_last_num}:$port/${pro}-${ip_last_num}.${public_ip}/g" {}
echo "sed -i "s/${IP_host_first}${ip_last_num}:$port/${pro}-${ip_last_num}.${public_ip}/g" $dir/public/*"
sed -i "s/${IP_host_first}${ip_last_num}:$port/${pro}-${ip_last_num}.${public_ip}/g" $dir/public/java/*
sed -i "s/${IP_host_first}${ip_last_num}:$port/${pro}-${ip_last_num}.${public_ip}/g" $dir/public/node/*
sed -i "s/${IP_host_first}${ip_last_num}:$port/${pro}-${ip_last_num}.${public_ip}/g" $dir/public/ui/*
}
done
#find $dir/public/ -type f -print | xargs -i sed -i "s/${IP_host_first}${ip_last_num}/www.${public_ip}/g" {}
#ngxin conf.d发布
mkdir -p $dir/nginx_conf.d
cp -rf /home/config_files/nginx_conf.d/* $dir/nginx_conf.d/
#baitiao pem发布
mkdir -p $dir/pem_file
cp -rf /home/config_files/pem_file/* $dir/pem_file/
# sed -i "s/target_host_name/${IP_host_first}${ip_last_num}/" $dir/nginx_conf.d/*
echo "结束${IP_host_first}${ip_last_num}"
echo "---------"
done
sh /home/qa-deploy-utils/qa_shell_script/exception_sub_shell.sh
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