deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
}
public String createSlumWRFDocs() throws AppCatalogException, 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);
client.addSCPDataMovementDetails(host.getComputeResourceId(), 1, scpDataMovement);
client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), DocumentCreatorUtils.createComputeResourcePreference(host.getComputeResourceId(), "/home1/01437/ogce", "TG-STA110014S", false, null, null, null));
ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null);
module2.setAppModuleId(client.registerApplicationModule(module2));
ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription();
// application2.setIsEmpty(false);
application2.setApplicationName("WRF");
application2.addToApplicationModules(module2.getAppModuleId());
application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI));
application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Boundary_File", "WRF_Boundary_File", null, null, DataType.URI));
application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Input_File", "WRF_Input_File", null, null, DataType.URI));
application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Output", null, DataType.URI));
application2.addToApplicationOutputs(DocumentCreatorUtils.createAppOutput("WRF_Execution_Log", null, DataType.URI));
application2.setApplicationInterfaceId(client.registerApplicationInterface(application2));
ApplicationDeploymentDescription deployment2 = DocumentCreatorUtils.createApplicationDeployment(host.getComputeResourceId(), module2.getAppModuleId(), "/home1/01437/ogce/production/app_wrappers/wrf_wrapper.sh", ApplicationParallelismType.MPI, "WRF");
deployment2.setAppDeploymentId(client.registerApplicationDeployment(deployment2));
return host.getComputeResourceId() + "," + application2.getApplicationInterfaceId();
}