Package io.fabric8.process.manager

Examples of io.fabric8.process.manager.Installation


            Set<String> aliveIds = new HashSet<>();
            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) {
                        LOG.debug("No container for id: " + id + ". " + e, e);
                    }
                    if (container != null) {
                        Long pid = installation.getActivePid();
                        if (LOG.isDebugEnabled()) {
                            LOG.debug("Polling container " + id + " for its PID");
                        }
                        if (pid == null) {
                            if (container.isAlive()) {
View Full Code Here


        String versionId = Profiles.versionId(fabricService.getCurrentContainer().getVersion());
        List<String> profileIds = Profiles.profileIds(profiles);
        Map<String, String> contextPathConfiguration = Profiles.getOverlayConfiguration(fabricService, profileIds, versionId, Constants.WEB_CONTEXT_PATHS_PID);
        InstallTask applyProfile = new InstallDeploymentsTask(javaArtifacts, contextPathConfiguration);
        InstallTask compositeTask = new CompositeTask(applyConfiguration, applyProfile);
        Installation installation = processManager.install(installOptions, compositeTask);
        if (installation != null) {
            installation.getController().start();
        }
        return installation;
    }
View Full Code Here


    void uninstallProcess(ProcessRequirements requirements) throws Exception {
        String id = requirements.getId();

        Installation installation = findProcessInstallation(id);
        // for now lets remove it just in case! :)
        if (installation != null) {
            ProcessController controller = installation.getController();
            try {
                controller.stop();
            } catch (Exception e) {
                LOG.warn("Ignored exception while trying to stop process " + installation + " " + e);
            }
View Full Code Here

                .password(jmxPassword)
                .build();

        ImmutableMap<String, Installation> map = getContainerProcessManager().listInstallationMap(options);
        for (String id : ids) {
            Installation installation = map.get(id);
            if (installation == null) {
                System.out.println("No such process number: " + id);
            } else {
                doControlCommand(installation);
            }
View Full Code Here

                .build();

        // allow a post install step to be specified - e.g. specifying jars/wars?
        InstallTask postInstall = null;

        Installation install = getContainerProcessManager().installJar(options, postInstall);
        ShellUtils.storeFabricCredentials(session, jmxUser, jmxPassword);
        System.out.println("Installed process " + install.getId() + " to " + install.getInstallDir());
    }
View Full Code Here

                .build();

        // allow a post install step to be specified - e.g. specifying jars/wars?
        InstallTask postInstall = null;

        Installation install = getContainerProcessManager().install(options, postInstall);
        ShellUtils.storeFabricCredentials(session, jmxUser, jmxPassword);
        System.out.println("Installed process " + install.getId() + " to " + install.getInstallDir());
    }
View Full Code Here

        InstallContext installContext = new InstallContext(options.getContainer(), installDir, false);
        installTask.install(installContext, config, id, installDir);
        JsonHelper.saveProcessConfig(config, installDir);
        installContext.updateContainerChecksums();

        Installation installation = createInstallation(options.getUrl(), id, installDir, config);
        installation.getController().install();
        return installation;
    }
View Full Code Here

        // or generate this file on installation time?

        File installDir = findInstallDir(rootDir);
        ProcessController controller = createController(id, config, rootDir, installDir);
        // TODO need to read the URL from somewhere...
        Installation installation = new Installation(url, id, installDir, controller, config);
        installations.put(id, installation);
        return installation;
    }
View Full Code Here

    }

    @Override
    public final void deleted(String pid) {

        Installation installation = installationMap.remove(pid);
        if (installation != null) {

            try {
                if (installation.getController().status() == 0) {
                    installation.getController().stop();
                }
                // TODO uninstall is not supported right now
//                installation.getController().uninstall();
//                processManager.uninstall(installation);
                LOG.info("Destroyed Process " + pid);
View Full Code Here

            // get process install parameters,
            // note that service.pid and service.factoryPid are added too
            Map<String, String> env = new HashMap<String, String>();
            InstallOptions options = getInstallOptions(incoming, env);

            final Installation installation = installationMap.get(pid);
            if (null != installation) {

                // TODO only environment updates are supported, process installation parameters cannot be updated,
                // for that a process should be deleted and created again
                // refresh environment variables and reconfigure
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.