Package io.fabric8.docker.api.container

Examples of io.fabric8.docker.api.container.ContainerCreateStatus


  }

  @Override
  public INodeStatistics getNodeStats(String nodeId) {
    if (nodeId != null) {
      CamelProcessorMBean processorMBean = camelContextNode.getProcessorMBean(nodeId);
      if (processorMBean != null) {
        return new ProcessorNodeStatistics(processorMBean);
      }
    }
    return null;
View Full Code Here


        Map<String, String> environmentVariables = parameters.getEnvironmentVariables();
        String containerType = parameters.getContainerType();
        String jolokiaUrl = parameters.getJolokiaUrl();
        String name = options.getName();
        String dockerHost = dockerFactory.getDockerHost();
        ContainerCreateStatus status = null;
        CreateDockerContainerMetadata metadata = null;
        try {
            status = docker.containerCreate(containerConfig, name);
            LOG.info("Got status: " + status);
            options = options.updateManualIp(dockerHost);

            metadata = newInstance(containerConfig, options, status, containerType);

            publishZooKeeperValues(options, environmentVariables);

            if (jolokiaUrl != null) {
                metadata.setJolokiaUrl(jolokiaUrl);
                startJolokiaKeepAlive(metadata);
            }
        } catch (Exception e) {
            LOG.info("Failed to create container " + name + " from config " + containerConfig
                    + ": " + e + Dockers.dockerErrorMessage(e), e);
            throw e;
        }
        startDockerContainer(status.getId(), options);
        return metadata;
    }
View Full Code Here

            envVars.put(EnvironmentVariables.KARAF_NAME, containerName);
            List<String> envList = Dockers.toEnvList(envVars);
            containerConfig.setEnv(envList);
            System.out.println("Creating docker container name " + containerName
                    + " with config: " + containerConfig);
            ContainerCreateStatus status = docker.containerCreate(containerConfig, containerName);
            rootDockerContainerId = status.getId();
            String[] warnings = status.getWarnings();
            if (warnings != null) {
                for (String warning : warnings) {
                    System.out.println("WARNING: " + warning);
                }
            }
View Full Code Here

    public void testContainerCreate() throws IOException {
        recordResponse("container/create-response");
        ContainerConfig cfg = new ContainerConfig();
        cfg.setImage("base");
        cfg.setCmd(new String[]{"date"});
        ContainerCreateStatus containerCreateStatus = docker.containerCreate(cfg, null);
        assertNotNull(containerCreateStatus);
        assertEquals(containerCreateStatus.getId(), "e90e34656806");
    }
View Full Code Here

            config.setCmd(new String[]{cmd});
        }
        config.setAttachStdout(true);
        config.setAttachStderr(true);
        System.out.println("Creating container: " + config);
        ContainerCreateStatus status = docker.containerCreate(config, name);
        System.out.println(status);
        return status.getId();
    }
View Full Code Here

        ContainerConfig containerConfig = parameters.getContainerConfig();
        Map<String, String> environmentVariables = parameters.getEnvironmentVariables();
        String containerType = parameters.getContainerType();

        ContainerCreateStatus status = null;
        CreateKubernetesContainerMetadata metadata = null;

        metadata = createKubernetesContainerMetadata(options, status, containerType);
        publishZooKeeperValues(options, environmentVariables);
        return metadata;
View Full Code Here

        TcpClientRequestFacade requestFacade = new TcpClientRequestFacade(socket);
        String path = pathLoadBalancer.choose(paths, requestFacade);
        if (path != null) {
            List<ServiceDetails> services = serviceMap.getServices(path);
            if (!services.isEmpty()) {
                ServiceDetails serviceDetails = serviceLoadBalancer.choose(services, requestFacade);
                if (serviceDetails != null) {
                    List<String> urlStrings = serviceDetails.getServices();
                    for (String urlString : urlStrings) {
                        if (Strings.notEmpty(urlString)) {
                            // lets create a client for this request...
                            try {
                                URI uri = new URI(urlString);
View Full Code Here

   * @see
   * org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object)
   */
  @Override
  public Image getImage(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return getLevelImage(le);
    }
    return super.getImage(element);
  }
View Full Code Here

   * @see
   * org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
   */
  @Override
  public String getText(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return le.getLevel();
    }
    return super.getText(element);
  }
View Full Code Here

   * org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.
   * Object)
   */
  @Override
  public String getToolTipText(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return le.getMessage();
    }
    return super.getToolTipText(element);
  }
View Full Code Here

TOP

Related Classes of io.fabric8.docker.api.container.ContainerCreateStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.