Package io.fabric8.process.manager

Examples of io.fabric8.process.manager.InstallOptions$InstallOptionsBuilder


    @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

        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);
                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) {
View Full Code Here

        // Given
        String mainJar = "mvn:org.apache.camel/camel-xstream/2.12.0";
        javaContainerConfig.setJarUrl(mainJar);

        // When
        InstallOptions installOptions = managerController.createJavaInstallOptions(container, containerMetadata, containerOptions, javaContainerConfig, new HashMap<String, String>());

        // Then
        assertEquals(new URL(mainJar), installOptions.getUrl());
    }
View Full Code Here

    }

    @Test
    public void shouldIgnoreNullJarUrlInJavaContainerConfig() throws Exception {
        // When
        InstallOptions installOptions = managerController.createJavaInstallOptions(container, containerMetadata, containerOptions, javaContainerConfig, new HashMap<String, String>());

        // Then
        assertNull(installOptions.getUrl());
    }
View Full Code Here

        String firstVmOption = "-Dfoo=bar";
        String secondVmOption = "-Dbaz=qux";
        javaContainerConfig.setJvmArguments(firstVmOption + " " + secondVmOption);

        // When
        InstallOptions installOptions = managerController.createJavaInstallOptions(container, containerMetadata, containerOptions, javaContainerConfig, new HashMap<String, String>());

        // Then
        assertArrayEquals(new String[]{firstVmOption, secondVmOption}, installOptions.getJvmOptions());
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        System.setProperty("java.protocol.handler.pkgs", "org.ops4j.pax.url");

        InstallOptions installOptions = new InstallOptions.InstallOptionsBuilder().build();
        String processId = new ProcessManagerService(installDir).installJar(installOptions, postInstall).getId();
        controller = new DefaultProcessController(processId, new ProcessConfig(), installDir, new File(installDir, processId));
    }
View Full Code Here

    public String getPassword() {
        return password;
    }

    public InstallOptions asInstallOptions() {
        return new InstallOptions(getId(), getName(), getUrl(), getControllerUrl(), getControllerJson(), getExtractCmd(), getPostUnpackCmds(), getPostInstallCmds(), isOffline(), getOptionalDependencyPatterns(), getExcludeDependencyFilterPatterns(), getMainClass(), getProperties(), getEnvironment(), getJvmOptions(), getJarFiles(), getContainer(), getDownloadStrategy());
    }
View Full Code Here

    Installation provisionProcess(ProcessRequirements requirements) throws Exception {
        // TODO check that the installation is the same
        uninstallProcess(requirements);

        //String id = requirements.getId();
        InstallOptions installOptions = requirements.createInstallOptions();
        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);
View Full Code Here

TOP

Related Classes of io.fabric8.process.manager.InstallOptions$InstallOptionsBuilder

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.