Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A61E1765E for ; Mon, 20 Oct 2014 15:24:38 +0000 (UTC) Received: (qmail 79809 invoked by uid 500); 20 Oct 2014 15:24:38 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 79693 invoked by uid 500); 20 Oct 2014 15:24:38 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 79675 invoked by uid 99); 20 Oct 2014 15:24:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2014 15:24:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B3DC99B1B37; Mon, 20 Oct 2014 15:24:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: msmemon@apache.org To: commits@airavata.apache.org Date: Mon, 20 Oct 2014 15:24:42 -0000 Message-Id: <4083c0a5e89947ff9d05d70159d8c90d@git.apache.org> In-Reply-To: <74c9c04f49a841a485de0c31b621aed6@git.apache.org> References: <74c9c04f49a841a485de0c31b621aed6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [6/7] git commit: unicore provider using appcatalog and exposed through thrift https://issues.apache.org/jira/browse/AIRAVATA-1473 unicore provider using appcatalog and exposed through thrift https://issues.apache.org/jira/browse/AIRAVATA-1473 Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/1da5054a Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/1da5054a Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/1da5054a Branch: refs/heads/master Commit: 1da5054a26b23096a111f15ddba616c29219b654 Parents: 1e6a7ba Author: msmemon Authored: Mon Oct 20 16:32:26 2014 +0200 Committer: msmemon Committed: Mon Oct 20 16:32:26 2014 +0200 ---------------------------------------------------------------------- .../server/handler/AiravataServerHandler.java | 24 +- .../client/samples/CreateLaunchExperiment.java | 150 ++++- .../tools/RegisterSampleApplications.java | 77 ++- .../airavataAPI.thrift | 26 + .../appcatalog/cpi/ComputeResource.java | 15 + .../catalog/data/impl/ComputeResourceImpl.java | 56 +- .../data/resources/AbstractResource.java | 9 + .../catalog/data/util/AppCatalogJPAUtils.java | 20 +- .../data/util/AppCatalogResourceType.java | 1 + .../data/util/AppCatalogThriftConversion.java | 23 + .../src/main/resources/META-INF/persistence.xml | 1 + .../src/main/resources/appcatalog-derby.sql | 11 +- .../src/main/resources/appcatalog-mysql.sql | 8 +- .../server/src/main/assembly/bin-assembly.xml | 558 ++++++++++--------- modules/gfac/gfac-bes/pom.xml | 8 - .../gfac/bes/provider/impl/BESProvider.java | 1 - .../bes/security/UNICORESecurityContext.java | 2 +- .../airavata/gfac/core/cpi/BetterGfacImpl.java | 20 +- 18 files changed, 684 insertions(+), 326 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java index 1051654..c666a94 100644 --- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java +++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java @@ -1962,7 +1962,7 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher { throw exception; } } - + /** * Add a Cloud Job Submission details to a compute resource * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces. @@ -1990,7 +1990,27 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher { } } - /** + @Override + public boolean addUNICOREJobSubmissionDetails(String computeResourceId, + int priorityOrder, UnicoreJobSubmission unicoreJobSubmission) + throws InvalidRequestException, AiravataClientException, + AiravataSystemException, TException { + try { + appCatalog = AppCatalogFactory.getAppCatalog(); + ComputeResource computeResource = appCatalog.getComputeResource(); + addJobSubmissionInterface(computeResource, computeResourceId, + computeResource.addUNICOREJobSubmission(unicoreJobSubmission), JobSubmissionProtocol.UNICORE, priorityOrder); + return true; + } catch (AppCatalogException e) { + logger.error("Error while adding job submission interface to resource compute resource...", e); + AiravataSystemException exception = new AiravataSystemException(); + exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR); + exception.setMessage("Error while adding job submission interface to resource compute resource. More info : " + e.getMessage()); + throw exception; + } + } + + /** * Update the given SSH Job Submission details * * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be updated. http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java index ad05d92..66501fb 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java @@ -24,6 +24,12 @@ package org.apache.airavata.client.samples; import org.apache.airavata.api.Airavata; import org.apache.airavata.api.client.AiravataClientFactory; import org.apache.airavata.client.tools.RegisterSampleApplications; +import org.apache.airavata.client.tools.RegisterSampleApplicationsUtils; +import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription; +import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface; +import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol; +import org.apache.airavata.model.appcatalog.computeresource.SecurityProtocol; +import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission; import org.apache.airavata.model.error.*; import org.apache.airavata.model.util.ExperimentModelUtil; import org.apache.airavata.model.util.ProjectModelUtil; @@ -46,42 +52,57 @@ public class CreateLaunchExperiment { private static final String DEFAULT_USER = "default.registry.user"; private static final String DEFAULT_GATEWAY = "default.registry.gateway"; private static Airavata.Client airavataClient; - private static String echoAppId = "Echo_f99c94a4-a663-492e-bce6-266e77c06978"; + private static String echoAppId = "Echo_56c6e26c-ca77-45fe-91d1-58fa59676879"; private static String wrfAppId = "WRF_5f097c9c-7066-49ec-aed7-4e39607b3adc"; private static String amberAppId = "Amber_89906be6-5678-49a6-9d04-a0604fbdef2e"; private static String localHost = "localhost"; private static String trestlesHostName = "trestles.sdsc.xsede.org"; + private static String unicoreHostName = "fsd-cloud15.zam.kfa-juelich.de"; private static String stampedeHostName = "stampede.tacc.xsede.org"; private static String br2HostName = "bigred2.uits.iu.edu"; - - public static void main(String[] args) { - try { + + // unicore service endpoint url + private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory"; + + + public static void main(String[] args) throws Exception { airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT); System.out.println("API version is " + airavataClient.getAPIVersion()); -// registerApplications(); // run this only the first time - for (int i = 0; i < 100; i++) { -// final String expId = createExperimentForSSHHost(airavata); - final String expId = createEchoExperimentForTrestles(airavataClient); -// final String expId = createEchoExperimentForStampede(airavataClient); -// final String expId = createExperimentEchoForLocalHost(airavataClient); -// final String expId = createExperimentWRFTrestles(airavataClient); -// final String expId = createExperimentForBR2(airavataClient); -// final String expId = createExperimentForBR2Amber(airavataClient); -// final String expId = createExperimentWRFStampede(airavataClient); -// final String expId = createExperimentForStampedeAmber(airavataClient); -// final String expId = createExperimentForTrestlesAmber(airavataClient); - -// System.out.println("Experiment ID : " + expId); -// updateExperiment(airavata, expId); - launchExperiment(airavataClient, expId); - } - } catch (Exception e) { - logger.error("Error while connecting with server", e.getMessage()); - e.printStackTrace(); - } +// registerApplications(); // run this only the first time + createAndLaunchExp(); + } + + private static String fsdResourceId; + + + + public static void createAndLaunchExp() { + try { + for (int i = 0; i < 2; i++) { +// final String expId = createExperimentForSSHHost(airavata); + final String expId = createEchoExperimentForFSD(airavataClient); +// final String expId = createEchoExperimentForStampede(airavataClient); +// final String expId = createExperimentEchoForLocalHost(airavataClient); +// final String expId = createExperimentWRFTrestles(airavataClient); +// final String expId = createExperimentForBR2(airavataClient); +// final String expId = createExperimentForBR2Amber(airavataClient); +// final String expId = createExperimentWRFStampede(airavataClient); +// final String expId = createExperimentForStampedeAmber(airavataClient); +// final String expId = createExperimentForTrestlesAmber(airavataClient); + +// System.out.println("Experiment ID : " + expId); +// updateExperiment(airavata, expId); + launchExperiment(airavataClient, expId); + } + } catch (Exception e) { + logger.error("Error while connecting with server", e.getMessage()); + e.printStackTrace(); } + } + + public static void registerApplications() { RegisterSampleApplications registerSampleApplications = new RegisterSampleApplications(airavataClient); @@ -104,6 +125,27 @@ public class CreateLaunchExperiment { registerSampleApplications.registerAppInterfaces(); } + public static String registerUnicoreEndpoint(String hostName, String hostDesc, JobSubmissionProtocol protocol, SecurityProtocol securityProtocol) throws TException { + + ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils + .createComputeResourceDescription(hostName, hostDesc, null, null); + + fsdResourceId = airavataClient.registerComputeResource(computeResourceDescription); + + if (fsdResourceId.isEmpty()) + throw new AiravataClientException(); + + System.out.println("FSD Compute ResourceID: "+fsdResourceId); + + JobSubmissionInterface jobSubmission = RegisterSampleApplicationsUtils.createJobSubmissionInterface(fsdResourceId, protocol, 2); + UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission(); + ucrJobSubmission.setSecurityProtocol(securityProtocol); + ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL); + + + return jobSubmission.getJobSubmissionInterfaceId(); + } + public static String createEchoExperimentForTrestles(Airavata.Client client) throws TException { try { List exInputs = new ArrayList(); @@ -154,7 +196,65 @@ public class CreateLaunchExperiment { } return null; } + + + public static String createEchoExperimentForFSD(Airavata.Client client) throws TException { + try { + List exInputs = new ArrayList(); + DataObjectType input = new DataObjectType(); + input.setKey("Input_to_Echo"); + input.setType(DataType.STRING); + input.setValue("Echoed_Output=Hello World"); + exInputs.add(input); + + List exOut = new ArrayList(); + DataObjectType output = new DataObjectType(); + output.setKey("echo_output"); + output.setType(DataType.STRING); + output.setValue(""); + exOut.add(output); + + echoAppId = "Echo_bdfe6dc3-0e80-41af-adb6-f89b1b05c3e8"; + + Experiment simpleExperiment = + ExperimentModelUtil.createSimpleExperiment("default", "admin", "echoExperiment", "SimpleEcho2", echoAppId, exInputs); + simpleExperiment.setExperimentOutputs(exOut); + + + + Map computeResources = airavataClient.getAvailableAppInterfaceComputeResources(echoAppId); + if (computeResources != null && computeResources.size() != 0) { + for (String id : computeResources.keySet()) { + String resourceName = computeResources.get(id); + if (resourceName.equals(unicoreHostName)) { + ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 1, 1, 1, "normal", 1, 0, 1, "sds128"); + UserConfigurationData userConfigurationData = new UserConfigurationData(); + userConfigurationData.setAiravataAutoSchedule(false); + userConfigurationData.setOverrideManualScheduledParams(false); + userConfigurationData.setComputationalResourceScheduling(scheduling); + simpleExperiment.setUserConfigurationData(userConfigurationData); + return client.createExperiment(simpleExperiment); + } + } + } + } catch (AiravataSystemException e) { + logger.error("Error occured while creating the experiment...", e.getMessage()); + throw new AiravataSystemException(e); + } catch (InvalidRequestException e) { + logger.error("Error occured while creating the experiment...", e.getMessage()); + throw new InvalidRequestException(e); + } catch (AiravataClientException e) { + logger.error("Error occured while creating the experiment...", e.getMessage()); + throw new AiravataClientException(e); + } catch (TException e) { + logger.error("Error occured while creating the experiment...", e.getMessage()); + throw new TException(e); + } + return null; + } + + public static String createExperimentWRFStampede(Airavata.Client client) throws TException { try { List exInputs = new ArrayList(); http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java index 5e8bf60..789b475 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java @@ -53,14 +53,17 @@ public class RegisterSampleApplications { private final static Logger logger = LoggerFactory.getLogger(RegisterSampleApplications.class); // private static final String DEFAULT_GATEWAY = "default"; private static final String DEFAULT_GATEWAY = "php_reference_gateway"; - private Airavata.Client airavataClient; + private static Airavata.Client airavataClient; //Host Id's private static String localhostId = ""; private static String stampedeResourceId = "stampede.tacc.xsede.org_92ac5ed6-35a5-4910-82ef-48f128f9245a"; private static String trestlesResourceId = "trestles.sdsc.xsede.org_db29986e-5a27-4949-ae7f-04a6012d0d35"; private static String bigredResourceId = "bigred2.uits.iu.edu_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1"; - + private static String fsdResourceId; + // unicore service endpoint url + private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory"; + //Appplication Names private static final String echoName = "Echo"; private static final String amberName = "Amber"; @@ -180,13 +183,47 @@ public class RegisterSampleApplications { bigredResourceId = registerComputeHost("bigred2.uits.iu.edu", "IU BigRed II Cluster", ResourceJobManagerType.PBS, "push", "/opt/torque/torque-4.2.3.1/bin/", SecurityProtocol.SSH_KEYS, 22, "aprun -n"); System.out.println("BigredII Resource Id is " + bigredResourceId); + + fsdResourceId = registerUnicoreEndpoint("fsd-cloud15.zam.kfa-juelich.de", "interop host", JobSubmissionProtocol.UNICORE, SecurityProtocol.GSI); + System.out.println("FSd Resource Id: "+fsdResourceId); + } catch (TException e) { e.printStackTrace(); } } - + + public static String registerUnicoreEndpoint(String hostName, String hostDesc, JobSubmissionProtocol protocol, SecurityProtocol securityProtocol) throws TException { + + ComputeResourceDescription computeResourceDescription = RegisterSampleApplicationsUtils + .createComputeResourceDescription(hostName, hostDesc, null, null); + + fsdResourceId = airavataClient.registerComputeResource(computeResourceDescription); + + + + if (fsdResourceId.isEmpty()) + throw new AiravataClientException(); + + System.out.println("FSD Compute ResourceID: "+fsdResourceId); + + JobSubmissionInterface jobSubmission = RegisterSampleApplicationsUtils.createJobSubmissionInterface(fsdResourceId, protocol, 2); + UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission(); + ucrJobSubmission.setSecurityProtocol(securityProtocol); + ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL); + jobSubmission.setJobSubmissionProtocol(JobSubmissionProtocol.UNICORE); + + airavataClient.addUNICOREJobSubmissionDetails(fsdResourceId, 0, ucrJobSubmission); + + return jobSubmission.getJobSubmissionInterfaceId(); + } + + public void registerfsd(){ + System.out.println("\n #### Registering XSEDE Computational Resources #### \n"); + + } + public void registerAppModules() { try { System.out.println("\n #### Registering Application Modules #### \n"); @@ -264,6 +301,11 @@ public class RegisterSampleApplications { //Registering BigRed II Apps registerBigRedApps(); + + //Registering FSD Apps + registerFSDApps(); + + } public void registerAppInterfaces() { @@ -939,7 +981,24 @@ public class RegisterSampleApplications { e.printStackTrace(); } } + + public void registerFSDApps() { + try { + System.out.println("#### Registering Application Deployments on FSD #### \n"); + + //Register Echo + String echoAppDeployId = airavataClient.registerApplicationDeployment( + RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, fsdResourceId, + "/bin/date", ApplicationParallelismType.SERIAL, echoDescription)); + System.out.println("Echo on FSD deployment Id " + echoAppDeployId); + } catch (TException e) { + e.printStackTrace(); + } + } + + + public String registerComputeHost(String hostName, String hostDesc, ResourceJobManagerType resourceJobManagerType, String monitoringEndPoint, String jobMangerBinPath, @@ -978,7 +1037,11 @@ public class RegisterSampleApplications { return computeResourceId; } - + + + + + public void registerGatewayResourceProfile() { try { @@ -996,13 +1059,17 @@ public class RegisterSampleApplications { ComputeResourcePreference bigRedResourcePreferences = RegisterSampleApplicationsUtils. createComputeResourcePreference(bigredResourceId, "TG-STA110014S", false, null, null, null, "/N/dc2/scratch/cgateway/gta-work-dirs"); - + + ComputeResourcePreference fsdResourcePreferences = RegisterSampleApplicationsUtils. + createComputeResourcePreference(fsdResourceId, null, false, null, null, null,null); + GatewayResourceProfile gatewayResourceProfile = new GatewayResourceProfile(); gatewayResourceProfile.setGatewayID(DEFAULT_GATEWAY); gatewayResourceProfile.setGatewayName(DEFAULT_GATEWAY); gatewayResourceProfile.addToComputeResourcePreferences(stampedeResourcePreferences); gatewayResourceProfile.addToComputeResourcePreferences(trestlesResourcePreferences); gatewayResourceProfile.addToComputeResourcePreferences(bigRedResourcePreferences); + gatewayResourceProfile.addToComputeResourcePreferences(fsdResourcePreferences); String gatewayProfile = airavataClient.registerGatewayResourceProfile(gatewayResourceProfile); System.out.println("Gateway Profile is registered with Id " + gatewayProfile); http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift index e712d16..389c417 100644 --- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift +++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift @@ -966,6 +966,32 @@ service Airavata { 2: airavataErrors.AiravataClientException ace, 3: airavataErrors.AiravataSystemException ase) + /** + * Add a UNICORE Job Submission details to a compute resource + * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces. + * + * @param computeResourceId + * The identifier of the compute resource to which JobSubmission protocol to be added + * + * @param priorityOrder + * Specify the priority of this job manager. If this is the only jobmanager, the priority can be zero. + * + * @param unicoreJobSubmission + * The UnicoreJobSubmission object to be added to the resource. + * + * @return status + * Returns a success/failure of the deletion. + * + */ + bool addUNICOREJobSubmissionDetails(1: required string computeResourceId, + 2: required i32 priorityOrder, + 3: required computeResourceModel.UnicoreJobSubmission unicoreJobSubmission) + throws (1: airavataErrors.InvalidRequestException ire, + 2: airavataErrors.AiravataClientException ace, + 3: airavataErrors.AiravataSystemException ase) + + + /** * Add a Cloud Job Submission details to a compute resource * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces. http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java index 23abe4d..4a38dba 100644 --- a/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java +++ b/modules/app-catalog/app-catalog-cpi/src/main/java/org/airavata/appcatalog/cpi/ComputeResource.java @@ -71,6 +71,13 @@ public interface ComputeResource { */ String addGlobusJobSubmission (GlobusJobSubmission globusJobSubmission) throws AppCatalogException; + /** + * This method will add a UNICOREJobSubmission to the database + * @param unicoreJobSubmission + * @return uniquely generated submission id + */ + String addUNICOREJobSubmission (UnicoreJobSubmission unicoreJobSubmission) throws AppCatalogException; + String addLocalDataMovement (LOCALDataMovement localDataMovement) throws AppCatalogException; @@ -144,7 +151,15 @@ public interface ComputeResource { * @return GSISSHSubmission object */ SSHJobSubmission getSSHJobSubmission (String submissionId) throws AppCatalogException; + + /** + * This method will retrieve UnicoreJobSubmission object + * @param submissionId unique submission id + * @return UnicoreSubmission object + */ + UnicoreJobSubmission getUNICOREJobSubmission (String submissionId) throws AppCatalogException; + /** * This method will retrieve GSISSHJobSubmission object http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java index 9104e41..5aab593 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java @@ -196,6 +196,24 @@ public class ComputeResourceImpl implements ComputeResource { throw new AppCatalogException(e); } } + + @Override + public String addUNICOREJobSubmission(UnicoreJobSubmission unicoreJobSubmission) + throws AppCatalogException { + try { + unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE")); + UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission); + resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL()); + resource.save(); + return resource.getjobSubmissionInterfaceId(); + }catch (Exception e){ + logger.error("Error while retrieving SSH Job Submission...", e); + throw new AppCatalogException(e); + } + + } + + @Override public void addJobSubmissionProtocol(String computeResourceId, JobSubmissionInterface jobSubmissionInterface) throws AppCatalogException { @@ -518,7 +536,42 @@ public class ComputeResourceImpl implements ComputeResource { } } - @Override + // @Override + // public List getGridFTPDataMovementList(Map filters) throws AppCatalogException { + // try { + // GridftpDataMovementResource resource = new GridftpDataMovementResource(); + // for (String fieldName : filters.keySet() ){ + // if (fieldName.equals(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL)){ + // List resources = resource.get(AbstractResource.GridFTPDataMovementConstants.SECURITY_PROTOCOL, filters.get(fieldName)); + // if (resources != null && !resources.isEmpty()){ + // return AppCatalogThriftConversion.getGridFTPDataMovementList(resources); + // } + // }else { + // logger.error("Unsupported field name for GridFTP Data movement.", new IllegalArgumentException()); + // throw new IllegalArgumentException("Unsupported field name for GridFTP Data movement."); + // } + // } + // }catch (Exception e){ + // logger.error("Error while retrieving GridFTP Data movement list...", e); + // throw new AppCatalogException(e); + // } + // return null; + // } + + @Override + public UnicoreJobSubmission getUNICOREJobSubmission(String submissionId) + throws AppCatalogException { + try { + UnicoreJobSubmissionResource resource = new UnicoreJobSubmissionResource(); + resource = (UnicoreJobSubmissionResource)resource.get(submissionId); + return AppCatalogThriftConversion.getUnicoreJobSubmissionDescription(resource); + }catch (Exception e){ + logger.error("Error while retrieving UNICORE Job Submission model instance...", e); + throw new AppCatalogException(e); + } + } + + @Override public CloudJobSubmission getCloudJobSubmission(String submissionId) throws AppCatalogException { try { CloudSubmissionResource resource = new CloudSubmissionResource(); @@ -719,4 +772,5 @@ public class ComputeResourceImpl implements ComputeResource { localDataMovementResource = (LocalDataMovementResource) localDataMovementResource.get(datamovementId); return AppCatalogThriftConversion.getLocalDataMovement(localDataMovementResource); } + } http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java index 005f12b..dc6a00a 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java @@ -31,6 +31,7 @@ public abstract class AbstractResource implements Resource { public static final String GSISSH_PREJOBCOMMAND = "GSISSHPreJobCommand"; public static final String GSISSH_POSTJOBCOMMAND = "GSISSHPostJobCommand"; public static final String GLOBUS_SUBMISSION = "GlobusJobSubmission"; + public static final String UNICORE_JOB_SUBMISSION = "UnicoreJobSubmission"; public static final String GLOBUS_GK_ENDPOINT = "GlobusGKEndpoint"; public static final String SSH_SUBMISSION = "SSHSubmission"; public static final String SCP_DATA_MOVEMENT = "ScpDataMovement"; @@ -116,6 +117,14 @@ public abstract class AbstractResource implements Resource { public static final String GLOBUS_GATEKEEPER_EP = "globusEP"; } + // Unicore Post Job Command Table + public final class UnicoreJobSubmissionConstants { + public static final String SUBMISSION_ID = "submissionID"; + public static final String SECURITY_PROTOCAL = "securityProtocol"; + public static final String UNICORE_ENDPOINT_URL = "unicoreEndpointUrl"; + } + + public final class GlobusEPConstants{ public static final String SUBMISSION_ID = "submissionID"; public static final String ENDPOINT = "endpoint"; http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java index c4420f8..cad51f8 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java @@ -116,6 +116,14 @@ public class AppCatalogJPAUtils { logger.error("Object should be a GSISSH Submission", new IllegalArgumentException()); throw new IllegalArgumentException("Object should be a GSISSH Submission."); } + case UNICORE_JOB_SUBMISSION: + if (o instanceof UnicoreJobSubmission){ + return createUnicoreJobSubmission((UnicoreJobSubmission) o); + }else { + logger.error("Object should be a GSISSH Submission", new IllegalArgumentException()); + throw new IllegalArgumentException("Object should be a GSISSH Submission."); + } + case GSISSH_EXPORT: if (o instanceof GSISSHExport){ return createGSISSHExport((GSISSHExport) o); @@ -496,7 +504,17 @@ public class AppCatalogJPAUtils { } return submissionResource; } - + + + private static Resource createUnicoreJobSubmission(UnicoreJobSubmission o) { + UnicoreJobSubmissionResource submissionResource = new UnicoreJobSubmissionResource(); + if (o != null) { + submissionResource.setjobSubmissionInterfaceId(o.getSubmissionID()); + submissionResource.setUnicoreEndpointUrl(o.getUnicoreEndpointUrl()); + } + return submissionResource; + } + private static Resource createGSISSHExport(GSISSHExport o){ GSISSHExportResource resource = new GSISSHExportResource(); if (o != null) { http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java index eea1426..d9787a3 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogResourceType.java @@ -30,6 +30,7 @@ public enum AppCatalogResourceType { GSISSH_PREJOBCOMMAND, GSISSH_POSTJOBCOMMAND, GLOBUS_SUBMISSION, + UNICORE_JOB_SUBMISSION, GLOBUS_GK_ENDPOINT, SSH_JOB_SUBMISSION, SCP_DATA_MOVEMENT, http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java index dc7766e..a10788c 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java @@ -232,7 +232,21 @@ public class AppCatalogThriftConversion { resource.setSshPort(submission.getSshPort()); return resource; } + + + public static UnicoreJobSubmissionResource getUnicoreJobSubmission (UnicoreJobSubmission submission){ + UnicoreJobSubmissionResource resource = new UnicoreJobSubmissionResource(); + + resource.setjobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId()); + + if (submission.getSecurityProtocol() != null){ + resource.setSecurityProtocol(submission.getSecurityProtocol().toString()); + } + resource.setUnicoreEndpointUrl(submission.getUnicoreEndPointURL()); + return resource; + } + public static CloudSubmissionResource getCloudJobSubmission (CloudJobSubmission submission){ CloudSubmissionResource resource = new CloudSubmissionResource(); resource.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId()); @@ -314,7 +328,16 @@ public class AppCatalogThriftConversion { sshJobSubmission.setSshPort(submission.getSshPort()); return sshJobSubmission; } + + public static UnicoreJobSubmission getUnicoreJobSubmissionDescription (UnicoreJobSubmissionResource submission) throws AppCatalogException { + UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission(); + unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl()); + unicoreJobSubmission.setJobSubmissionInterfaceId(submission.getjobSubmissionInterfaceId()); + unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.GSI); + return unicoreJobSubmission; + } + public static CloudJobSubmission getCloudJobSubmissionDescription (CloudSubmissionResource submission) throws AppCatalogException { CloudJobSubmission cloudJobSubmission = new CloudJobSubmission(); cloudJobSubmission.setJobSubmissionInterfaceId(submission.getJobSubmissionInterfaceId()); http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml index b0d5a1a..63e990e 100644 --- a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml +++ b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml @@ -30,6 +30,7 @@ org.apache.aiaravata.application.catalog.data.model.GSISSHExport org.apache.aiaravata.application.catalog.data.model.GSISSHPreJobCommand org.apache.aiaravata.application.catalog.data.model.GSISSHPostJobCommand + org.apache.aiaravata.application.catalog.data.model.UnicoreJobSubmission org.apache.aiaravata.application.catalog.data.model.HostAlias org.apache.aiaravata.application.catalog.data.model.HostIPAddress org.apache.aiaravata.application.catalog.data.model.ScpDataMovement http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql index 9129559..dec5029 100644 --- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql +++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql @@ -1,4 +1,4 @@ -/* +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -87,6 +87,15 @@ CREATE TABLE GLOBUS_SUBMISSION PRIMARY KEY(SUBMISSION_ID) ); +CREATE TABLE UNICORE_SUBMISSION +( + SUBMISSION_ID VARCHAR(255), + SECURITY_PROTOCAL VARCHAR(255), + UNICORE_ENDPOINT_URL VARCHAR(255), + PRIMARY KEY(SUBMISSION_ID) +); + + CREATE TABLE GLOBUS_GK_ENDPOINT ( SUBMISSION_ID VARCHAR(255), http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql index f00fb3b..7c21382 100644 --- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql +++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql @@ -85,7 +85,13 @@ CREATE TABLE GLOBUS_SUBMISSION SECURITY_PROTOCAL VARCHAR(255), PRIMARY KEY(SUBMISSION_ID) ); - +CREATE TABLE UNICORE_SUBMISSION +( + SUBMISSION_ID VARCHAR(255), + SECURITY_PROTOCAL VARCHAR(255), + UNICORE_ENDPOINT_URL VARCHAR(255), + PRIMARY KEY(SUBMISSION_ID) +); CREATE TABLE GLOBUS_GK_ENDPOINT ( SUBMISSION_ID VARCHAR(255), http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/distribution/server/src/main/assembly/bin-assembly.xml ---------------------------------------------------------------------- diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml index bec5b12..cfb4f05 100644 --- a/modules/distribution/server/src/main/assembly/bin-assembly.xml +++ b/modules/distribution/server/src/main/assembly/bin-assembly.xml @@ -1,10 +1,13 @@ - + @@ -23,284 +26,283 @@ ]> - bin - true - ${archieve.name}-${version} - - tar.gz - zip - + bin + true + ${archieve.name}-${version} + + tar.gz + zip + - + - - - ../../../ - . - - RELEASE_NOTES - - - - - src/main/resources/ - . - - LICENSE - NOTICE - README - INSTALL - - + + + ../../../ + . + + RELEASE_NOTES + + + + + src/main/resources/ + . + + LICENSE + NOTICE + README + INSTALL + + - - - ../../ws-messenger/messagebroker/src/main/resources/database_scripts - - bin/database_scripts - - - *sql* - - - - ../../ws-messenger/messagebox/src/main/resources/database_scripts - - bin/database_scripts - - - *sql* - - - - ../../registry/airavata-jpa-registry/src/main/resources - - bin/database_scripts - - - *sql* - - - - ../../app-catalog/app-catalog-data/src/main/resources - - bin/database_scripts - - - *sql* - - - - src/main/resources/bin - bin - 777 - - *.sh - *.bat - logo.txt - startNetworkServer - - - - ${project.build.directory}/conf - bin - - airavata-server.properties - zoo.cfg - registry.properties - log4j.properties - host.xml - persistence.xml - provenance.sql - gfac-config.xml - PBSTemplate.xslt - SLURMTemplate.xslt - SGETemplate.xslt - gsissh.properties - - + + + ../../ws-messenger/messagebroker/src/main/resources/database_scripts + + bin/database_scripts + + + *sql* + + + + ../../ws-messenger/messagebox/src/main/resources/database_scripts + + bin/database_scripts + + + *sql* + + + + ../../registry/airavata-jpa-registry/src/main/resources + + bin/database_scripts + + + *sql* + + + + ../../app-catalog/app-catalog-data/src/main/resources + + bin/database_scripts + + + *sql* + + + + src/main/resources/bin + bin + 777 + + *.sh + *.bat + logo.txt + startNetworkServer + + + + ${project.build.directory}/conf + bin + + airavata-server.properties + zoo.cfg + registry.properties + log4j.properties + host.xml + persistence.xml + provenance.sql + gfac-config.xml + PBSTemplate.xslt + SLURMTemplate.xslt + SGETemplate.xslt + gsissh.properties + + - - - src/main/resources/axis2-standalone-bin - - bin - 777 - - *.sh - *.bat - - + + + src/main/resources/axis2-standalone-bin + bin + 777 + + *.sh + *.bat + + - - src/main/resources/conf - bin - - **/* - - + + src/main/resources/conf + bin + + **/* + + - - - ${project.build.directory}/samples/applications - samples - - *.sh - *.bat - - + + + ${project.build.directory}/samples/applications + + samples + + *.sh + *.bat + + - + - - - lib - ${artifact.artifactId}.${artifact.extension} - - org.apache.derby:derby:jar - org.apache.derby:derbytools:jar - org.apache.derby:derbynet:jar - org.apache.derby:derbyclient:jar - - - - lib - - org.slf4j:slf4j-api:jar - org.slf4j:slf4j-jcl:jar - org.slf4j:slf4j-log4j12:jar - log4j:log4j:jar - javax.jcr:jcr:jar - commons-collections:commons-collections - commons-configuration:commons-configuration - commons-lang:commons-lang - commons-io:commons-io - org.ogce:xpp3:jar - org.ogce:xpp5:jar - org.ogce:xsul:jar - org.ogce:xsul5:jar - org.ogce:gpel-client:jar - org.ogce:atomixmiser:jar - org.ogce:yfilter:jar - org.python:jython:jar - org.jglobus:gss - org.jglobus:gram - org.jglobus:myproxy - org.jglobus:gridftp - org.jglobus:ssl-proxies - org.jglobus:jsse - org.jglobus:io - org.jglobus:axis - org.apache.xmlbeans:xmlbeans - com.amazonaws:aws-java-sdk - net.java.dev.jets3t:jets3t - org.apache.airavata:airavata-standalone-server:jar - org.apache.airavata:airavata-common-utils:jar - org.apache.airavata:airavata-orchestrator-service:jar - org.apache.airavata:airavata-orchestrator-core:jar - org.apache.airavata:airavata-gfac-schema-utils:jar - org.apache.airavata:airavata-workflow-execution-context:jar - org.apache.airavata:airavata-registry-cpi:jar - org.apache.airavata:airavata-jpa-registry:jar - org.apache.airavata:app-catalog-cpi:jar - org.apache.airavata:app-catalog-data:jar - org.apache.airavata:airavata-data-models:jar - org.apache.airavata:airavata-credential-store:jar - org.apache.airavata:airavata-gfac-core:jar - org.apache.airavata:airavata-gfac-service:jar - org.apache.airavata:airavata-gfac-ssh:jar - org.apache.airavata:airavata-gfac-local:jar - org.apache.airavata:airavata-gfac-gsissh:jar - org.apache.airavata:airavata-gfac-hpc-monitor:jar - org.apache.airavata:airavata-gfac-hadoop:jar - org.apache.airavata:airavata-gfac-bes:jar - org.apache.airavata:airavata-gfac-gram:jar - org.apache.airavata:airavata-message-monitor:jar - org.apache.airavata:airavata-workflow-model-core:jar - org.apache.airavata:airavata-messenger-commons:jar - org.apache.airavata:airavata-messenger-client:jar - org.apache.airavata:airavata-workflow-tracking:jar - org.apache.airavata:airavata-workflow-engine:jar - org.apache.airavata:gsissh:jar - org.apache.airavata:airavata-model-utils:jar - org.apache.airavata:airavata-api-server:jar - org.apache.airavata:airavata-api-stubs:jar - org.apache.openjpa:openjpa-all:jar - org.bouncycastle:bcprov-jdk16 - javax.servlet:javax.servlet-api - xerces:xercesImpl:jar:2.9.1 - com.ibm.icu:icu4j - com.google.guava:guava - org.apache.hadoop:hadoop-core - org.apache.hadoop:hadoop-client - org.apache.whirr:whirr-hadoop - org.hamcrest:hamcrest-all - org.mockito:mockito-all - com.jcraft:jsch - net.sf.jopt-simple:jopt-simple - net.schmizz:sshj - j2ssh:j2ssh-core - j2ssh:j2ssh-common - org.apache.httpcomponents:httpcore:jar:4.1 - org.apache.httpcomponents:httpclient:jar:4.1 - de.odysseus.staxon:staxon:jar:1.2 - de.odysseus.staxon:staxon-jackson:jar:1.2 - org.ebaysf.web:cors-filter:jar:1.0.0 - org.ogce:bcgss - org.apache.xmlbeans:xmlbeans - org.apache.thrift:libthrift:jar:0.9.1 - commons-cli:commons-cli - commons-codec:commons-codec - com.rabbitmq:amqp-client - com.fasterxml.jackson.core:jackson-databind - com.fasterxml.jackson.core:jackson-core - com.fasterxml.jackson.core:jackson-annotations - org.apache.zookeeper:zookeeper - - - - - + + + lib + ${artifact.artifactId}.${artifact.extension} + + + org.apache.derby:derby:jar + org.apache.derby:derbytools:jar + org.apache.derby:derbynet:jar + org.apache.derby:derbyclient:jar + + + + lib + + org.slf4j:slf4j-api:jar + org.slf4j:slf4j-jcl:jar + org.slf4j:slf4j-log4j12:jar + log4j:log4j:jar + javax.jcr:jcr:jar + commons-collections:commons-collections + commons-configuration:commons-configuration + commons-lang:commons-lang + commons-io:commons-io + org.ogce:xpp3:jar + org.ogce:xpp5:jar + org.ogce:xsul:jar + org.ogce:xsul5:jar + org.ogce:gpel-client:jar + org.ogce:atomixmiser:jar + org.ogce:yfilter:jar + org.python:jython:jar + org.jglobus:gss + org.jglobus:gram + org.jglobus:myproxy + org.jglobus:gridftp + org.jglobus:ssl-proxies + org.jglobus:jsse + org.jglobus:io + org.jglobus:axis + org.apache.xmlbeans:xmlbeans + com.amazonaws:aws-java-sdk + net.java.dev.jets3t:jets3t + org.apache.airavata:airavata-standalone-server:jar + + org.apache.airavata:airavata-common-utils:jar + org.apache.airavata:airavata-orchestrator-service:jar + + org.apache.airavata:airavata-orchestrator-core:jar + + org.apache.airavata:airavata-gfac-schema-utils:jar + + org.apache.airavata:airavata-workflow-execution-context:jar + + org.apache.airavata:airavata-registry-cpi:jar + org.apache.airavata:airavata-jpa-registry:jar + org.apache.airavata:app-catalog-cpi:jar + org.apache.airavata:app-catalog-data:jar + org.apache.airavata:airavata-data-models:jar + org.apache.airavata:airavata-credential-store:jar + org.apache.airavata:airavata-gfac-core:jar + org.apache.airavata:airavata-gfac-service:jar + org.apache.airavata:airavata-gfac-ssh:jar + org.apache.airavata:airavata-gfac-local:jar + org.apache.airavata:airavata-gfac-gsissh:jar + org.apache.airavata:airavata-gfac-hpc-monitor:jar + org.apache.airavata:airavata-gfac-hadoop:jar + org.apache.airavata:airavata-gfac-bes:jar + org.apache.airavata:airavata-gfac-gram:jar + org.apache.airavata:airavata-message-monitor:jar + org.apache.airavata:airavata-workflow-model-core:jar + + org.apache.airavata:airavata-messenger-commons:jar + + org.apache.airavata:airavata-messenger-client:jar + org.apache.airavata:airavata-workflow-tracking:jar + + org.apache.airavata:airavata-workflow-engine:jar + org.apache.airavata:gsissh:jar + org.apache.airavata:airavata-model-utils:jar + org.apache.airavata:airavata-api-server:jar + org.apache.airavata:airavata-api-stubs:jar + org.apache.openjpa:openjpa-all:jar + org.bouncycastle:bcprov-jdk15on + javax.servlet:javax.servlet-api + xerces:xercesImpl:jar:2.9.1 + com.ibm.icu:icu4j + com.google.guava:guava + org.apache.hadoop:hadoop-core + org.apache.hadoop:hadoop-client + org.apache.whirr:whirr-hadoop + org.hamcrest:hamcrest-all + org.mockito:mockito-all + com.jcraft:jsch + net.sf.jopt-simple:jopt-simple + net.schmizz:sshj + j2ssh:j2ssh-core + j2ssh:j2ssh-common + org.apache.httpcomponents:httpcore:jar:4.1 + org.apache.httpcomponents:httpclient:jar:4.1 + de.odysseus.staxon:staxon:jar:1.2 + de.odysseus.staxon:staxon-jackson:jar:1.2 + org.ebaysf.web:cors-filter:jar:1.0.0 + org.ogce:bcgss + org.apache.xmlbeans:xmlbeans + org.apache.thrift:libthrift:jar:0.9.1 + commons-cli:commons-cli + commons-codec:commons-codec + com.rabbitmq:amqp-client + com.fasterxml.jackson.core:jackson-databind + com.fasterxml.jackson.core:jackson-core + com.fasterxml.jackson.core:jackson-annotations + org.apache.zookeeper:zookeeper + + + org.apache.xmlbeans:xmlbeans-xpath + net.sf.saxon:saxon + net.sf.saxon:saxon-dom + net.sf.saxon:saxon-xpath + log4j:apache-log4j-extras + eu.eu-emi.security:canl + org.bouncycastle:bcpkix-jdk15on + pl.edu.icm.saml:samly2 + org.apache.ws.security:wss4j + org.json:json + org.apache.cxf:cxf-rt-databinding-xmlbeans + org.apache.cxf:cxf-api + org.codehaus.woodstox:woodstox-core-asl + org.codehaus.woodstox:stax2-api + org.apache.ws.xmlschema:xmlschema-core + org.apache.cxf:cxf-rt-core + com.sun.xml.bind:jaxb-impl + org.apache.cxf:cxf-rt-frontend-jaxws + xml-resolver:xml-resolver + asm:asm + org.apache.cxf:cxf-rt-bindings-soap + org.apache.cxf:cxf-rt-databinding-jaxb + org.apache.cxf:cxf-rt-bindings-xml + org.apache.cxf:cxf-rt-frontend-simple + org.apache.cxf:cxf-rt-ws-addr + org.apache.cxf:cxf-rt-ws-policy + org.apache.cxf:cxf-rt-transports-http + org.apache.cxf:cxf-rt-features-clustering + + + + + http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/pom.xml ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml index 2f63d97..f27de1f 100644 --- a/modules/gfac/gfac-bes/pom.xml +++ b/modules/gfac/gfac-bes/pom.xml @@ -22,14 +22,6 @@ This is the extension of GFAC to use GRAM http://airavata.apache.org/ - - - unicore.eu - UNICORE repository - http://unicore-dev.zam.kfa-juelich.de/maven - - - org.jglobus http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java index 9578dd5..b9ea873 100644 --- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java +++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java @@ -24,7 +24,6 @@ import java.util.Calendar; import java.util.Map; import org.apache.airavata.common.exception.ApplicationSettingsException; -import org.apache.airavata.gfac.Constants; import org.apache.airavata.gfac.GFacException; import org.apache.airavata.gfac.bes.security.UNICORESecurityContext; import org.apache.airavata.gfac.bes.utils.ActivityInfo; http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java index 690ad43..6bd4d22 100644 --- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java +++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java @@ -53,7 +53,7 @@ public class UNICORESecurityContext extends GSISecurityContext { private DefaultClientConfiguration secProperties; protected static DirectoryCertChainValidator dcValidator; - public static final String UNICORE_SECURITY_CONTEXT = "unicore"; + public static final String UNICORE_SECURITY_CONTEXT = "unicore.security.context"; public UNICORESecurityContext(CredentialReader credentialReader, RequestData requestData) { super(credentialReader, requestData); http://git-wip-us.apache.org/repos/asf/airavata/blob/1da5054a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java index d4cd563..23c31c8 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java @@ -81,6 +81,7 @@ import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterfa import org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission; import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager; import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission; +import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission; import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference; import org.apache.airavata.model.workspace.experiment.*; import org.apache.airavata.registry.cpi.Registry; @@ -98,6 +99,7 @@ import org.apache.airavata.schemas.gfac.ProjectAccountType; import org.apache.airavata.schemas.gfac.QueueType; import org.apache.airavata.schemas.gfac.SSHHostType; import org.apache.airavata.schemas.gfac.ServiceDescriptionType; +import org.apache.airavata.schemas.gfac.UnicoreHostType; import org.apache.zookeeper.*; import org.apache.zookeeper.data.Stat; import org.slf4j.Logger; @@ -219,7 +221,13 @@ public class BetterGfacImpl implements GFac,Watcher { daemonHandlers = new ArrayList(); startDaemonHandlers(); } + + public BetterGfacImpl(Registry registry) { + this(); + this.registry = registry; + } + /** * This is the job launching method outsiders of GFac can use, this will invoke the GFac handler chain and providers * And update the registry occordingly, so the users can query the database to retrieve status and output from Registry @@ -249,7 +257,7 @@ public class BetterGfacImpl implements GFac,Watcher { * 1. Get the Task from the task ID and construct the Job object and save it in to registry * 2. Add properties of description documents to jobExecutionContext which will be used inside the providers. */ - + //Fetch the Task details for the requested experimentID from the registry. Extract required pointers from the Task object. TaskDetails taskData = (TaskDetails) registry.get(RegistryModelType.TASK_DETAIL, taskID); @@ -383,6 +391,12 @@ public class BetterGfacImpl implements GFac,Watcher { break; } break; + case UNICORE: + UnicoreJobSubmission ucrSubmission = appCatalog.getComputeResource().getUNICOREJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId()); + String unicoreEndpoint = ucrSubmission.getUnicoreEndPointURL(); + legacyHostDescription = new HostDescription(UnicoreHostType.type); + ((UnicoreHostType) legacyHostDescription.getType()).setUnicoreBESEndPointArray(new String[]{unicoreEndpoint}); + break; default: break; } @@ -399,7 +413,9 @@ public class BetterGfacImpl implements GFac,Watcher { /////////////////////---------------- APPLICATION DESCRIPTOR ---------------------///////////////////////// //Fetch deployment information and fill-in legacy doc - if ((legacyHostDescType instanceof GsisshHostType) || (legacyHostDescType instanceof SSHHostType)) { + if ((legacyHostDescType instanceof GsisshHostType) + || (legacyHostDescType instanceof SSHHostType) + || (legacyHostDescType instanceof UnicoreHostType)) { legacyAppDescription = new ApplicationDescription(HpcApplicationDeploymentType.type); HpcApplicationDeploymentType legacyHPCAppDescType = (HpcApplicationDeploymentType) legacyAppDescription.getType(); switch (applicationDeployment.getParallelism()) {