diff --git a/bin/generate b/bin/generate index 314537d..c814ebc 100644 --- a/bin/generate +++ b/bin/generate @@ -1,9 +1,9 @@ #!/bin/bash -root_path=/apps/zone_scfp/hudi/cloud +jars_path=/data/datalake/jars jdk_path=/opt/jdk8u252-b09/bin/java arguments=$@ -curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222/service-cli-runner-1.0.0-SNAPSHOT.jar -o ${root_path}/service-cli-runner.jar -${jdk_path} -jar ${root_path}/service-cli-runner.jar --spring.profiles.active=b9 $arguments -chmod +x *.sh +curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222/service-cli-runner-1.0.0-SNAPSHOT.jar -o ${jars_path}/service-cli-runner.jar +${jdk_path} -jar ${jars_path}/service-cli-runner.jar --spring.profiles.active=b12 $arguments +chmod +x cloud/*.sh diff --git a/service-cli/service-cli-runner/src/main/java/com/lanyuanxiaoyao/service/cli/runner/RunnerApplication.java b/service-cli/service-cli-runner/src/main/java/com/lanyuanxiaoyao/service/cli/runner/RunnerApplication.java index 31a8ae6..db7421a 100644 --- a/service-cli/service-cli-runner/src/main/java/com/lanyuanxiaoyao/service/cli/runner/RunnerApplication.java +++ b/service-cli/service-cli-runner/src/main/java/com/lanyuanxiaoyao/service/cli/runner/RunnerApplication.java @@ -82,18 +82,22 @@ public class RunnerApplication implements ApplicationRunner { @Override public void run(ApplicationArguments args) throws IOException { logger.info("Loading runtime info: {}", mapper.writeValueAsString(runtimeInfo)); + + generateCloud(Paths.get("cloud")); + generateCloud(Paths.get("command")); + } + + private void generateCloud(Path root) throws IOException { + Files.createDirectories(root); + String absolutRootPath = root.toAbsolutePath().toString(); + logger.info("Current path: {}", absolutRootPath); + Path planPath = Paths.get("deploy.plan"); Map> deployPlans = new HashMap<>(); if (Files.exists(planPath) && !deployInformationProperties.getShuffler()) { deployPlans = mapper.readValue(new String(Files.readAllBytes(planPath)), new TypeReference>>() {}); } - Path root = Paths.get(""); - Files.createDirectories(root); - - String absolutRootPath = root.toAbsolutePath().toString(); - logger.info("Current path: {}", absolutRootPath); - TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); Template deployTemplate = engine.getTemplate("deploy.ftl"); for (ServiceInfoWrapper serviceInfo : serviceInfoList) { @@ -256,4 +260,7 @@ public class RunnerApplication implements ApplicationRunner { Files.deleteIfExists(planPath); Files.write(planPath, mapper.writeValueAsString(deployPlans).getBytes()); } + + private void generateCommand(Path root) throws IOException { + } }