...
|
...
|
@@ -350,6 +350,7 @@ function deploy(instanceIds){ |
|
|
deployLaster();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
writeToText("正在部署系统,请稍后...");
|
|
|
//3:根据ip部署项目,得到消息id
|
|
|
var messageId = deployProject(ips);
|
...
|
...
|
@@ -453,14 +454,6 @@ function deployProjectGetMsg(msgId, ips){ |
|
|
|
|
|
//4:集成测试
|
|
|
integrationTest(ips);
|
|
|
|
|
|
//5:更新git文件
|
|
|
editToGit(ips);
|
|
|
|
|
|
//部署全部成功后执行
|
|
|
deployLaster();
|
|
|
|
|
|
writeToText("完毕..........");
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
...
|
...
|
@@ -491,6 +484,10 @@ function integrationTest(ips){ |
|
|
var stateMsg;
|
|
|
if(state == 200){
|
|
|
stateMsg = "成功访问";
|
|
|
|
|
|
writeToText("正在更新git-iptables,请稍后...");
|
|
|
//5:更新git文件
|
|
|
editToGit();
|
|
|
}else{
|
|
|
stateMsg = "访问失败";
|
|
|
}
|
...
|
...
|
@@ -506,14 +503,35 @@ function integrationTest(ips){ |
|
|
}
|
|
|
|
|
|
//5:ip写入git
|
|
|
function editToGit(ips){
|
|
|
function editToGit(){
|
|
|
var url = '/autoScalingTool/updateIpToGit?cloudType='+$("#cloudType").val()+'&projectName='+scalingGroupName+'&scalingGroupId=' + souScalingGroupId;
|
|
|
$.ajax({
|
|
|
url: url,
|
|
|
type: 'POST',
|
|
|
dataType: 'json',
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
if (!data || data.code != 200) {
|
|
|
responseError(data);
|
|
|
}else{
|
|
|
writeToText(" ");
|
|
|
writeToText("更新之后的ip集合是:"+data.message);
|
|
|
writeToText("第 5 步:更新git - app-iptable文件成功!");
|
|
|
|
|
|
writeToText("第 5 步:更新git - app-iptable文件成功!");
|
|
|
//部署全部成功后执行
|
|
|
deployLaster();
|
|
|
|
|
|
writeToText("完毕..........");
|
|
|
}
|
|
|
},
|
|
|
error: function (e) {
|
|
|
requestError(url);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//缩容成功后执行
|
|
|
function unDeploy(){
|
|
|
|
|
|
//发布完之后,显示关闭按钮
|
|
|
$("#closeButton").removeAttr("disabled");
|
|
|
|
...
|
...
|
|