提交 5b138ae7 authored 作者: chenshiying's avatar chenshiying

[新增] 部署脚本更新

上级 ea6482d0
......@@ -109,8 +109,8 @@ public class GeneratorScript {
model.put("normalList", frontInstanceDto.getNormalList());
//创建政务网nginx配置
buildFrontZwwNginxConfig(frontInstanceDto, model);
buildFrontHlwNginxConfig(frontInstanceDto, model);
buildFrontZwwNginxConfig(model);
buildFrontHlwNginxConfig(model);
});
} catch (Exception e) {
......@@ -267,65 +267,20 @@ public class GeneratorScript {
}
private static void buildFrontZwwNginxConfig(FrontInstanceDto frontInstanceDto, Map model) {
String serviceName = frontInstanceDto.getServiceName();
//TODO
// if ("version-web".equals(serviceName)) {
// String serviceNameSub = "loit-" + serviceName.replace("-web", "").replace("-h5", "");
// model.put("serviceNameSub", serviceNameSub);
// String serviceNameCookie = "loit" + serviceName.replaceAll("-", "");
// model.put("serviceNameCookie", serviceNameCookie);
//
// //TODO
// List<String> grayList = new ArrayList<>();
// grayList.add("10.0.120.37:9125");
// grayList.add("10.0.120.128:9125");
//
// List<String> normalList = new ArrayList<>();
// normalList.add("10.0.120.37:9126");
// normalList.add("10.0.120.128:9126");
//
// model.put("grayList", grayList);
// model.put("normalList", normalList);
//
// String nginxConfig = FreeMarkerUtils.process("zww-nginx-upstream.ftl", model);
// System.out.println(nginxConfig);
// }
//
// if ("gray-server-web".equals(serviceName)) {
// String serviceNameSub = "loit-" + serviceName.replace("-web", "").replace("-h5", "");
// model.put("serviceNameSub", serviceNameSub);
// String serviceNameCookie = "loit" + serviceName.replaceAll("-", "");
// model.put("serviceNameCookie", serviceNameCookie);
//
// //TODO
// List<String> grayList = new ArrayList<>();
// grayList.add("10.0.120.135:9127");
// grayList.add("10.0.120.190:9127");
//
// List<String> normalList = new ArrayList<>();
// normalList.add("10.0.120.135:9128");
// normalList.add("10.0.120.190:9128");
//
// model.put("grayList", grayList);
// model.put("normalList", normalList);
//
// String nginxConfig = FreeMarkerUtils.process("zww-nginx-upstream.ftl", model);
// System.out.println(nginxConfig);
// }
private static void buildFrontZwwNginxConfig(Map model) {
String nginxConfigDir = root_path_full + "\\zww-nginx.conf";
FileUtils.appendNewLine(nginxConfigDir, "----------------------------------"+ model.get("serviceName") + "----------------------------------");
String nginxConfig = FreeMarkerUtils.process("zww-nginx-upstream.ftl", model);
System.out.println(nginxConfig);
FileUtils.appendNewLine(nginxConfigDir, nginxConfig);
}
private static void buildFrontHlwNginxConfig(FrontInstanceDto frontInstanceDto, Map model) {
private static void buildFrontHlwNginxConfig(Map model) {
String nginxConfigDir = root_path_full + "\\hlw-nginx.conf";
FileUtils.appendNewLine(nginxConfigDir, "----------------------------------"+ model.get("serviceName") + "----------------------------------");
String nginxConfig = FreeMarkerUtils.process("hlw-nginx-upstream.ftl", model);
System.out.println(nginxConfig);
FileUtils.appendNewLine(nginxConfigDir, nginxConfig);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论