Commit aef753e0 authored by jinkaiqiang's avatar jinkaiqiang

保存将返回id

安装docker之后会自动重启服务器
parent 81fd2288
Pipeline #25779 passed with stage
in 24 seconds
......@@ -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):
'''
......
......@@ -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安装成功')
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment