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
4e3ca61c
Commit
4e3ca61c
authored
Jan 17, 2018
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Plain Diff
a
parents
684b6416
e8204a29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
get_project_config_server.js
qa_shell_script/config_server/get_project_config_server.js
+8
-2
docker_env_name.sh
qa_shell_script/ngrok/docker_env_name.sh
+1
-1
make_frp_ini.sh
qa_shell_script/ngrok/make_frp_ini.sh
+12
-7
No files found.
qa_shell_script/config_server/get_project_config_server.js
View file @
4e3ca61c
...
...
@@ -83,13 +83,19 @@ admin.post('/add_new_proxy', function (req, res) {
res
.
send
({
msg
:
"
错误,请检查 docket_env_name.sh 文件
"
})
return
}
// proxy_ports = {
// "http_port": http_port,
// "https_port": https_port
// }
if
(
sourcestr
!=
undefined
){
var
items
=
sourcestr
.
split
(
"
|
"
);
if
(
items
[
1
]
==
request
[
"
ip
"
]){
res
.
send
({
msg
:
"
已经存在的配置
"
});
return
}
else
{
targetstr
=
request
[
"
namespace
"
]
+
"
|
"
+
request
[
"
ip
"
]
+
"
|
"
+
request
[
"
port
"
];
targetstr
=
request
[
"
namespace
"
]
+
"
|
"
+
request
[
"
ip
"
]
+
"
|
"
+
request
[
"
p
roxy_ports
"
][
"
http_port
"
]
+
"
|
"
+
request
[
"
proxy_ports
"
][
"
https_p
ort
"
];
newstr
=
str
.
replace
(
sourcestr
,
targetstr
);
}
}
else
{
...
...
@@ -97,7 +103,7 @@ admin.post('/add_new_proxy', function (req, res) {
return
}
}
else
{
newstr
=
str
+
"
"
+
request
[
"
namespace
"
]
+
"
|
"
+
request
[
"
ip
"
]
+
"
|
"
+
request
[
"
port
"
];
newstr
=
str
+
"
"
+
request
[
"
namespace
"
]
+
"
|
"
+
request
[
"
ip
"
]
+
"
|
"
+
request
[
"
p
roxy_ports
"
][
"
http_port
"
]
+
"
|
"
+
request
[
"
proxy_ports
"
][
"
https_p
ort
"
];
//文件添加到这里面
}
newstr
=
newstr
.
replace
(
/
\n
/
,
""
);
...
...
qa_shell_script/ngrok/docker_env_name.sh
View file @
4e3ca61c
dongmeifeng|192.168.4.77|32648 |30168
dongmeifeng|192.168.4.77|32648|31021
qa_shell_script/ngrok/make_frp_ini.sh
View file @
4e3ca61c
...
...
@@ -6,10 +6,14 @@ frp_file_path="/home/quant_group/frp_0.12.0_linux_amd64"
filename
=
"
$frp_file_path
/frpc_custom_new_1.ini"
nginxname
=
"/usr/local/openresty/nginx/conf/conf.d"
pwd_path_0
=
"/home/qa-deploy-utils"
dockernamespace
=
`
cat
$pwd_path
/ngrok/docker_env_name.sh
`
ips
=
`
cat
$config_server
/get_env_ip.sh
`
rm
-rf
$filename
rm
-rf
$nginxname
/
*
function
addFrpcHead
()
{
echo
"[common]"
>>
$1
...
...
@@ -107,10 +111,10 @@ function createNginxHttpAndSSLConf()
{
cus_domain
=
$1
cus_ip
=
$2
cus_port
=
$3
file_name
=
$4
http_port
=
$3
https_port
=
$4
file_name
=
$5
rm
-rf
$file_name
touch
$file_name
echo
"server {"
>>
$file_name
...
...
@@ -119,7 +123,7 @@ function createNginxHttpAndSSLConf()
echo
" proxy_set_header Host
\$
host;"
>>
$file_name
echo
""
>>
$file_name
echo
" location / {"
>>
$file_name
echo
" proxy_pass http://
$cus_ip
:
$
cus
_port
;"
>>
$file_name
echo
" proxy_pass http://
$cus_ip
:
$
http
_port
;"
>>
$file_name
echo
" }"
>>
$file_name
echo
"}"
>>
$file_name
echo
""
>>
$file_name
...
...
@@ -138,7 +142,7 @@ function createNginxHttpAndSSLConf()
echo
" proxy_set_header Host
\$
host;"
>>
$file_name
echo
""
>>
$file_name
echo
" location / {"
>>
$file_name
echo
" proxy_pass http://
$cus_ip
;"
>>
$file_name
echo
" proxy_pass http://
$cus_ip
:
$https_port
;"
>>
$file_name
echo
" }"
>>
$file_name
echo
"}"
>>
$file_name
...
...
@@ -172,9 +176,10 @@ do
do
var
=(
${
projectAndPort
//|/
}
)
namespace
=(
${
host_name
//|/
}
)
echo
"
$namespace
"
if
[[
${
var
[0]
}
!=
"xyqb-ui"
]]
&&
[[
${
var
[0]
}
!=
"paycenter-ui"
]]
;
then
addFrpcSub
${
var
[0]
}
-
${
var
[2]
}
http 127.0.0 1 8000
${
var
[2]
}
-
${
namespace
[0]
}
$filename
createNginxHttpAndSSLConf
${
var
[2]
}
-
${
namespace
[0]
}
${
namespace
[1]
}
${
namespace
[2]
}
$nginxname
/
${
var
[0]
}
-
${
namespace
[0]
}
.conf
createNginxHttpAndSSLConf
${
var
[2]
}
-
${
namespace
[0]
}
${
namespace
[1]
}
${
namespace
[2]
}
$
{
namespace
[3]
}
$
nginxname
/
${
var
[0]
}
-
${
namespace
[0]
}
.conf
fi
done
basePorts
=
"redis|80 db|3306 rabbitmq|80"
...
...
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