Commit 371d9592 authored by tywldx's avatar tywldx

增加msg-center的部署脚本,脚本会对短信中心代码进行修改

parent c4ac639e
......@@ -92,6 +92,7 @@ new pClass().init(true, "node", "9050", "op-api", "OP", null, "src/config.js", n
//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");
new pClass().init(false, "python", "7027", "msg-center", "QG", null, "server/config/beta/config.ini", null, null, 1, "短信中心-以前的sms-center");
var temp = "";
......@@ -109,8 +110,10 @@ process.argv.forEach(function(val, index, array) {
function getListAttr(projects, attr) {
var list = [];
for (var i = 0; i < projects.length; i++) {
if(projects[i].is_active){
list.push(projects[i][attr])
}
}
return list.join(" ");
}
var configFunction = function() {};
......
#!/bin/bash
project_path=/home/quant_group/msg-center
config_file=/home/config_files/special
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/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 self.acknowledge_message(basic_deliver.delivery_tag)\n return/g" $project_path/server/mq/*.py
\ No newline at end of file
#!/bin/bash
ip_last=$1
project_name=$2
branch_name=$3
public_ip=$4
set timeout 1200
ip=192.168.4.$ip_last
echo "参数为:
#init_shell_script: ${init_shell_script}
ip : ${ip}
project_name : ${project_name}
branch_name : ${branch_name}
public_ip : ${public_ip}
"
expect -c "
set timeout 10
spawn ssh root@${ip}
expect *ssword* { send !QAZ2wsx\r }
expect \"]#\"
send \"cd /home/qa-deploy-utils/qa_shell_script\r\"
expect \"]#\"
send \"sh deploy_project_by_name.sh $project_name $branch_name $public_ip\r\"
set timeout -1
expect \"]#\"
send \"sh special_project/msg_center.sh\r\"
set timeout -1
expect \"]#\"
send \"sh 5_restart_by_name.sh $project_name\r\"
set timeout -1
expect \"]#\"
send \"exit\r\"
expect eof;"
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