Package io.fabric8.process.manager

Examples of io.fabric8.process.manager.Installation


    @Override
    public Result execute(UIExecutionContext context) throws Exception {
        Kubernetes kubernetes = getKubernetes();

        String idText = replicationControllerId.getValue();
        ReplicationControllerSchema replicationController = kubernetes.getReplicationController(idText);
        if (replicationController == null) {
            System.out.println("No replicationController for id: " + idText);
        } else {
            executeReplicationController(replicationController);
        }
View Full Code Here


    }

    @Override
    public Result execute(UIExecutionContext uiExecutionContext) throws Exception {
        Kubernetes kubernetes = getKubernetes();
        ServiceListSchema services = kubernetes.getServices();
        printServices(services, System.out);
        return null;
    }
View Full Code Here

        if (container != null) {
            container.setProvisionResult(Container.PROVISION_DOWNLOADING);
        }
        ProcessManager procManager = processManager;
        Map<String,String> initialEnvironmentVariables = new HashMap<String, String>();
        Installation installation = createInstallation(procManager, container, options, metadata, initialEnvironmentVariables);
        if (container != null) {
            container.setProvisionResult(Container.PROVISION_FINALIZING);
        }
        if (installation != null) {
            installation.getController().start();
        }
        return metadata;
    }
View Full Code Here

    }


    @Override
    public void start(Container container) {
        Installation installation = getInstallation(container);
        if (installation != null) {
            try {
                installation.getController().start();
            } catch (Exception e) {
                handleException("Starting container " + container.getId(), e);
            }
        }
    }
View Full Code Here

        }
    }

    @Override
    public void stop(Container container) {
        Installation installation = getInstallation(container);
        if (installation != null) {
            try {
                installation.getController().stop();
                container.setProvisionResult(Container.PROVISION_STOPPED);
                owner.deleteContainerZooKeeperPaths(installation, container);
            } catch (Exception e) {
                handleException("Stopping container " + container.getId(), e);
            }
View Full Code Here

        }
    }

    @Override
    public void destroy(Container container) {
        Installation installation = getInstallation(container);
        if (installation != null) {
            try {
                installation.getController().stop();
                owner.deleteContainerZooKeeperPaths(installation, container);
            } catch (Exception e) {
                LOG.info("Failed to stop process for container " + container.getId() + ". " + e, e);
            }
            processManager.uninstall(installation);
View Full Code Here

                if (installation.getUrl() != null && !installation.getUrl().toString().equals(config.getUrl())) {
                    // the url has changed so its a full re-installation
                    LOG.info("Re-installing " + container.getId() + " due container distribution url changed to: " + config.getUrl());
                    destroy(container);

                    Installation newInstallation = createInstallation(processManager, container, options, metadata, initialEnvironmentVariables);
                    try {
                        newInstallation.getController().install();
                        start(container);
                    } catch (Exception e) {
                        handleException("Error installing container " + container.getId(), e);
                    }
View Full Code Here

            if (type != null) {
                container.setType(type);
            }
        }

        Installation installation = null;
        try {
            if (ChildContainers.isJavaContainer(fabricService, options)) {
                LOG.debug("Java container detected - installing jar. Configuration: ", options);
                JavaContainerConfig javaConfig = createJavaContainerConfig(options);
                InstallOptions parameters = createJavaInstallOptions(container, metadata, options, javaConfig, environmentVariables);
View Full Code Here

        return null;
    }

    @Override
    public ChildContainerController getControllerForContainer(Container container) {
        Installation installation = getProcessManager().getInstallation(container.getId());
        ChildContainerController answer = null;
        if (installation != null) {
            answer = createProcessManagerController();
        }
        return answer;
View Full Code Here

        if (manager != null && fabric != null) {
            ImmutableMap<String, Installation> map = manager.listInstallationMap();
            ImmutableSet<Map.Entry<String, Installation>> entries = map.entrySet();
            for (Map.Entry<String, Installation> entry : entries) {
                String id = entry.getKey();
                Installation installation = entry.getValue();
                try {
                    Container container = null;
                    try {
                        container = fabric.getContainer(id);
                    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of io.fabric8.process.manager.Installation

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.