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
18998411
Commit
18998411
authored
Feb 20, 2017
by
QA-甘 盛聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
348afa4d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
6_start_by_name.sh
qa_shell_script/6_start_by_name.sh
+20
-0
get_env_ip.sh
qa_shell_script/config_server/get_env_ip.sh
+5
-0
remote_excute_start.sh
qa_shell_script/remote_excute_start.sh
+18
-0
sub_shell.sh
qa_shell_script/sub_shell.sh
+3
-0
No files found.
qa_shell_script/6_start_by_name.sh
0 → 100644
View file @
18998411
#!/bin/bash
project
=
$1
project_path
=
`
cat
$config_server
/project_path.sh
`
function
startJavaProject
()
{
sh
$config_server
/show_info.sh
$project
重新启动
$desc
cd
$project_path
/
$project
P_UUID
=
`
ps
-ef
|grep
${
project
}
.jar |grep
-v
'grep'
|awk
'{print $2}'
`
if
[
-n
"
${
P_UUID
}
"
]
;
then
echo
"-----KILL
$project
PPID=
${
P_UUID
}
"
echo
`
kill
-9
${
P_UUID
}
`
sleep
2s
fi
if
[[
$project
==
"redpacket"
]]
;
then
echo
`
java
-Xmx512m
-XX
:PermSize64m
-Xloggc
:/tmp/
${
project
}
.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-jar
${
project
}
.jar
--worker
1
--currentWorker
1
-t
-ts
>
/dev/null 2>&1 &
`
else
echo
`
java
-Xmx512m
-XX
:PermSize64m
-Xloggc
:/tmp/
${
project
}
.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-jar
${
project
}
.jar
--worker
1
--currentWorker
1
-t
>
/dev/null 2>&1 &
`
fi
}
\ No newline at end of file
qa_shell_script/config_server/get_env_ip.sh
0 → 100644
View file @
18998411
IP_host
=
3 12 13 14 15 16 17 24 151 152
for
i
in
${
IP_HOST
[@]
}
do
echo
$i
done
\ No newline at end of file
qa_shell_script/remote_excute_start.sh
0 → 100644
View file @
18998411
#!/bin/bash
#project_path=`cat $config_server/get_env_ip.sh`
IP_host_first
=
"192.168.4."
project_name
=
$1
target_ip
=
$2
for
ip_last_num
in
$target_ip
do
expect
-c
"
set timeout 10
spawn ssh root@
${
IP_host_first
}${
target_ip
}
expect *ssword* { send !QAZ2wsx
\r
}
expect
\"
]#
\"
send
\"
sh /home/qa-deploy-utils/qa_shell_script/6_start_by_name.sh
$project_name
\r\"
set timeout -1
expect
\"
]#
\"
send
\"
exit
\r\"
expect eof;"
done
\ No newline at end of file
qa_shell_script/sub_shell.sh
View file @
18998411
...
@@ -21,13 +21,16 @@ do
...
@@ -21,13 +21,16 @@ do
cp
-rf
/home/config_files/java/
*
$dir
/java/
cp
-rf
/home/config_files/java/
*
$dir
/java/
cp
-rf
/home/config_files/java/
*
$dir
/public/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
/java/
*
sed
-i
"s/target_mq_host_name/
${
IP_host_first
}${
ip_last_num
}
/"
$dir
/java/
*
if
[
$ip_last_num
-lt
100
]
;
then
if
[
$ip_last_num
-lt
100
]
;
then
sed
-i
"s/target_host_name:7/
${
public_ip
}
:
${
ip_last_num
}
/g"
$dir
/public/java/
*
sed
-i
"s/target_host_name:7/
${
public_ip
}
:
${
ip_last_num
}
/g"
$dir
/public/java/
*
else
else
sed
-i
"s/target_host_name:70/
${
public_ip
}
:
${
ip_last_num
}
/g"
$dir
/public/java/
*
sed
-i
"s/target_host_name:70/
${
public_ip
}
:
${
ip_last_num
}
/g"
$dir
/public/java/
*
fi
fi
sed
-i
"s/target_host_name/
${
public_ip
}
/g"
$dir
/public/java/
*
sed
-i
"s/target_host_name/
${
public_ip
}
/g"
$dir
/public/java/
*
sed
-i
"s/target_mq_host_name/
${
IP_host_first
}${
ip_last_num
}
/"
$dir
/public/java/
*
sed
-i
"s/
${
public_ip
}
:3306/
${
IP_host_first
}${
ip_last_num
}
:3306/g"
$dir
/public/java/
*
sed
-i
"s/
${
public_ip
}
:3306/
${
IP_host_first
}${
ip_last_num
}
:3306/g"
$dir
/public/java/
*
sed
-i
"s/redis.master.host=
${
public_ip
}
/redis.master.host=
${
IP_host_first
}${
ip_last_num
}
/g"
$dir
/public/java/
*
sed
-i
"s/redis.master.host=
${
public_ip
}
/redis.master.host=
${
IP_host_first
}${
ip_last_num
}
/g"
$dir
/public/java/
*
sed
-i
"s/zk.connect.url=
${
public_ip
}
/zk.connect.url=
${
IP_host_first
}${
ip_last_num
}
/g"
$dir
/public/java/
*
sed
-i
"s/zk.connect.url=
${
public_ip
}
/zk.connect.url=
${
IP_host_first
}${
ip_last_num
}
/g"
$dir
/public/java/
*
...
...
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