@Test @SuppressWarnings("unchecked") @Ignore public void testLaunchTask() throws Exception { ClusterConfig config = ClusterConfigImpl.builder().host("localhost:2375").build(); DockerService dockerService = DockerServiceImpl.builder() .config(config) .restTemplate(new AsyncRestTemplate()) .nodeInfoProvider(mock(NodeInfoProvider.class)) .eventConsumer(mock(MessageBus.class)) .objectMapper(new ObjectMapper()) .cluster("test") .build(); ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader.getResource("docker-compose.yml").getFile()); ComposeResult composeResult = composeExecutor.up(ComposeArg.builder().file(file).runUpdate(false).build(), dockerService); Assert.notNull(composeResult); }
public ComposeResult up(final ComposeArg composeArg, DockerService dockerService) { Assert.notNull(composeArg.getFile(), "file can't be null"); String path = composeArg.getFile().getAbsolutePath(); log.info("Running file", composeArg, path); ComposeMonitor monitor = new ComposeMonitor(dockerService, path); if (composeArg.isRunUpdate()) { updateImages(path, monitor); } if (composeArg.isCheckContainersUpDuringStart()) { monitor.subscribeToChanges(r -> shutDown(monitor, path, dockerService), checkIntervalInSec); } return startCompose(monitor, path, composeArg.getAppName(), dockerService); }
ComposeExecutor { public ComposeResult up(final ComposeArg composeArg, DockerService dockerService) { Assert.notNull(composeArg.getFile(), "file can't be null"); String path = composeArg.getFile().getAbsolutePath(); log.info("Running file", composeArg, path); ComposeMonitor monitor = new ComposeMonitor(dockerService, path); if (composeArg.isRunUpdate()) { updateImages(path, monitor); } if (composeArg.isCheckContainersUpDuringStart()) { monitor.subscribeToChanges(r -> shutDown(monitor, path, dockerService), checkIntervalInSec); } return startCompose(monitor, path, composeArg.getAppName(), dockerService); } }
ComposeExecutor { public ComposeResult up(final ComposeArg composeArg, DockerService dockerService) { Assert.notNull(composeArg.getFile(), "file can't be null"); String path = composeArg.getFile().getAbsolutePath(); log.info("Running file", composeArg, path); ComposeMonitor monitor = new ComposeMonitor(dockerService, path); if (composeArg.isRunUpdate()) { updateImages(path, monitor); } if (composeArg.isCheckContainersUpDuringStart()) { monitor.subscribeToChanges(r -> shutDown(monitor, path, dockerService), checkIntervalInSec); } return startCompose(monitor, path, composeArg.getAppName(), dockerService); }  }
ComposeExecutor { public ComposeResult up(final ComposeArg composeArg, DockerService dockerService) { Assert.notNull(composeArg.getFile(), "file can't be null"); String path = composeArg.getFile().getAbsolutePath(); log.info("Running file", composeArg, path); ComposeMonitor monitor = new ComposeMonitor(dockerService, path); if (composeArg.isRunUpdate()) { updateImages(path, monitor); } if (composeArg.isCheckContainersUpDuringStart()) { monitor.subscribeToChanges(r -> shutDown(monitor, path, dockerService), checkIntervalInSec); } return startCompose(monitor, path, composeArg.getAppName(), dockerService); }  ComposeResult up(final ComposeArg composeArg, DockerService dockerService); void stop(Application application, final DockerService dockerService); void rm(Application application, final DockerService dockerService); String getBasedir(); }
ComposeExecutor { public ComposeResult up(final ComposeArg composeArg, DockerService dockerService) { Assert.notNull(composeArg.getFile(), "file can't be null"); String path = composeArg.getFile().getAbsolutePath(); log.info("Running file", composeArg, path); ComposeMonitor monitor = new ComposeMonitor(dockerService, path); if (composeArg.isRunUpdate()) { updateImages(path, monitor); } if (composeArg.isCheckContainersUpDuringStart()) { monitor.subscribeToChanges(r -> shutDown(monitor, path, dockerService), checkIntervalInSec); } return startCompose(monitor, path, composeArg.getAppName(), dockerService); }  ComposeResult up(final ComposeArg composeArg, DockerService dockerService); void stop(Application application, final DockerService dockerService); void rm(Application application, final DockerService dockerService); String getBasedir();  }