Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
d1fbeb41
Commit
d1fbeb41
authored
Jul 25, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitabc.xyqb.com/QA/qa-deploy-utils
parents
7b8440f9
904dfe7d
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
96 additions
and
30 deletions
+96
-30
db_gen_config.sh
db-utils/db_gen_config.sh
+2
-1
1_mount_config_files.sh
qa_shell_script/1_mount_config_files.sh
+0
-2
exception_sub_shell.sh
qa_shell_script/exception_sub_shell.sh
+6
-0
remote_initial_env.sh
qa_shell_script/initial_env/remote_initial_env.sh
+0
-1
remove_logs.sh
qa_shell_script/log_shell/remove_logs.sh
+3
-0
20170721.sh
qa_shell_script/migrate_ENV/20170721.sh
+10
-0
remote.sh
qa_shell_script/migrate_ENV/remote.sh
+1
-2
remote_excute_msg_center.sh
...pt/old_script/special_project/remote_excute_msg_center.sh
+0
-1
initial_mq.sh
qa_shell_script/rabbitmq/initial_mq.sh
+2
-0
remote_excute.sh
qa_shell_script/remote_excute.sh
+0
-2
remote_excute_by_step.sh
qa_shell_script/remote_excute_by_step.sh
+0
-3
remote_excute_new.sh
qa_shell_script/remote_excute_new.sh
+3
-15
remote_excute_rabbitmq.sh
qa_shell_script/remote_excute_rabbitmq.sh
+0
-1
remote_excute_start.sh
qa_shell_script/remote_excute_start.sh
+1
-2
authorization.sh
qa_shell_script/script_by_Contorller/authorization.sh
+36
-0
closeloan.sh
qa_shell_script/script_by_Contorller/closeloan.sh
+32
-0
No files found.
db-utils/db_gen_config.sh
View file @
d1fbeb41
...
@@ -62,7 +62,8 @@ elif [[ $database_name = 'dujiangyan' ]]; then
...
@@ -62,7 +62,8 @@ 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 brand advertisement_type'
#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 advertisement_type'
sys_table_list
=
'activity_3c_product ad_detail admin_banner advertisement_type album app_channel app_channel_ad app_name app_name_ad category_banner category_nature commodity_slogan commodity_slogan_product configuration edx_city faster_entrance faster_entrance_image goods_after_sale_config goods_after_sale_step home_config home_page hot_category jd_address jd_after_sale_config jd_brand jd_category jd_product_sku_image jd_property jd_sku jd_sku_detail_image jd_sku_specs life_faster_entrance life_service mall_category mall_config merchant nature_value new_3c_product product product_category product_nature product_nature_value_bak product_sku product_sku_image product_specification product_spu recommend_brand recommend_product sale_product_detail sale_product_theme spu_image supplier tab_navigate title_banner'
port
=
'3310'
port
=
'3310'
elif
[[
$database_name
=
'qinqiong'
]]
;
then
elif
[[
$database_name
=
'qinqiong'
]]
;
then
# qinqiong
# qinqiong
...
...
qa_shell_script/1_mount_config_files.sh
View file @
d1fbeb41
...
@@ -14,7 +14,6 @@ if [[ $target_ip == "ALL" ]]; then
...
@@ -14,7 +14,6 @@ if [[ $target_ip == "ALL" ]]; then
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
umount
$script_path
\r\"
send
\"
umount
$script_path
\r\"
set timeout -1
set timeout -1
...
@@ -47,7 +46,6 @@ else
...
@@ -47,7 +46,6 @@ else
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
IP_host_first
}${
target_ip
}
spawn ssh root@
${
IP_host_first
}${
target_ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
umount -l /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
umount -l /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
...
qa_shell_script/exception_sub_shell.sh
View file @
d1fbeb41
...
@@ -120,6 +120,12 @@ tranceConfig java "xyqb.is.debug=0" "xyqb.is.debug=1" "192.168.4.23" "baitiao.pr
...
@@ -120,6 +120,12 @@ tranceConfig java "xyqb.is.debug=0" "xyqb.is.debug=1" "192.168.4.23" "baitiao.pr
#tranceConfig java "xyqb.is.debug=1" "xyqb.is.debug=0" "192.168.4.24" "xyqb.properties"
#tranceConfig java "xyqb.is.debug=1" "xyqb.is.debug=0" "192.168.4.24" "xyqb.properties"
tranceConfig node
"112233445512345.ittun.com"
"activity-op-24.ss.xyqb.loan"
"192.168.4.24"
"activity-op.js"
tranceConfig node
"112233445512345.ittun.com"
"activity-op-24.ss.xyqb.loan"
"192.168.4.24"
"activity-op.js"
tranceConfig java
"192.168.4.24:7058"
"wechattest2.xyqb.com"
"192.168.4.24"
"xyqb.properties"
tranceConfig java
"192.168.4.24:7058"
"wechattest2.xyqb.com"
"192.168.4.24"
"xyqb.properties"
#微信环境修改,请勿删除,可以注释
tranceConfig java
"wx89894cd83d117b26"
"wxc94ca68b353e90d0"
"192.168.4.24"
"xyqb-user2.properties"
tranceConfig java
"11fb7f6a8b8edf2776a72c2f5624229c"
"e30380e9ade07f361e51a643f94d8817"
"192.168.4.24"
"xyqb-user2.properties"
tranceConfig ui
"wx89894cd83d117b26"
"wxc94ca68b353e90d0"
"192.168.4.24"
"xyqb-user-ui.js"
tranceConfig ui
"11fb7f6a8b8edf2776a72c2f5624229c"
"e30380e9ade07f361e51a643f94d8817"
"192.168.4.24"
"xyqb-user-ui.js"
tranceConfig ui
"wx89894cd83d117b26"
"wxc94ca68b353e90d0"
"192.168.4.24"
"activity-ui.js"
#4.151
#4.151
tranceConfig java
"xyqb.is.debug=0"
"xyqb.is.debug=1"
"192.168.4.151"
"xyqb.properties"
tranceConfig java
"xyqb.is.debug=0"
"xyqb.is.debug=1"
"192.168.4.151"
"xyqb.properties"
...
...
qa_shell_script/initial_env/remote_initial_env.sh
View file @
d1fbeb41
...
@@ -15,7 +15,6 @@ sh /home/qa-deploy-utils/qa_shell_script/1_mount_config_files.sh $ip_last
...
@@ -15,7 +15,6 @@ sh /home/qa-deploy-utils/qa_shell_script/1_mount_config_files.sh $ip_last
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /usr/lib/rabbitmq/bin
\r\"
send
\"
cd /usr/lib/rabbitmq/bin
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
...
qa_shell_script/log_shell/remove_logs.sh
View file @
d1fbeb41
...
@@ -45,3 +45,6 @@ for i in `find . -name "*.log"`; do cat /dev/null >$i; done
...
@@ -45,3 +45,6 @@ for i in `find . -name "*.log"`; do cat /dev/null >$i; done
echo
"清空/tmp/"
echo
"清空/tmp/"
rm
-rf
/tmp/
*
rm
-rf
/tmp/
*
echo
"晴空 /home/quant_group/zookeeper-3.4.8/logs/version-2"
rm
-rf
/home/quant_group/zookeeper-3.4.8/logs/version-2/
*
qa_shell_script/migrate_ENV/20170721.sh
0 → 100644
View file @
d1fbeb41
#!/bin/bash
cd
/home/quant_group/di-ting-ui
sed
-i
"s/~0.4.2/>=0.4.2/g"
package.json
npm
install
jpegtran-bin
npm
install
optipng-bin
sh /home/qa-deploy-utils/qa_shell_script/2_get_code_by_name.sh di-ting-ui
$1
sh /home/qa-deploy-utils/qa_shell_script/3_link_config_file_by_name.sh di-ting-ui
sh /home/qa-deploy-utils/qa_shell_script/4_build_by_name.sh di-ting-ui
qa_shell_script/migrate_ENV/remote.sh
View file @
d1fbeb41
...
@@ -13,9 +13,8 @@ for ip_last_num in $project_path
...
@@ -13,9 +13,8 @@ for ip_last_num in $project_path
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/
migrate_ENV/
$1
\r\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/
$1
\r\"
set timeout -1
set timeout -1
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
exit
\r\"
send
\"
exit
\r\"
...
...
qa_shell_script/old_script/special_project/remote_excute_msg_center.sh
View file @
d1fbeb41
...
@@ -16,7 +16,6 @@ public_ip : ${public_ip}
...
@@ -16,7 +16,6 @@ public_ip : ${public_ip}
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
...
qa_shell_script/rabbitmq/initial_mq.sh
View file @
d1fbeb41
...
@@ -42,6 +42,7 @@ add_vhost baitiao_qrcode
...
@@ -42,6 +42,7 @@ add_vhost baitiao_qrcode
add_vhost bt_loan
add_vhost bt_loan
add_vhost /pay_center
add_vhost /pay_center
add_vhost backend
add_vhost backend
add_vhost baitiao_zhitou
#add exchange
#add exchange
add_exchange / hello-exchange direct
add_exchange / hello-exchange direct
add_exchange /black_hole contract direct
add_exchange /black_hole contract direct
...
@@ -128,4 +129,5 @@ add_binding /black_hole contract generate_auth_success generate_auth_success
...
@@ -128,4 +129,5 @@ add_binding /black_hole contract generate_auth_success generate_auth_success
add_binding /black_hole contract waiting_auth_generate waiting_auth_generate
add_binding /black_hole contract waiting_auth_generate waiting_auth_generate
add_binding /black_hole contract generate_success generate_success
add_binding /black_hole contract generate_success generate_success
add_binding /black_hole contract waiting_generate waiting_generate
add_binding /black_hole contract waiting_generate waiting_generate
add_binding /loan_order loan_order_exchange loan_state_msg_queue loan_state_msg_queue
qa_shell_script/remote_excute.sh
View file @
d1fbeb41
...
@@ -19,7 +19,6 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
...
@@ -19,7 +19,6 @@ if [ -n "$project_name" ] && [ -n "$branch_name" ]; then
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
@@ -32,7 +31,6 @@ else
...
@@ -32,7 +31,6 @@ else
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
...
qa_shell_script/remote_excute_by_step.sh
View file @
d1fbeb41
...
@@ -18,7 +18,6 @@ if $init_shell_script ;then
...
@@ -18,7 +18,6 @@ if $init_shell_script ;then
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
rm -rf /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
rm -rf /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
@@ -34,7 +33,6 @@ if [ -n "$project_name" ]; then
...
@@ -34,7 +33,6 @@ if [ -n "$project_name" ]; then
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
@@ -59,7 +57,6 @@ else
...
@@ -59,7 +57,6 @@ else
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
ip
}
spawn ssh root@
${
ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
send
\"
cd /home/qa-deploy-utils/qa_shell_script
\r\"
expect
\"
]#
\"
expect
\"
]#
\"
...
...
qa_shell_script/remote_excute_new.sh
View file @
d1fbeb41
...
@@ -14,26 +14,14 @@ branch_name : ${branch_name}
...
@@ -14,26 +14,14 @@ branch_name : ${branch_name}
project_type :
${
project_type
}
project_type :
${
project_type
}
public_ip :
${
public_ip
}
public_ip :
${
public_ip
}
"
"
<<<<<<
< HEAD
ssh root@
${
ip
}
"ifconfig"
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
ifconfig
if
[
-n
"
$project_name
"
]
&&
[
-n
"
$branch_name
"
]
;
then
if
[
-n
"
$project_name
"
]
&&
[
-n
"
$branch_name
"
]
;
then
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
"cd /home/qa-deploy-utils/qa_shell_script"
ssh root@
${
ip
}
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
"sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
"
else
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
"cd /home/qa-deploy-utils/qa_shell_script"
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
"sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_type.sh
$project_type
$branch_name
$public_ip
"
=======
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
"ifconfig"
if
[
-n
"
$project_name
"
]
&&
[
-n
"
$branch_name
"
]
;
then
sshpass
-p
'!QAZ2wsx'
ssh root@
${
ip
}
cd
/home/qa-deploy-utils/qa_shell_script
cd
/home/qa-deploy-utils/qa_shell_script
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_name.sh
$project_name
$branch_name
$public_ip
else
else
ssh
pass
-p
'!QAZ2wsx'
ssh
root@
${
ip
}
ssh root@
${
ip
}
cd
/home/qa-deploy-utils/qa_shell_script
cd
/home/qa-deploy-utils/qa_shell_script
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_type.sh
$project_type
$branch_name
$public_ip
sh /home/qa-deploy-utils/qa_shell_script/deploy_project_by_type.sh
$project_type
$branch_name
$public_ip
>>>>>>>
c37e484565713dd4f2e2ef060cef9d7351645849
fi
fi
qa_shell_script/remote_excute_rabbitmq.sh
View file @
d1fbeb41
...
@@ -12,7 +12,6 @@ for ip_last_num in $project_path
...
@@ -12,7 +12,6 @@ for ip_last_num in $project_path
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
spawn ssh root@
${
IP_host_first
}${
ip_last_num
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/rabbitmq/initial_mq.sh
\r\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/rabbitmq/initial_mq.sh
\r\"
set timeout -1
set timeout -1
...
...
qa_shell_script/remote_excute_start.sh
View file @
d1fbeb41
...
@@ -8,7 +8,6 @@ for ip_last_num in $target_ip
...
@@ -8,7 +8,6 @@ for ip_last_num in $target_ip
expect
-c
"
expect
-c
"
set timeout 10
set timeout 10
spawn ssh root@
${
IP_host_first
}${
target_ip
}
spawn ssh root@
${
IP_host_first
}${
target_ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
expect
\"
]#
\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/6_start_by_name.sh
$project_name
\r\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/6_start_by_name.sh
$project_name
\r\"
set timeout -1
set timeout -1
...
...
qa_shell_script/script_by_Contorller/authorization.sh
0 → 100644
View file @
d1fbeb41
#!/bin/bash
ip
=
$1
phone_no
=
$2
HOSTNAME
=
"192.168.4.
$ip
"
PORT
=
"3306"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"spider_center"
TABLENAME
=
"user_authorization"
TABLENAME1
=
"user"
mysqld
=
"-h
${
HOSTNAME
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
function
authorization
()
{
echo
"开始修改"
#查询userID
select_sql
=
"select id from
${
TABLENAME1
}
where phone_no=
${
phone_no
}
"
user_id
=
`
mysql
-N
$mysqld
${
DBNAME
}
-e
"
${
select_sql
}
"
`
echo
"user_id=
$user_id
"
#插入授信数据0和3
insert_sql0
=
"insert into
${
TABLENAME
}
("
user_id
","
auth_type
","
auth_status
") values ('
$user_id
','0',1)"
insert_sql3
=
"insert into
${
TABLENAME
}
("
user_id
","
auth_type
","
auth_status
") values ('
$user_id
','3',1)"
#echo "$insert_sql0"
#echo "$insert_sql3"
mysql
$mysqld
${
DBNAME
}
-e
"
${
insert_sql0
}
"
mysql
$mysqld
${
DBNAME
}
-e
"
${
insert_sql3
}
"
echo
"修改成功"
}
authorization
$ip
$phone_no
\ No newline at end of file
qa_shell_script/script_by_Contorller/closeloan.sh
0 → 100644
View file @
d1fbeb41
#!/bin/bash
ip
=
$1
phone_no
=
$2
HOSTNAME
=
"192.168.4.
$ip
"
PORT
=
"3306"
USERNAME
=
"qa"
PASSWORD
=
"qatest"
DBNAME
=
"xyqb"
TABLENAME
=
"loan_application_history"
DBNAME1
=
"xyqb_user"
TABLENAME1
=
"user"
mysqld
=
"-h
${
HOSTNAME
}
-P
${
PORT
}
-u
${
USERNAME
}
-p
${
PASSWORD
}
"
function
closeloan
()
{
echo
"开始修改"
#查询userID
select_sql
=
"select id from
${
TABLENAME1
}
where phone_no=
${
phone_no
}
"
user_id
=
`
mysql
-N
$mysqld
${
DBNAME1
}
-e
"
${
select_sql
}
"
`
echo
"user_id=
$user_id
"
#更新loan_application_history表中的is_active=0
update_sql
=
"update
${
TABLENAME
}
set is_active=0 where user_id=
${
user_id
}
"
mysql
$mysqld
${
DBNAME
}
-e
"
${
update_sql
}
"
echo
"修改成功"
}
closeloan
$ip
$phone_no
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment