airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: fixing test failure, AIRAVATA-1763, saving acutal job file content to database
Date Mon, 13 Jul 2015 15:15:07 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 595724592 -> 29fa73a0b


fixing test failure, AIRAVATA-1763, saving acutal job file content to database


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/29fa73a0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/29fa73a0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/29fa73a0

Branch: refs/heads/airavata-0.15-release-branch
Commit: 29fa73a0b96c997365b3eccead333411cf40d020
Parents: 5957245
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Mon Jul 13 11:15:00 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Mon Jul 13 11:15:00 2015 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |   5 +
 .../api/server/util/AppCatalogInitUtil.java     |   3 +-
 .../api/server/util/RegistryInitUtil.java       |   5 +-
 .../handler/AiravataServerHandlerTest.java      |  12 +-
 .../src/test/resources/appcatalog-derby.sql     | 461 +++++++++++++++++++
 .../src/test/resources/registry-derby.sql       | 391 ++++++++++++++++
 .../client/samples/CreateLaunchExperiment.java  |   8 +-
 .../tools/RegisterSampleApplicationsUtils.java  |   1 +
 .../credential-store-service/pom.xml            |  10 +-
 .../store/store/impl/db/SSHCredentialTest.java  |  16 +-
 .../gfac/ssh/provider/impl/SSHProvider.java     |   4 +-
 .../airavata/gsi/ssh/util/CommonUtils.java      |  35 ++
 12 files changed, 929 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index 28b9ef9..ed859aa 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -58,6 +58,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
             <artifactId>app-catalog-data</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
index 870898b..540fd17 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
@@ -77,7 +77,8 @@ public class AppCatalogInitUtil {
         try {
             conn = db.connect();
             if (!DatabaseCreator.isDatabaseStructureCreated(COMPUTE_RESOURCE, conn)) {
-                DatabaseCreator.createRegistryDatabase("database_scripts/appcatalog", conn);
+//                DatabaseCreator.createRegistryDatabase("database_scripts/appcatalog", conn);
+                DatabaseCreator.createRegistryDatabase("appcatalog", conn);
                 logger.info("New Database created for App Catalog");
             } else {
                 logger.info("Database already created for App Catalog!");

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
index 2e610c5..7a9a967 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
@@ -78,7 +78,8 @@ public class RegistryInitUtil {
         try {
             conn = db.connect();
             if (!DatabaseCreator.isDatabaseStructureCreated(CONFIGURATION_TABLE, conn)) {
-                DatabaseCreator.createRegistryDatabase("database_scripts/registry", conn);
+//                DatabaseCreator.createRegistryDatabase("database_scripts/registry", conn);
+                DatabaseCreator.createRegistryDatabase("registry", conn);
                 logger.info("New Database created for Registry");
             } else {
                 logger.info("Database already created for Registry!");
@@ -112,10 +113,10 @@ public class RegistryInitUtil {
                 if (!workerResource.isExists(ResourceType.PROJECT, DEFAULT_PROJECT_NAME)){
                     projectResource = workerResource.createProject(DEFAULT_PROJECT_NAME);
                     projectResource.setName(DEFAULT_PROJECT_NAME);
+                    projectResource.setId(DEFAULT_PROJECT_NAME);
                     projectResource.setGateway(gateway);
                     projectResource.save();
                 }
-
             } catch (ApplicationSettingsException e) {
                 logger.error("Unable to read airavata-server properties...", e.getMessage());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
index c3154a6..1cceb72 100644
--- a/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
+++ b/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
@@ -21,10 +21,12 @@
 package org.apache.airavata.api.server.handler;
 
 import junit.framework.Assert;
+import org.apache.airavata.api.server.util.AppCatalogInitUtil;
 import org.apache.airavata.api.server.util.RegistryInitUtil;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.*;
@@ -45,15 +47,23 @@ public class AiravataServerHandlerTest {
 
     private static AiravataServerHandler airavataServerHandler;
     private static String gatewayId = "php_reference_gateway";
+    private static  String computeResouceId = null;
 
     @BeforeClass
     public static void setupBeforeClass() throws Exception{
         RegistryInitUtil.initializeDB();
+        AppCatalogInitUtil.initializeDB();
         airavataServerHandler = new AiravataServerHandler();
 
         Gateway gateway = new Gateway();
         gateway.setGatewayId(gatewayId);
         airavataServerHandler.addGateway(gateway);
+
+        ComputeResourceDescription computeResourceDescription = new ComputeResourceDescription();
+        computeResourceDescription.setHostName("test.compute.resource");
+        computeResourceDescription.setResourceDescription("test compute resource");
+        computeResourceDescription.setEnabled(true);
+        computeResouceId = airavataServerHandler.registerComputeResource(computeResourceDescription);
     }
 
     @AfterClass
@@ -181,7 +191,7 @@ public class AiravataServerHandlerTest {
             inputDataObjectType.setValue("Hello World");
 
             ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
-            scheduling.setResourceHostId(UUID.randomUUID().toString());
+            scheduling.setResourceHostId(computeResouceId);
             scheduling.setComputationalProjectAccount("TG-STA110014S");
             scheduling.setTotalCPUCount(1);
             scheduling.setNodeCount(1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql b/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
new file mode 100644
index 0000000..0b0f0e4
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/resources/appcatalog-derby.sql
@@ -0,0 +1,461 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+CREATE TABLE COMPUTE_RESOURCE
+(
+        RESOURCE_ID VARCHAR (255) NOT NULL,
+        HOST_NAME VARCHAR (255) NOT NULL,
+        RESOURCE_DESCRIPTION VARCHAR (255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        MAX_MEMORY_NODE INTEGER,
+        ENABLED SMALLINT,
+        PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE HOST_ALIAS
+(
+         RESOURCE_ID VARCHAR(255),
+         ALIAS VARCHAR(255),
+         PRIMARY KEY(RESOURCE_ID,ALIAS),
+         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE HOST_IPADDRESS
+(
+         RESOURCE_ID VARCHAR(255),
+         IP_ADDRESS VARCHAR(255),
+         PRIMARY KEY(RESOURCE_ID,IP_ADDRESS),
+         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE GSISSH_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         RESOURCE_JOB_MANAGER VARCHAR(255),
+         SSH_PORT INTEGER,
+         INSTALLED_PATH VARCHAR(255),
+         MONITOR_MODE VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID)
+);
+
+CREATE TABLE GSISSH_EXPORT
+(
+         SUBMISSION_ID VARCHAR(255),
+         EXPORT VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID, EXPORT),
+         FOREIGN KEY (SUBMISSION_ID) REFERENCES GSISSH_SUBMISSION(SUBMISSION_ID) ON DELETE CASCADE
+);
+
+
+
+CREATE TABLE GLOBUS_SUBMISSION
+(
+         SUBMISSION_ID VARCHAR(255),
+         RESOURCE_JOB_MANAGER VARCHAR(255),
+         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 UNICORE_DATAMOVEMENT
+(
+         DATAMOVEMENT_ID VARCHAR(255),
+         SECURITY_PROTOCAL VARCHAR(255),
+         UNICORE_ENDPOINT_URL VARCHAR(255),
+         PRIMARY KEY(DATAMOVEMENT_ID)
+);
+
+
+CREATE TABLE GLOBUS_GK_ENDPOINT
+(
+         SUBMISSION_ID VARCHAR(255),
+         ENDPOINT VARCHAR(255),
+         PRIMARY KEY(SUBMISSION_ID, ENDPOINT),
+         FOREIGN KEY (SUBMISSION_ID) REFERENCES GLOBUS_SUBMISSION(SUBMISSION_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE RESOURCE_JOB_MANAGER
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        PUSH_MONITORING_ENDPOINT VARCHAR (255),
+        JOB_MANAGER_BIN_PATH VARCHAR (255),
+        RESOURCE_JOB_MANAGER_TYPE VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
+);
+
+
+
+CREATE TABLE SSH_JOB_SUBMISSION
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        SSH_PORT INTEGER,
+        MONITOR_MODE VARCHAR (255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+);
+
+CREATE TABLE SCP_DATA_MOVEMENT
+(
+        QUEUE_DESCRIPTION VARCHAR (255),
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        ALTERNATIVE_SCP_HOSTNAME VARCHAR (255),
+        SSH_PORT INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE GRIDFTP_DATA_MOVEMENT
+(
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE GRIDFTP_ENDPOINT
+(
+        ENDPOINT VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID,ENDPOINT),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        FOREIGN KEY (DATA_MOVEMENT_INTERFACE_ID) REFERENCES GRIDFTP_DATA_MOVEMENT(DATA_MOVEMENT_INTERFACE_ID) ON DELETE CASCADE
+);
+
+--CREATE TABLE JOB_SUBMISSION_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         SUBMISSION_ID VARCHAR(255),
+--         JOB_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+--
+--CREATE TABLE DATA_MOVEMENT_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         DATA_MOVE_ID VARCHAR(255),
+--         DATA_MOVE_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+
+CREATE TABLE APPLICATION_MODULE
+(
+         MODULE_ID VARCHAR(255),
+         MODULE_NAME VARCHAR(255),
+         MODULE_VERSION VARCHAR(255),
+         MODULE_DESC VARCHAR(255),
+         GATEWAY_ID VARCHAR (255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(MODULE_ID)
+);
+
+CREATE TABLE APPLICATION_DEPLOYMENT
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         APP_MODULE_ID VARCHAR(255),
+         COMPUTE_HOSTID VARCHAR(255),
+         EXECUTABLE_PATH VARCHAR(255),
+	       PARALLELISM VARCHAR(255),
+         APPLICATION_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         GATEWAY_ID VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID),
+         FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
+         FOREIGN KEY (APP_MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE MODULE_LOAD_CMD
+(
+        CMD VARCHAR (255) NOT NULL,
+        APP_DEPLOYMENT_ID VARCHAR (255) NOT NULL,
+        PRIMARY KEY (APP_DEPLOYMENT_ID,CMD),
+        FOREIGN KEY (APP_DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE PREJOB_COMMAND
+(
+         APPDEPLOYMENT_ID VARCHAR(255),
+         COMMAND VARCHAR(255),
+         PRIMARY KEY(APPDEPLOYMENT_ID, COMMAND),
+         FOREIGN KEY (APPDEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE POSTJOB_COMMAND
+(
+         APPDEPLOYMENT_ID VARCHAR(255),
+         COMMAND VARCHAR(255),
+         PRIMARY KEY(APPDEPLOYMENT_ID, COMMAND),
+         FOREIGN KEY (APPDEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LIBRARY_PREPAND_PATH
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LIBRARY_APEND_PATH
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APP_ENVIRONMENT
+(
+         DEPLOYMENT_ID VARCHAR(255),
+         NAME VARCHAR(255),
+         VALUE VARCHAR(255),
+         PRIMARY KEY(DEPLOYMENT_ID, NAME),
+         FOREIGN KEY (DEPLOYMENT_ID) REFERENCES APPLICATION_DEPLOYMENT(DEPLOYMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INTERFACE
+(
+         INTERFACE_ID VARCHAR(255),
+         APPLICATION_NAME VARCHAR(255),
+         APPLICATION_DESCRIPTION VARCHAR(255),
+         GATEWAY_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(INTERFACE_ID)
+);
+
+CREATE TABLE APP_MODULE_MAPPING
+(
+         INTERFACE_ID VARCHAR(255),
+         MODULE_ID VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID, MODULE_ID),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE,
+         FOREIGN KEY (MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+         INTERFACE_ID VARCHAR(255),
+         INPUT_KEY VARCHAR(255),
+         INPUT_VALUE VARCHAR(255),
+         DATA_TYPE VARCHAR(255),
+         METADATA VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         STANDARD_INPUT SMALLINT,
+         INPUT_ORDER INTEGER,
+         IS_REQUIRED SMALLINT,
+         REQUIRED_TO_COMMANDLINE SMALLINT,
+         DATA_STAGED SMALLINT,
+         USER_FRIENDLY_DESC VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID,INPUT_KEY),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+         INTERFACE_ID VARCHAR(255),
+         OUTPUT_KEY VARCHAR(255),
+         OUTPUT_VALUE VARCHAR(255),
+         DATA_TYPE VARCHAR(255),
+         IS_REQUIRED SMALLINT,
+         REQUIRED_TO_COMMANDLINE SMALLINT,
+         DATA_MOVEMENT SMALLINT,
+         DATA_NAME_LOCATION VARCHAR(255),
+         SEARCH_QUERY VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         PRIMARY KEY(INTERFACE_ID,OUTPUT_KEY),
+         FOREIGN KEY (INTERFACE_ID) REFERENCES APPLICATION_INTERFACE(INTERFACE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE GATEWAY_PROFILE
+(
+         GATEWAY_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PRIMARY KEY(GATEWAY_ID)
+);
+
+CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
+(
+        GATEWAY_ID VARCHAR(255),
+        RESOURCE_ID VARCHAR(255),
+        OVERRIDE_BY_AIRAVATA SMALLINT,
+        PREFERED_JOB_SUB_PROTOCOL VARCHAR(255),
+        PREFERED_DATA_MOVE_PROTOCOL VARCHAR(255),
+        PREFERED_BATCH_QUEUE VARCHAR(255),
+        SCRATCH_LOCATION VARCHAR(255),
+        ALLOCATION_PROJECT_NUMBER VARCHAR(255),
+        LOGIN_USERNAME VARCHAR(255),
+        PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE BATCH_QUEUE
+(
+        COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,
+        MAX_RUNTIME INTEGER,
+        MAX_JOB_IN_QUEUE INTEGER,
+        QUEUE_DESCRIPTION VARCHAR(255),
+        QUEUE_NAME VARCHAR(255) NOT NULL,
+        MAX_PROCESSORS INTEGER,
+        MAX_NODES INTEGER,
+        MAX_MEMORY INTEGER,
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,QUEUE_NAME),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMPUTE_RESOURCE_FILE_SYSTEM
+(
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        PATH VARCHAR (255),
+        FILE_SYSTEM VARCHAR (255) NOT NULL,
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,FILE_SYSTEM),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+  );
+
+CREATE TABLE JOB_SUBMISSION_INTERFACE
+(
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_PROTOCOL VARCHAR (255) NOT NULL,
+        PRIORITY_ORDER INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+ 
+CREATE TABLE DATA_MOVEMENT_INTERFACE
+(
+        COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_PROTOCOL VARCHAR (255) NOT NULL,
+        DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+        PRIORITY_ORDER INTEGER,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (COMPUTE_RESOURCE_ID,DATA_MOVEMENT_INTERFACE_ID),
+        FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE JOB_MANAGER_COMMAND
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        COMMAND_TYPE VARCHAR (255) NOT NULL,
+        COMMAND VARCHAR (255),
+        PRIMARY KEY (RESOURCE_JOB_MANAGER_ID,COMMAND_TYPE),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE LOCAL_SUBMISSION
+(
+        RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
+        JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
+        FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
+      );
+
+CREATE TABLE LOCAL_DATA_MOVEMENT
+(
+	     DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
+	     PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
+);
+
+CREATE TABLE WORKFLOW
+(
+        WF_TEMPLATE_ID VARCHAR (255) NOT NULL,
+        WF_NAME VARCHAR (255) NOT NULL,
+        GRAPH CLOB,
+        OWNER VARCHAR(255),
+        GATEWAY_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        IMAGE BLOB,
+        PRIMARY KEY (WF_TEMPLATE_ID)
+);
+
+CREATE TABLE WORKFLOW_INPUT
+(
+         WF_TEMPLATE_ID VARCHAR(255),
+         INPUT_KEY VARCHAR(255),
+         INPUT_VALUE CLOB,
+         DATA_TYPE VARCHAR(255),
+         METADATA VARCHAR(255),
+         APP_ARGUMENT VARCHAR(255),
+         STANDARD_INPUT SMALLINT,
+         USER_FRIENDLY_DESC VARCHAR(255),
+         PRIMARY KEY(WF_TEMPLATE_ID,INPUT_KEY),
+         FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE WORKFLOW_OUTPUT
+(
+         WF_TEMPLATE_ID VARCHAR(255),
+         OUTPUT_KEY VARCHAR(255),
+         OUTPUT_VALUE CLOB,
+         DATA_TYPE VARCHAR(255),
+         PRIMARY KEY(WF_TEMPLATE_ID,OUTPUT_KEY),
+         FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
+);
+
+
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL) VALUES('app_catalog_version', '0.15');
+
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-api-server/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/test/resources/registry-derby.sql b/airavata-api/airavata-api-server/src/test/resources/registry-derby.sql
new file mode 100644
index 0000000..7ab3755
--- /dev/null
+++ b/airavata-api/airavata-api-server/src/test/resources/registry-derby.sql
@@ -0,0 +1,391 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+CREATE TABLE GATEWAY
+(
+        GATEWAY_ID VARCHAR (255),
+        GATEWAY_NAME VARCHAR(255),
+	      DOMAIN VARCHAR(255),
+	      EMAIL_ADDRESS VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID)
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        CATEGORY_ID VARCHAR (255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.15', CURRENT_TIMESTAMP ,'SYSTEM');
+
+CREATE TABLE USERS
+(
+        USER_NAME VARCHAR(255),
+        PASSWORD VARCHAR(255),
+        PRIMARY KEY(USER_NAME)
+);
+
+CREATE TABLE GATEWAY_WORKER
+(
+        GATEWAY_ID VARCHAR(255),
+        USER_NAME VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID, USER_NAME),
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT
+(
+         GATEWAY_ID VARCHAR(255),
+         USER_NAME VARCHAR(255) NOT NULL,
+         PROJECT_ID VARCHAR(255),
+         PROJECT_NAME VARCHAR(255) NOT NULL,
+         DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         PRIMARY KEY (PROJECT_ID),
+         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT_USER
+(
+    PROJECT_ID VARCHAR(255),
+    USER_NAME VARCHAR(255),
+    PRIMARY KEY (PROJECT_ID,USER_NAME),
+    FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
+    FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        GATEWAY_ID VARCHAR(255),
+        EXECUTION_USER VARCHAR(255) NOT NULL,
+        PROJECT_ID VARCHAR(255) NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        EXPERIMENT_NAME VARCHAR(255) NOT NULL,
+        EXPERIMENT_DESCRIPTION VARCHAR(255),
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        WORKFLOW_TEMPLATE_ID VARCHAR(255),
+        WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
+        WORKFLOW_EXECUTION_ID VARCHAR(255),
+        ALLOW_NOTIFICATION SMALLINT,
+        GATEWAY_EXECUTION_ID VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID),
+        FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+        FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_INPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        VALUE CLOB,
+        INPUT_ORDER INTEGER,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_STAGED SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID,INPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_OUTPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        VALUE CLOB,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_MOVEMENT SMALLINT,
+        DATA_NAME_LOCATION VARCHAR(255),
+        SEARCH_QUERY VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+
+CREATE TABLE WORKFLOW_NODE_DETAIL
+(
+        EXPERIMENT_ID VARCHAR(255) NOT NULL,
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        NODE_NAME VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT VARCHAR(255) NOT NULL,
+        EXECUTION_UNIT_DATA VARCHAR(255),
+        PRIMARY KEY(NODE_INSTANCE_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE TASK_DETAIL
+(
+        TASK_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
+        ALLOW_NOTIFICATION SMALLINT,
+        PRIMARY KEY(TASK_ID),
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NOTIFICATION_EMAIL
+(
+  EMAIL_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+  EXPERIMENT_ID VARCHAR(255),
+  TASK_ID VARCHAR(255),
+  EMAIL_ADDRESS VARCHAR(255),
+  PRIMARY KEY(EMAIL_ID),
+  FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+  FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ERROR_DETAIL
+(
+         ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+         EXPERIMENT_ID VARCHAR(255),
+         TASK_ID VARCHAR(255),
+         NODE_INSTANCE_ID VARCHAR(255),
+         JOB_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         ACTUAL_ERROR_MESSAGE CLOB,
+         USER_FRIEDNLY_ERROR_MSG VARCHAR(255),
+         TRANSIENT_OR_PERSISTENT SMALLINT,
+         ERROR_CATEGORY VARCHAR(255),
+         CORRECTIVE_ACTION VARCHAR(255),
+         ACTIONABLE_GROUP VARCHAR(255),
+         PRIMARY KEY(ERROR_ID),
+         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+        TASK_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        VALUE CLOB,
+        INPUT_ORDER INTEGER,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_STAGED SMALLINT,
+        PRIMARY KEY(TASK_ID,INPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+        TASK_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        VALUE CLOB,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE SMALLINT,
+        DATA_MOVEMENT SMALLINT,
+        DATA_NAME_LOCATION VARCHAR(255),
+        SEARCH_QUERY VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        PRIMARY KEY(TASK_ID,OUTPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_INPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       INPUT_KEY VARCHAR(255) NOT NULL,
+       DATA_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       APP_ARGUMENT VARCHAR(255),
+       STANDARD_INPUT SMALLINT,
+       USER_FRIENDLY_DESC VARCHAR(255),
+       VALUE VARCHAR(255),
+       INPUT_ORDER INTEGER,
+       IS_REQUIRED SMALLINT,
+       REQUIRED_TO_COMMANDLINE SMALLINT,
+       DATA_STAGED SMALLINT,
+       PRIMARY KEY(NODE_INSTANCE_ID,INPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_OUTPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       OUTPUT_KEY VARCHAR(255) NOT NULL,
+       DATA_TYPE VARCHAR(255),
+       VALUE VARCHAR(255),
+       IS_REQUIRED SMALLINT,
+       REQUIRED_TO_COMMANDLINE SMALLINT,
+       DATA_MOVEMENT SMALLINT,
+       DATA_NAME_LOCATION VARCHAR(255),
+       SEARCH_QUERY VARCHAR(255),
+       APP_ARGUMENT VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE JOB_DETAIL
+(
+        JOB_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_DESCRIPTION CLOB NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        JOBNAME VARCHAR (255),
+        WORKING_DIR VARCHAR(255),
+        PRIMARY KEY (TASK_ID, JOB_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_TRANSFER_DETAIL
+(
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        TRANSFER_DESC VARCHAR(255) NOT NULL,
+        PRIMARY KEY(TRANSFER_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE STATUS
+(
+        STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_ID VARCHAR(255),
+        STATE VARCHAR(255),
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_TYPE VARCHAR(255),
+        PRIMARY KEY(STATUS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE CONFIG_DATA
+(
+        EXPERIMENT_ID VARCHAR(255),
+        AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
+        OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
+        SHARE_EXPERIMENT SMALLINT,
+        USER_DN VARCHAR(255),
+        GENERATE_CERT SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID)
+);
+
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        RESOURCE_HOST_ID VARCHAR(255),
+        CPU_COUNT INTEGER,
+        NODE_COUNT INTEGER,
+        NO_OF_THREADS INTEGER,
+        QUEUE_NAME VARCHAR(255),
+        WALLTIME_LIMIT INTEGER,
+        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        TOTAL_PHYSICAL_MEMORY INTEGER,
+        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+        CHESSIS_NAME VARCHAR(255),
+        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
+(
+       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       WORKING_DIR_PARENT VARCHAR(255),
+       UNIQUE_WORKING_DIR VARCHAR(255),
+       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+       CLEAN_AFTER_JOB SMALLINT,
+       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
+(
+       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       OUTPUT_DATA_DIR VARCHAR(255),
+       DATA_REG_URL VARCHAR (255),
+       PERSIST_OUTPUT_DATA SMALLINT,
+       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE QOS_PARAM
+(
+        QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        START_EXECUTION_AT VARCHAR(255),
+        EXECUTE_BEFORE VARCHAR(255),
+        NO_OF_RETRIES INTEGER,
+        PRIMARY KEY(QOS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMMUNITY_USER
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+        PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)
+);
+
+CREATE TABLE CREDENTIALS
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        CREDENTIAL BLOB NOT NULL,
+        PORTAL_USER_ID VARCHAR(256) NOT NULL,
+        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/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 cd2fc7a..9e92e32 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
@@ -54,7 +54,7 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_GATEWAY = "php_reference_gateway";
     private static Airavata.Client airavataClient;
 
-    private static String echoAppId = "Echo_54324c70-8e89-4bb6-b77f-b0b274c3a2ed";
+    private static String echoAppId = "Echo_066691af-2507-4bf1-905a-d6bb7a2d2bd1";
     private static String mpiAppId = "HelloMPI_bfd56d58-6085-4b7f-89fc-646576830518";
     private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
     private static String amberAppId = "Amber_cb54b269-cf79-4276-8dbb-2ec16b759cc6";
@@ -82,7 +82,7 @@ public class CreateLaunchExperiment {
         airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
         System.out.println("API version is " + airavataClient.getAPIVersion());
 //        registerApplications(); // run this only the first time
-//        createAndLaunchExp();
+        createAndLaunchExp();
     }
 
     private static String fsdResourceId;
@@ -160,9 +160,9 @@ public class CreateLaunchExperiment {
 //                final String expId = createExperimentForSSHHost(airavata);
 //                final String expId = createEchoExperimentForFSD(airavataClient);
 //                final String expId = createMPIExperimentForFSD(airavataClient);
-//               final String expId = createEchoExperimentForStampede(airavataClient);
+               final String expId = createEchoExperimentForStampede(airavataClient);
 //                final String expId = createEchoExperimentForTrestles(airavataClient);
-                final String expId = createExperimentEchoForLocalHost(airavataClient);
+//                final String expId = createExperimentEchoForLocalHost(airavataClient);
 //                final String expId = createExperimentWRFTrestles(airavataClient);
 //                final String expId = createExperimentForBR2(airavataClient);
 //                final String expId = createExperimentForBR2Amber(airavataClient);

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
index a466b9f..b3ebd16 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
@@ -143,6 +143,7 @@ public class RegisterSampleApplicationsUtils {
         input.setInputOrder(order);
         input.setIsRequired(isRequired);
         input.setRequiredToAddedToCommandLine(requiredToCMD);
+        input.setDataStaged(false);
         if (description != null) input.setUserFriendlyDescription(description);
         input.setStandardInput(stdIn);
         if (metadata != null) input.setMetaData(metadata);

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/modules/credential-store/credential-store-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/pom.xml b/modules/credential-store/credential-store-service/pom.xml
index 0c6c982..6b89984 100644
--- a/modules/credential-store/credential-store-service/pom.xml
+++ b/modules/credential-store/credential-store-service/pom.xml
@@ -63,11 +63,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
-        <!--<dependency>-->
-            <!--<groupId>mysql</groupId>-->
-            <!--<artifactId>mysql-connector-java</artifactId>-->
-            <!--<version>5.1.34</version>-->
-        <!--</dependency>-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.34</version>
+        </dependency>
         <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index e5fed60..8ed0642 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -38,13 +38,13 @@ import java.io.IOException;
 public class SSHCredentialTest {
 
     public static void main(String[] args) {
-        String jdbcURL = "jdbc:mysql://gw85.iu.xsede.org:3306/airavata_dev";
+        String jdbcURL = "jdbc:mysql://gw85.iu.xsede.org:3306/airavata_prod";
         String jdbcDriver = "com.mysql.jdbc.Driver";
-        String userName = "gtaDevUser";
-        String password = "gtaDevPWD";
-        String gatewayId = "sdsc";
-        String privateKeyPath = "/Users/chathuri/Desktop/ssh_gw111/id_rsa";
-        String pubKeyPath = "/Users/chathuri/Desktop/ssh_gw111/id_rsa.pub";
+        String userName = "gtaAiravataUser";
+        String password = "gtaAiravataPWD";
+        String gatewayId = "default";
+        String privateKeyPath = "/Users/chathuri/Desktop/ssh_gw127/id_rsa";
+        String pubKeyPath = "/Users/chathuri/Desktop/ssh_gw127/id_rsa.pub";
 
         try {
             DBUtil dbUtil = new DBUtil(jdbcURL, userName, password, jdbcDriver);
@@ -53,7 +53,7 @@ public class SSHCredentialTest {
             sshCredential.setGateway(gatewayId);
             String token = TokenGenerator.generateToken(gatewayId, null);
             sshCredential.setToken(token);
-            sshCredential.setPortalUserName("kenneth");
+            sshCredential.setPortalUserName("ogce");
             FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
             File filePri = new File(privateKeyPath);
             byte[] bFilePri = new byte[(int) filePri.length()];
@@ -66,7 +66,7 @@ public class SSHCredentialTest {
             pubKeyStream.close();
             sshCredential.setPrivateKey(bFilePri);
             sshCredential.setPublicKey(bFilePub);
-            sshCredential.setPassphrase("");
+            sshCredential.setPassphrase("ultrascan");
             writer.writeCredentials(sshCredential);
             System.out.println(token);
         } catch (ClassNotFoundException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index a9eaae2..02e70f9 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -50,6 +50,7 @@ import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
 import org.apache.airavata.gsi.ssh.impl.JobStatus;
 import org.apache.airavata.gsi.ssh.impl.RawCommandInfo;
 import org.apache.airavata.gsi.ssh.impl.StandardOutReader;
+import org.apache.airavata.gsi.ssh.util.CommonUtils;
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
 import org.apache.airavata.model.appcatalog.appinterface.DataType;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
@@ -162,8 +163,9 @@ public class SSHProvider extends AbstractProvider {
                     JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
                     jobDetails.setJobName(jobDescriptor.getJobName());
                     log.info(jobDescriptor.toXML());
-                    jobDetails.setJobDescription(jobDescriptor.toXML());
                     String jobID = cluster.submitBatchJob(jobDescriptor);
+                    String jobFileContent = CommonUtils.getJobFileContent(jobDescriptor, jobExecutionContext.getResourceJobManager().getResourceJobManagerType().toString());
+                    jobDetails.setJobDescription(jobFileContent);
                     if (jobID != null && !jobID.isEmpty()) {
                         jobDetails.setJobID(jobID);
                         GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED, monitorPublisher);

http://git-wip-us.apache.org/repos/asf/airavata/blob/29fa73a0/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
index c6cd5c8..3584038 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/CommonUtils.java
@@ -20,9 +20,20 @@
 */
 package org.apache.airavata.gsi.ssh.util;
 
+import org.apache.airavata.gsi.ssh.api.SSHApiException;
 import org.apache.airavata.gsi.ssh.api.job.*;
 import org.apache.airavata.gsi.ssh.impl.JobStatus;
 
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.StringWriter;
+import java.net.URL;
+
 public class CommonUtils {
     /**
      * This returns true if the give job is finished
@@ -78,4 +89,28 @@ public class CommonUtils {
     public static JobManagerConfiguration getLSFJobManager(String installedPath) {
         return new LSFJobConfiguration("LSFTemplate.xslt", ".lsf", installedPath, new LSFOutputParser());
     }
+
+    public static String getJobFileContent (JobDescriptor jobDescriptor, String jobManagerTemplate) throws Exception{
+        TransformerFactory factory = TransformerFactory.newInstance();
+        URL resource = CommonUtils.class.getClassLoader().getResource(jobManagerTemplate);
+
+        if (resource == null) {
+            String error = "System configuration file '" + jobManagerTemplate
+                    + "' not found in the classpath";
+            throw new SSHApiException(error);
+        }
+
+        Source xslt = new StreamSource(new File(resource.getPath()));
+        Transformer transformer;
+        StringWriter results = new StringWriter();
+            // generate the pbs script using xslt
+            transformer = factory.newTransformer(xslt);
+            Source text = new StreamSource(new ByteArrayInputStream(jobDescriptor.toXML().getBytes()));
+            transformer.transform(text, new StreamResult(results));
+            String scriptContent = results.toString().replaceAll("^[ |\t]*\n$", "");
+            if (scriptContent.startsWith("\n")) {
+                scriptContent = scriptContent.substring(1);
+            }
+            return scriptContent;
+    }
 }


Mime
View raw message