Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Script
install.api
Commits
aef753e0
Commit
aef753e0
authored
Jul 10, 2020
by
jinkaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存将返回id
安装docker之后会自动重启服务器
parent
81fd2288
Pipeline
#25779
passed with stage
in 24 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
557 additions
and
7 deletions
+557
-7
conncetion_service.py
app/conncetion/conncetion_service.py
+3
-3
install_service.py
app/install/install_service.py
+4
-4
test_compare_images.py
test_compare_images.py
+550
-0
No files found.
app/conncetion/conncetion_service.py
View file @
aef753e0
...
...
@@ -82,7 +82,7 @@ values
self
.
generate_huansi_profiled
(
data
)
return
{
'
message'
:
"保存成功"
}
return
{
'
id'
:
id
}
def
generate_huansi_profiled
(
self
,
data
):
import
os
...
...
@@ -207,7 +207,7 @@ values
('{id}','{project_no}','{server_ip}','{server_ssh_port}','{server_user}','{server_password}','{work_shop_no}') '''
session
.
exec_sql
(
insert_sql
,
json_data
)
return
{
'
message'
:
"保存成功"
}
return
{
'
id'
:
id
}
def
set_remote_db_info
(
self
,
json_data
):
'''
...
...
@@ -266,7 +266,7 @@ values
self
.
generate_huansi_server_profiled
(
json_data
)
return
{
'
message'
:
"保存成功"
}
return
{
'
id'
:
id
}
def
generate_huansi_server_profiled
(
self
,
json_data
):
'''
...
...
app/install/install_service.py
View file @
aef753e0
...
...
@@ -146,12 +146,12 @@ class InstallService(HSBaseUCService):
logger
.
info
(
'执行安装命令'
)
out
,
err
=
ssh
.
exec_command
(
'cd / && python install_docker.py'
)
logger
.
info
(
f
'执行安装命令信息:{out},其他信息:{err}'
)
#
logger.info('执行重启命令')
#
out2, err2 = ssh.exec_command('reboot')
#
logger.info(f'执行重启命令信息:{out2},错误信息:{err2}')
logger
.
info
(
'执行重启命令'
)
out2
,
err2
=
ssh
.
exec_command
(
'reboot'
)
logger
.
info
(
f
'执行重启命令信息:{out2},错误信息:{err2}'
)
# logger.info(f'执行成功,静等服务器重启。。。')
logger
.
info
(
'******************************************************'
)
logger
.
info
(
'*********
需要在服务器上手工执行reboot重启服务器
************'
)
logger
.
info
(
'*********
执行成功,静等服务器重启。。。
************'
)
logger
.
info
(
'*********如果有疑问,请联系开发人员***********************'
)
logger
.
info
(
'******************************************************'
)
logger
.
info
(
'docker安装成功'
)
...
...
test_compare_images.py
0 → 100644
View file @
aef753e0
This diff is collapsed.
Click to expand it.
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