Package io.fabric8.process.manager

Examples of io.fabric8.process.manager.InstallTask


    @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

   
    public void refreshServices() {
        List<String> currentCache = new ArrayList<String>();
        currentCache.addAll(contextPathsCache);
        try {
            ServiceListSchema serviceListSchema = client.getServices();
            for (ServiceSchema schema : serviceListSchema.getItems()) {
                if (selectorMatch(schema.getSelector())) {
                    String contextPath = schema.getId();
                   
                    ServiceDTO dto = new ServiceDTO();
                    dto.setId(schema.getId());
View Full Code Here

        Set<String> profileIds = options.getProfiles();
        String versionId = options.getVersion();
        List<Profile> profiles = Profiles.getProfiles(fabricService, profileIds, versionId);
        String layout = configObject.getOverlayFolder();
        String[] postUnpackRemoveFiles = configObject.getPostUnpackRemoveFiles();
        InstallTask answer = createCommonPostInstal(options, environmentVariables, layout);
        if (postUnpackRemoveFiles != null && postUnpackRemoveFiles.length > 0) {
            answer = CompositeTask.combine(answer, new RemoveFilesTask(postUnpackRemoveFiles));
        }

        if (!configObject.isInternalAgent()) {
View Full Code Here

    protected InstallTask createCommonPostInstal(CreateChildContainerOptions options, Map<String, String> environmentVariables, String layout) {
        Set<String> profileIds = options.getProfiles();
        String versionId = options.getVersion();
        List<Profile> profiles = Profiles.getProfiles(fabricService, profileIds, versionId);
        InstallTask answer = null;
        if (layout != null) {
            Map<String, String> configuration = ProcessUtils.getProcessLayout(fabricService, profiles, layout);
            if (configuration != null && !configuration.isEmpty()) {
                Map variables = Profiles.getOverlayConfiguration(fabricService, profileIds, versionId, Constants.TEMPLATE_VARIABLES_PID);
                if (variables == null) {
View Full Code Here

            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);
                String layout = javaConfig.getOverlayFolder();
                InstallTask postInstall = createCommonPostInstal(options, environmentVariables, layout);
                Objects.notNull(parameters, "JavaInstall parameters");
                installation = procManager.installJar(parameters, postInstall);
            } else {
                LOG.debug("Process container detected - installing process. Configuration: ", options);
                InstallOptions parameters = createProcessInstallOptions(container, metadata, options, processConfig, environmentVariables);
                InstallTask postInstall = createProcessPostInstall(container, options, processConfig, environmentVariables);
                Objects.notNull(parameters, "process parameters");
                installation = procManager.install(parameters, postInstall);
            }
        } catch (Exception e) {
            handleException("Creating container " + containerId, e);
View Full Code Here

        Profile processProfile = getProcessProfile(requirements, true);
        Profile deployProcessProfile = getProcessProfile(requirements, false);
        Map<String, String> configuration = ProcessUtils.getProcessLayout(fabricService, processProfile, requirements.getLayout());

        //DownloadManager downloadManager = DownloadManagers.createDownloadManager(fabricService, executorService);
        InstallTask applyConfiguration = new ApplyConfigurationTask(configuration, installOptions.getProperties());
        List<Profile> profiles = new ArrayList<Profile>();
        profiles.add(deployProcessProfile);
        Map<String, File> javaArtifacts = JavaContainers.getJavaContainerArtifactsFiles(fabricService, profiles, executorService);
        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

                .mainClass(mainClass)
                .controllerUrl(getControllerURL())
                .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

                .extractCmd(getExtract(extractCmd))
                .controllerUrl(getControllerURL())
                .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

        return installations.get(id);
    }

    @Override
    public Installation install(final InstallOptions options, final InstallTask postInstall) throws Exception {
        @SuppressWarnings("serial")
        InstallTask installTask = new InstallTask() {
            @Override
            public void install(InstallContext installContext, ProcessConfig config, String id, File installDir) throws Exception {
                config.setName(options.getName());
                File archive = getDownloadStrategy(options).downloadContent(options.getUrl(), installDir);
                if (archive == null) {
View Full Code Here

TOP

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

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.