Search in sources :

Example 36 with AuthzToken

use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.

the class RegisterSampleApplications method registerTrestlesApps.

public void registerTrestlesApps() {
    try {
        System.out.println("#### Registering Application Deployments on Trestles #### \n");
        // Register Echo
        String echoAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/echo_wrapper.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null, null));
        System.out.println("Echo on trestles deployment Id " + echoAppDeployId);
        // Register Amber
        List<CommandObject> moduleLoadCMDs = new ArrayList();
        moduleLoadCMDs.add(new CommandObject("module load amber"));
        String amberAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(amberModuleId, trestlesResourceId, "/opt/amber/bin/sander.MPI -O", ApplicationParallelismType.MPI, amberDescription, moduleLoadCMDs, null, null));
        System.out.println("Amber on trestles deployment Id " + amberAppDeployId);
        // Register GROMACS
        String gromacsAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gromacsModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/gromacs_wrapper.sh", ApplicationParallelismType.MPI, gromacsDescription, null, null, null));
        System.out.println("GROMACS on trestles deployment Id " + gromacsAppDeployId);
        // Register LAMMPS
        String lammpsAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, trestlesResourceId, "/home/ogce/production/app_wrappers/lammps_wrapper.sh", ApplicationParallelismType.MPI, lammpsDescription, null, null, null));
        System.out.println("LAMMPS on trestles deployment Id " + lammpsAppDeployId);
        // Register GAMESS
        List<CommandObject> moduleLoadCmd = new ArrayList();
        moduleLoadCmd.add(new CommandObject("module load gamess"));
        String gamessAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gamessModuleId, trestlesResourceId, "/opt/gamess/rungms", ApplicationParallelismType.MPI, gamessDescription, moduleLoadCmd, null, null));
        System.out.println("Gamess on trestles deployment Id " + gamessAppDeployId);
        List<CommandObject> gaussianMouldes = new ArrayList();
        gaussianMouldes.add(new CommandObject("module load gaussian"));
        String gaussianAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(gaussianModuleId, trestlesResourceId, "g09", ApplicationParallelismType.OPENMP, gaussianDescription, gaussianMouldes, null, null));
        System.out.println("Gaussian on trestles deployment Id " + gaussianAppDeployId);
    } catch (TException e) {
        e.printStackTrace();
    }
}
Also used : CommandObject(org.apache.airavata.model.appcatalog.appdeployment.CommandObject) TException(org.apache.thrift.TException) AuthzToken(org.apache.airavata.model.security.AuthzToken)

Example 37 with AuthzToken

use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.

the class RegisterSampleApplications method registerPhastaInterface.

public void registerPhastaInterface() {
    try {
        System.out.println("#### Registering PHASTA Interface #### \n");
        List<String> appModules = new ArrayList<String>();
        appModules.add(phastaModuleId);
        InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Parasolid_Geometric_Model", null, DataType.URI, null, 1, true, true, false, "Parasolid geometric model - geom.xmt_txt", null);
        InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("Problem_Definition", null, DataType.URI, null, 2, true, true, false, "problem definition - geom.smd", null);
        InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("Mesh_Description_File", null, DataType.URI, null, 3, true, true, false, "Mesh Description - geom.sms", null);
        List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
        applicationInputs.add(input1);
        applicationInputs.add(input2);
        applicationInputs.add(input3);
        OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Execution_Log", null, DataType.URI, true, true, null);
        OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Output_tar", null, DataType.URI, true, true, null);
        OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
        OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
        List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
        applicationOutputs.add(output1);
        applicationOutputs.add(output2);
        applicationOutputs.add(output3);
        applicationOutputs.add(output4);
        phastaInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(phastaName, phastaDescription, appModules, applicationInputs, applicationOutputs));
        System.out.println("phasta Application Interface Id " + phastaInterfaceId);
    } catch (TException e) {
        e.printStackTrace();
    }
}
Also used : TException(org.apache.thrift.TException) OutputDataObjectType(org.apache.airavata.model.application.io.OutputDataObjectType) InputDataObjectType(org.apache.airavata.model.application.io.InputDataObjectType) AuthzToken(org.apache.airavata.model.security.AuthzToken)

Example 38 with AuthzToken

use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.

the class RegisterSampleApplications method registerLSFApps.

public void registerLSFApps() {
    try {
        System.out.println("#### Registering Application Deployments on Trestles #### \n");
        // Register Echo
        String echoAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, lsfResourceId, "/home/lg11w/executables/echo.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null, null));
        List<CommandObject> moduleLoadCmd = new ArrayList();
        moduleLoadCmd.add(new CommandObject("module load LAMMPS/28Jun14-base"));
        // Register Echo
        String lammpsDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, lsfResourceId, "lmp_ghpcc", ApplicationParallelismType.MPI, echoDescription, moduleLoadCmd, null, null));
        System.out.println("Echo on LSF deployment Id " + echoAppDeployId);
        System.out.println("LAMMPS on LSF deployment Id " + lammpsDeployId);
    } catch (TException e) {
        e.printStackTrace();
    }
}
Also used : CommandObject(org.apache.airavata.model.appcatalog.appdeployment.CommandObject) TException(org.apache.thrift.TException) AuthzToken(org.apache.airavata.model.security.AuthzToken)

Example 39 with AuthzToken

use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.

the class RegisterSampleApplications method registerBigRedApps.

public void registerBigRedApps() {
    try {
        System.out.println("#### Registering Application Deployments on BigRed II #### \n");
        // Register Echo
        String echoAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, bigredResourceId, "/N/u/cgateway/BigRed2/production/app_wrappers/echo_wrapper.sh", ApplicationParallelismType.SERIAL, echoDescription, null, null, null));
        System.out.println("Echo on bigredII deployment Id " + echoAppDeployId);
        // Register Amber
        List<CommandObject> amberModuleLoadCMDsBr2 = new ArrayList();
        amberModuleLoadCMDsBr2.add(new CommandObject("module load amber/gnu/mpi/12"));
        amberModuleLoadCMDsBr2.add(new CommandObject("module swap PrgEnv-cray PrgEnv-gnu"));
        String amberAppDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(amberModuleId, bigredResourceId, "/N/soft/cle4/amber/gnu/mpi/12/amber12/bin/sander.MPI -O", ApplicationParallelismType.MPI, amberDescription, amberModuleLoadCMDsBr2, null, null));
        System.out.println("Amber on bigredII deployment Id " + amberAppDeployId);
        // Register AutoDock
        String autoDockDeployId = airavataClient.registerApplicationDeployment(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationDeployment(autoDockModuleId, bigredResourceId, "/N/u/cgateway/BigRed2/production/app_wrappers/auto_dock_wrapper.sh", ApplicationParallelismType.MPI, autoDockDescription, null, null, null));
        System.out.println("AutoDock on bigredII deployment Id " + autoDockDeployId);
    // //Register GROMACS
    // String gromacsAppDeployId = airavataClient.registerApplicationDeployment(
    // RegisterSampleApplicationsUtils.createApplicationDeployment(gromacsModuleId, bigredResourceId,
    // "/N/u/cgateway/BigRed2/production/app_wrappers/gromacs_wrapper.sh", ApplicationParallelismType.MPI,
    // gromacsDescription));
    // System.out.println("GROMACS on bigredII deployment Id " + gromacsAppDeployId);
    // 
    // //Register LAMMPS
    // String lammpsAppDeployId = airavataClient.registerApplicationDeployment(
    // RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, bigredResourceId,
    // "/N/u/cgateway/BigRed2/production/app_wrappers/lammps_wrapper.sh", ApplicationParallelismType.MPI,
    // lammpsDescription));
    // System.out.println("LAMMPS on bigredII deployment Id " + lammpsAppDeployId);
    } catch (TException e) {
        e.printStackTrace();
    }
}
Also used : CommandObject(org.apache.airavata.model.appcatalog.appdeployment.CommandObject) TException(org.apache.thrift.TException) AuthzToken(org.apache.airavata.model.security.AuthzToken)

Example 40 with AuthzToken

use of org.apache.airavata.model.security.AuthzToken in project airavata by apache.

the class RegisterSampleApplications method registerNWChemInterface.

public void registerNWChemInterface() {
    try {
        System.out.println("#### Registering NWChem Interface #### \n");
        List<String> appModules = new ArrayList<String>();
        appModules.add(nwChemModuleId);
        InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Water_Molecule_Input", null, DataType.URI, null, 1, true, true, false, "Water Molecule Input File - water.nw", null);
        List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
        applicationInputs.add(input1);
        OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("NWChem_Execution_Log", null, DataType.URI, true, false, null);
        OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT", null, DataType.STDOUT, true, true, null);
        OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR", null, DataType.STDERR, true, true, null);
        List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
        applicationOutputs.add(output1);
        applicationOutputs.add(output2);
        applicationOutputs.add(output3);
        nwChemInterfaceId = airavataClient.registerApplicationInterface(new AuthzToken(""), DEFAULT_GATEWAY, RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(nwChemName, nwChemDescription, appModules, applicationInputs, applicationOutputs));
        System.out.println("NWChem Application Interface Id " + nwChemInterfaceId);
    } catch (TException e) {
        e.printStackTrace();
    }
}
Also used : TException(org.apache.thrift.TException) OutputDataObjectType(org.apache.airavata.model.application.io.OutputDataObjectType) InputDataObjectType(org.apache.airavata.model.application.io.InputDataObjectType) AuthzToken(org.apache.airavata.model.security.AuthzToken)

Aggregations

AuthzToken (org.apache.airavata.model.security.AuthzToken)92 TException (org.apache.thrift.TException)71 InputDataObjectType (org.apache.airavata.model.application.io.InputDataObjectType)46 OutputDataObjectType (org.apache.airavata.model.application.io.OutputDataObjectType)44 ExperimentModel (org.apache.airavata.model.experiment.ExperimentModel)33 UserConfigurationDataModel (org.apache.airavata.model.experiment.UserConfigurationDataModel)28 ComputationalResourceSchedulingModel (org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel)28 AiravataClientException (org.apache.airavata.model.error.AiravataClientException)15 Project (org.apache.airavata.model.workspace.Project)13 ArrayList (java.util.ArrayList)12 InvalidRequestException (org.apache.airavata.model.error.InvalidRequestException)8 HashMap (java.util.HashMap)7 AiravataSystemException (org.apache.airavata.model.error.AiravataSystemException)7 Gateway (org.apache.airavata.model.workspace.Gateway)6 CommandObject (org.apache.airavata.model.appcatalog.appdeployment.CommandObject)5 SCPDataMovement (org.apache.airavata.model.data.movement.SCPDataMovement)5 ComputeResourcePreference (org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference)4 GatewayResourceProfile (org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile)4 ComputeResourceDescription (org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription)2 JobSubmissionInterface (org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface)2