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
ab546dab
Commit
ab546dab
authored
Mar 23, 2018
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
47c865c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
52 deletions
+52
-52
db_gen_config.sh
db-utils/db_gen_config.sh
+6
-6
db.js
qa_shell_script/config_server/config/db.js
+46
-46
get_project_config.bak.js
qa_shell_script/config_server/get_project_config.bak.js
+0
-0
No files found.
db-utils/db_gen_config.sh
View file @
ab546dab
...
@@ -182,12 +182,12 @@ echo "prepare to get source_port"
...
@@ -182,12 +182,12 @@ echo "prepare to get source_port"
# source_db_host=`curl -s http://192.168.4.3:10088/config_server/get_db_config/$database_name/host`
# source_db_host=`curl -s http://192.168.4.3:10088/config_server/get_db_config/$database_name/host`
# port=`curl -s http://192.168.4.3:10088/config_server/get_db_config/$database_name/port`
# port=`curl -s http://192.168.4.3:10088/config_server/get_db_config/$database_name/port`
conf
=
`
curl
-s
http://192.168.4.3:10088/config_server/get_db_config/
$database_name
/all
`
conf
=
(
`
curl
-s
http://192.168.4.3:10088/config_server/get_db_config/
$database_name
/all
`
)
source_db_
user
=
`
echo
$conf
| jq
".user"
|
sed
's#"##g'
`
source_db_
host
=
${
conf
[0]
}
source_db_pwd
=
`
echo
$conf
| jq
".pwd"
|
sed
's#"##g'
`
port
=
${
conf
[1]
}
s
ys_table_list
=
`
echo
$conf
| jq
".sys_table_list"
|
sed
's#"##g'
`
s
ource_db_user
=
${
conf
[2]
}
source_db_
host
=
`
echo
$conf
| jq
".host"
|
sed
's#"##g'
`
source_db_
pwd
=
${
conf
[3]
}
port
=
`
echo
$conf
| jq
".port"
|
sed
's#"##g'
`
sys_table_list
=
${
conf
[@]
:4
}
echo
"source_port is
$port
"
echo
"source_port is
$port
"
echo
"copy
${
base_config_file
}
to
${
config_file_name
}
"
echo
"copy
${
base_config_file
}
to
${
config_file_name
}
"
...
...
qa_shell_script/config_server/config/db.js
View file @
ab546dab
var
db
=
function
(
host
,
port
,
user
,
pwd
,
sys_table_list
)
{
var
db
=
function
(
host
,
port
,
user
,
pwd
,
sys_table_list
)
{
this
.
sys_table_list
=
sys_table_list
;
this
.
sys_table_list
=
sys_table_list
;
this
.
host
=
host
||
'
192.168.4.39
'
;
this
.
host
=
host
||
'
192.168.4.39
'
;
this
.
port
=
port
||
'
3306
'
;
this
.
port
=
port
||
'
3306
'
;
...
@@ -6,83 +6,83 @@ var db = function( host, port, user, pwd, sys_table_list){
...
@@ -6,83 +6,83 @@ var db = function( host, port, user, pwd, sys_table_list){
this
.
pwd
=
pwd
||
'
Uiwb@o^fR&nHOa5t
'
;
this
.
pwd
=
pwd
||
'
Uiwb@o^fR&nHOa5t
'
;
}
}
module
.
exports
=
{
module
.
exports
=
{
db_config
:
function
()
{
db_config
:
function
()
{
this
.
dbs
=
{
this
.
dbs
=
{
mall
:
new
db
(
'
192.168.3.19
'
,
''
,
''
,
''
,
'
activity_3c_product ad_detail admin_banner advertisement_type album app_channel app_channel_ad app_name app_name_ad category 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 loan_config virtual_brand virtual_category virtual_product_discount virtual_product_hot virtual_product_sku virtual_product_spu virtual_product_template
'
),
mall
:
new
db
(
'
192.168.3.19
'
,
''
,
''
,
''
,
'
activity_3c_product ad_detail admin_banner advertisement_type album app_channel app_channel_ad app_name app_name_ad category 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 loan_config virtual_brand virtual_category virtual_product_discount virtual_product_hot virtual_product_sku virtual_product_spu virtual_product_template
'
),
xyqb
:
new
db
(
''
,
''
,
''
,
''
,
'
baitiao_merchant baitiao_secure_key channel funding_contract funding_corp loan_product merchant_channel payeco_return_url_info red_packet t_phonenum zmxy_return_url configuration secure_proxy funding_corp_config funding_info_map baitiao_preferential_rule funding_corp_policy
'
),
xyqb
:
new
db
(
''
,
''
,
''
,
''
,
'
baitiao_merchant baitiao_secure_key channel funding_contract funding_corp loan_product merchant_channel payeco_return_url_info red_packet t_phonenum zmxy_return_url configuration secure_proxy funding_corp_config funding_info_map baitiao_preferential_rule funding_corp_policy
'
),
account_center
:
new
db
(
'
192.168.4.116
'
,
'
6001
'
,
''
,
''
,
''
),
account_center
:
new
db
(
'
192.168.4.116
'
,
'
6001
'
,
''
,
''
,
''
),
cash_loan_flow
:
new
db
(
'
192.168.4.80
'
,
'
8001
'
,
''
,
''
,
'
order_callback callback_configuration channel_configuration filter_configuration
'
),
cash_loan_flow
:
new
db
(
'
192.168.4.80
'
,
'
8001
'
,
''
,
''
,
'
order_callback callback_configuration channel_configuration filter_configuration
'
),
clotho
:
new
db
(
'
192.168.3.19
'
,
'
3308
'
,
''
,
''
,
''
),
clotho
:
new
db
(
'
192.168.3.19
'
,
'
3308
'
,
''
,
''
,
''
),
contract
:
new
db
(
''
,
'
3311
'
,
''
,
''
,
'
contract_template_new
'
),
contract
:
new
db
(
''
,
'
3311
'
,
''
,
''
,
'
contract_template_new
'
),
display
:
new
db
(
'
192.168.3.19
'
,
'
3307
'
,
''
,
''
,
'
discovery_config
'
),
display
:
new
db
(
'
192.168.3.19
'
,
'
3307
'
,
''
,
''
,
'
discovery_config
'
),
dujiangyan
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
external_coopr
'
),
dujiangyan
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
external_coopr
'
),
financial_system
:
new
db
(
''
,
'
6603
'
,
''
,
''
,
'
collection_user sys_dictionary sys_status_edge sys_status_vertice
'
),
financial_system
:
new
db
(
''
,
'
6603
'
,
''
,
''
,
'
collection_user sys_dictionary sys_status_edge sys_status_vertice
'
),
financial_system_api
:
new
db
(
''
,
'
6603
'
,
''
,
''
,
'
mailinfo
'
),
financial_system_api
:
new
db
(
''
,
'
6603
'
,
''
,
''
,
'
mailinfo
'
),
fund_manage
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
business_info email_info fund_info merchant
'
),
fund_manage
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
business_info email_info fund_info merchant
'
),
gyxd
:
new
db
(
'
192.168.4.116
'
,
'
6602
'
,
''
,
''
,
'
administrative_districts templet user role
'
),
gyxd
:
new
db
(
'
192.168.4.116
'
,
'
6602
'
,
''
,
''
,
'
administrative_districts templet user role
'
),
mall_settlement
:
new
db
(
'
192.168.4.253
'
,
'
3315
'
,
''
,
''
,
'
role role_user user
'
),
mall_settlement
:
new
db
(
'
192.168.4.253
'
,
'
3315
'
,
''
,
''
,
'
role role_user user
'
),
merchant
:
new
db
(
''
,
'
3314
'
,
''
,
''
,
'
authority product_nature role role_authority role_supplier role_user user
'
),
merchant
:
new
db
(
''
,
'
3314
'
,
''
,
''
,
'
authority product_nature role role_authority role_supplier role_user user
'
),
notify
:
new
db
(
'
192.168.4.6
'
,
'
7306
'
,
''
,
''
,
'
merchant merchant_config
'
),
offline
:
new
db
(
''
,
'
3311
'
,
''
,
''
,
'
goods_detail merchant operator_user
'
),
notify
:
new
db
(
'
192.168.4.6
'
,
'
7306
'
,
''
,
''
,
'
merchant merchant_config
'
),
payment_center
:
new
db
(
''
,
'
3308
'
,
''
,
''
,
'
card_switcher merchant merchant_config pay_approach_config merchant_pay_approach_relation merchant_bank_config quota
'
),
offline
:
new
db
(
''
,
'
3311
'
,
''
,
''
,
'
goods_detail merchant operator_user
'
),
qinqiong
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
secure_key secure_proxy
'
),
payment_center
:
new
db
(
''
,
'
3308
'
,
''
,
''
,
'
card_switcher merchant merchant_config pay_approach_config merchant_pay_approach_relation merchant_bank_config quota
'
),
quartz
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
certain_time_job
'
),
qinqiong
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
secure_key secure_proxy
'
),
reconciliation
:
new
db
(
'
192.168.3.19
'
,
'
3308
'
,
''
,
''
,
''
),
redpacket
:
new
db
(
'
192.168.4.116
'
,
'
6001
'
,
''
,
''
,
'
tb_activity_channel tb_dict_channel tb_dict_out_channel
'
),
quartz
:
new
db
(
''
,
'
3310
'
,
''
,
''
,
'
certain_time_job
'
),
risk_control
:
new
db
(
''
,
'
3309
'
,
''
,
''
,
'
company product_strategy_dispatcher quantify_product red_packet_info user
'
),
score
:
new
db
(
'
192.168.4.249
'
,
'
3322
'
,
''
,
''
,
''
),
silk_road
:
new
db
(
'
192.168.4.80
'
,
'
9999
'
,
''
,
''
,
''
),
spider_center
:
new
db
(
'
192.168.4.253
'
,
'
3317
'
,
''
,
''
,
'
merchant merchant_config
'
),
traffic_distribution
:
new
db
(
'
192.168.3.36
'
,
'
3313
'
,
''
,
''
,
'
merchant merchant_carousel merchant_credit merchant_detail merchant_section merchant_sort ppdai_exclude_channel t_module t_module_role t_role t_user t_user_role traffic_channel_banner_ids traffic_channel_ids traffic_channel_sort traffic_infos
'
),
reconciliation
:
new
db
(
'
192.168.3.19
'
,
'
3308
'
,
''
,
''
,
'
'
),
urge_dispatcher
:
new
db
(
'
192.168.4.116
'
,
'
9901
'
,
''
,
''
,
'
'
),
redpacket
:
new
db
(
'
192.168.4.116
'
,
'
6001
'
,
''
,
''
,
'
tb_activity_channel tb_dict_channel tb_dict_out_channel
'
),
user_credit
:
new
db
(
''
,
'
9001
'
,
''
,
''
,
'
'
),
risk_control
:
new
db
(
''
,
'
3309
'
,
''
,
''
,
'
company product_strategy_dispatcher quantify_product red_packet_info user
'
),
workflow
:
new
db
(
'
192.168.4.80
'
,
'
3307
'
,
''
,
''
,
'
dec_out out_config out_config_value params_value var_detail var_group
'
),
score
:
new
db
(
'
192.168.4.249
'
,
'
3322
'
,
''
,
''
,
'
'
),
xyqb_app
:
new
db
(
''
,
'
3307
'
,
''
,
''
,
'
activities app_banners app_config app_versions banners blanknote_entries credit_questions hot_games loan_banners loan_questions migrations sharings widgets js_patch upgrade_version
'
),
silk_road
:
new
db
(
'
192.168.4.80
'
,
'
9999
'
,
''
,
''
,
'
'
),
xyqb_btzt
:
new
db
(
''
,
'
9002
'
,
''
,
''
,
'
zt_channel zt_fund zt_fund_channel zt_fund_credit zt_fund_term
'
),
spider_center
:
new
db
(
'
192.168.4.253
'
,
'
3317
'
,
''
,
''
,
'
merchant merchant_config
'
),
xyqb_user
:
new
db
(
''
,
'
3313
'
,
''
,
''
,
'
merchant_config merchant
'
),
traffic_distribution
:
new
db
(
'
192.168.3.36
'
,
'
3313
'
,
''
,
''
,
'
merchant merchant_carousel merchant_credit merchant_detail merchant_section merchant_sort ppdai_exclude_channel t_module t_module_role t_role t_user t_user_role traffic_channel_banner_ids traffic_channel_ids traffic_channel_sort traffic_infos
'
),
urge_dispatcher
:
new
db
(
'
192.168.4.116
'
,
'
9901
'
,
''
,
''
,
''
),
user_credit
:
new
db
(
''
,
'
9001
'
,
''
,
''
,
''
),
workflow
:
new
db
(
'
192.168.4.80
'
,
'
3307
'
,
''
,
''
,
'
dec_out out_config out_config_value params_value var_detail var_group
'
),
xyqb_app
:
new
db
(
''
,
'
3307
'
,
''
,
''
,
'
activities app_banners app_config app_versions banners blanknote_entries credit_questions hot_games loan_banners loan_questions migrations sharings widgets js_patch upgrade_version
'
),
xyqb_btzt
:
new
db
(
''
,
'
9002
'
,
''
,
''
,
'
zt_channel zt_fund zt_fund_channel zt_fund_credit zt_fund_term
'
),
xyqb_user
:
new
db
(
''
,
'
3313
'
,
''
,
''
,
'
merchant_config merchant
'
),
}
}
return
this
.
dbs
return
this
.
dbs
},
},
get_mysql_dump_opt
:
function
(
key
)
{
get_mysql_dump_opt
:
function
(
key
)
{
let
item
=
this
.
dbs
[
key
];
let
item
=
this
.
dbs
[
key
];
return
`--host=
${
item
.
host
}
--port=
${
item
.
port
}
--user=
${
item
.
user
}
--password='
${
item
.
pwd
}
' -d
${
key
}
`
return
`--host=
${
item
.
host
}
--port=
${
item
.
port
}
--user=
${
item
.
user
}
--password='
${
item
.
pwd
}
' -d
${
key
}
`
},
},
get_mysql_dump_table
:
function
(
key
)
{
get_mysql_dump_table
:
function
(
key
)
{
let
item
=
this
.
dbs
[
key
];
let
item
=
this
.
dbs
[
key
];
return
`
${
item
.
sys_table_list
}
`
return
item
.
sys_table_list
},
},
get_target_mysql_command
:
function
(
key
)
{
get_target_mysql_command
:
function
(
key
)
{
}
}
}
}
\ No newline at end of file
qa_shell_script/config_server/get_project_config.
js.back
→
qa_shell_script/config_server/get_project_config.
bak.js
View file @
ab546dab
File moved
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