Skip to content

Commit

Permalink
installation log and websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay.H.Zou authored and Jay.H.Zou committed Nov 28, 2019
1 parent 00011d8 commit 8a4c0f2
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,36 @@ public boolean installFlow(AbstractNodeOperation installationOperation, Installa
}
// 数据准备
InstallationWebSocketHandler.appendLog(clusterName, "Start preparing installation...");
logger.info(clusterName + " start preparing installation...");
boolean prepareSuccess = prepareForInstallation(installationOperation, installationParam);
if (!prepareSuccess) {
return false;
}

InstallationWebSocketHandler.appendLog(clusterName, "Start pulling redis.conf...");
logger.info(clusterName + " start pulling redis.conf...");
// 分发配置文件
boolean pullConfigSuccess = pullConfig(installationOperation, installationParam);
if (!pullConfigSuccess) {
return false;
}

InstallationWebSocketHandler.appendLog(clusterName, "Start pulling image...");
logger.info(clusterName + " start pulling image...");
boolean pullImageSuccess = pullImage(installationOperation, installationParam);
// 拉取安装包
if (!pullImageSuccess) {
return false;
}

InstallationWebSocketHandler.appendLog(clusterName, "Start installing redis node...");
logger.info(clusterName + " start installing redis node...");
// 节点安装
boolean installSuccess = install(installationOperation, installationParam);
if (!installSuccess) {
return false;
}
InstallationWebSocketHandler.appendLog(clusterName, "Start initializing...");
logger.info(clusterName + " start initializing...");
boolean initSuccess;
if (Objects.equals(redisMode, CLUSTER)) {
initSuccess = initCluster(installationParam);
Expand All @@ -117,6 +121,7 @@ public boolean installFlow(AbstractNodeOperation installationOperation, Installa
InstallationWebSocketHandler.appendLog(clusterName, "Initialized error.");
}
InstallationWebSocketHandler.appendLog(clusterName, "Start saving to database...");
logger.info(clusterName + " start saving to database...");
return saveToDB(installationParam);
}

Expand Down Expand Up @@ -207,6 +212,7 @@ private boolean checkMachineList(InstallationParam installationParam) {
SSH2Util.getConnection(machine);
} catch (Exception e) {
InstallationWebSocketHandler.appendLog(clusterName, machine.getHost() + " connection refused");
logger.info(clusterName + " " + machine.getHost() + " connection refused");
result = false;
}
}
Expand Down

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>redis-manager</title><link rel="shortcut icon" type=image/x-icon href=/static/logo.ico><link rel="shortcut icon" href=/logo.ico><link href=/static/css/app.768aa179ffac6000d4329e1195684e81.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.39abc589ebc5cba52da1.js></script><script type=text/javascript src=/static/js/app.deec4299757feb7ddc91.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>redis-manager</title><link rel="shortcut icon" type=image/x-icon href=/static/logo.ico><link rel="shortcut icon" href=/logo.ico><link href=/static/css/app.3a68b0a6aaff9e34729e841092f8852d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.39abc589ebc5cba52da1.js></script><script type=text/javascript src=/static/js/app.581094191e8806c0549d.js></script></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,11 @@ export default {
if (valid) {
//this.installationInfoVisible = true;
this.buildParam();
this.initWebSocket();
try {
this.initWebSocket();
} catch (err) {
message.error("Open websocket failed.")
}
this.install();
} else {
return false;
Expand Down Expand Up @@ -711,7 +715,7 @@ export default {
this.websocketsend(this.installationParam.clusterName);
},
websocketonerror() {
message.error("Build websocket error");
message.error("Build websocket failed, but you can still install.");
},
websocketonmessage(msg) {
//数据接收
Expand Down

0 comments on commit 8a4c0f2

Please sign in to comment.