Package org.apache.airavata.model.appcatalog.computeresource

Examples of org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription$ComputeResourceDescriptionTupleSchemeFactory


        return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();

    }

    public String createSlurmDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
        host.addToHostAliases(stampedeHostAddress);
        host.addToIpAddresses(stampedeHostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));

        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
        sshJobSubmission.setSshPort(2222);
        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);

        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.3", null);
        module.setAppModuleId(client.registerApplicationModule(module));

        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
//      application.setIsEmpty(false);
        application.setApplicationName("SimpleEcho3");
        application.addToApplicationModules(module.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }
View Full Code Here


        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }

    public String createSGEDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(lonestarHostAddress, null, null);
        host.addToHostAliases(lonestarHostAddress);
        host.addToIpAddresses(lonestarHostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));

        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/sge6.2/bin/lx24-amd64/", null, null);
        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
        sshJobSubmission.setSshPort(22);

        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);

        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.4", null);
        module.setAppModuleId(client.registerApplicationModule(module));

        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
//      application.setIsEmpty(false);
        application.setApplicationName("SimpleEcho4");
        application.addToApplicationModules(module.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/bin/echo", ApplicationParallelismType.SERIAL, "EchoLocal");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }
View Full Code Here

//    }
//
//  }

    public String createBigRedDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
        host.addToHostAliases(bigRed2HostAddress);
        host.addToIpAddresses(bigRed2HostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));


        Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
        commands.put(JobManagerCommand.SUBMISSION, "aprun -n 1");
        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
        sshJobSubmission.setSshPort(22);

        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);

        ApplicationModule module = DocumentCreatorUtils.createApplicationModule("echo", "1.5", null);
        module.setAppModuleId(client.registerApplicationModule(module));

        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
        application.setApplicationName("SimpleEchoBR");
        application.addToApplicationModules(module.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("echo_output", null, DataType.STRING));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module.getAppModuleId(), "/N/u/lginnali/BigRed2/myjob/test.sh", ApplicationParallelismType.SERIAL, "EchoLocal");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));

        String date = (new Date()).toString();
        date = date.replaceAll(" ", "_");
        date = date.replaceAll(":", "_");
        String tempDir = "/N/u/lginnali/BigRed2/myjob";
        tempDir = tempDir + File.separator + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, "TG-STA110014S", false, null, null, null));


        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }
View Full Code Here

        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }

    public String createBigRedAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription("bigred2", null, null);
        host.addToHostAliases(bigRed2HostAddress);
        host.addToIpAddresses(bigRed2HostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));


        Map<JobManagerCommand, String> commands = new HashMap<JobManagerCommand, String>();
        commands.put(JobManagerCommand.SUBMISSION, "aprun -n 4");
        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.UGE, "/opt/torque/torque-4.2.3.1/bin/", commands, null);
        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
        sshJobSubmission.setSshPort(22);

        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.SSH_KEYS);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);


        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
        amodule.setAppModuleId(client.registerApplicationModule(amodule));


        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
        application.setApplicationName("AmberBR2");
        application.addToApplicationModules(amodule.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/N/u/cgateway/BigRed2/sandbox/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberBR2");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));


        String date = (new Date()).toString();
        date = date.replaceAll(" ", "_");
        date = date.replaceAll(":", "_");
        String tempDir = "/N/u/cgateway/BigRed2/sandbox/jobs";
        tempDir = tempDir + File.separator +
                "Amber";

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), tempDir, null, false, null, null, null));


        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }
View Full Code Here

        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();
    }

    public String createStampedeAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(stampedeHostAddress, null, null);
        host.addToHostAliases(stampedeHostAddress);
        host.addToIpAddresses(stampedeHostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));

        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.SLURM, "/usr/bin/", null, "push");
        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
        sshJobSubmission.setSshPort(2222);
        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
        amodule.setAppModuleId(client.registerApplicationModule(amodule));


        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
        application.setApplicationName("AmberBR2");
        application.addToApplicationModules(amodule.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));


        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();

    }
View Full Code Here

        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();

    }

    public String createTrestlesAmberDocs() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException, AppCatalogException {
        ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription(trestleshpcHostAddress, null, null);
        host.addToIpAddresses(trestleshpcHostAddress);
        host.addToHostAliases(trestleshpcHostAddress);
        host.setComputeResourceId(client.registerComputeResource(host));

        SSHJobSubmission sshJobSubmission = new SSHJobSubmission();
        ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.PBS, "/opt/torque/bin/", null, null);
        sshJobSubmission.setResourceJobManager(resourceJobManager);
        sshJobSubmission.setSecurityProtocol(SecurityProtocol.GSI);
        sshJobSubmission.setSshPort(22);
        client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, sshJobSubmission);

        SCPDataMovement scpDataMovement = new SCPDataMovement();
        scpDataMovement.setSecurityProtocol(SecurityProtocol.GSI);
        scpDataMovement.setSshPort(22);
        client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);

        ApplicationModule amodule = DocumentCreatorUtils.createApplicationModule("Amber", "12.0", null);
        amodule.setAppModuleId(client.registerApplicationModule(amodule));


        ApplicationInterfaceDescription application = new ApplicationInterfaceDescription();
        application.setApplicationName("AmberTrestles");
        application.addToApplicationModules(amodule.getAppModuleId());
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_HEAT_RST", "AMBER_HEAT_RST", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PROD_IN", "AMBER_PROD_IN", null, null, DataType.URI));
        application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("AMBER_PRMTOP", "AMBER_PRMTOP", null, null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.info", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.mdcrd", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.out", null, DataType.URI));
        application.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("AMBER_Prod.rst", null, DataType.URI));
        application.setApplicationInterfaceId(client.registerApplicationInterface(application));

        ApplicationDeploymentDescription deployment = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), amodule.getAppModuleId(), "/home/ogce/production/app_wrappers/amber_wrapper.sh", ApplicationParallelismType.SERIAL, "AmberStampede");
        deployment.setAppDeploymentId(client.registerApplicationDeployment(deployment));

        client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/oasis/scratch/trestles/ogce/temp_project/", "sds128", false, null, null, null));


        return host.getComputeResourceId() + "," + application.getApplicationInterfaceId();

    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription$ComputeResourceDescriptionTupleSchemeFactory

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.