You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/04/08 04:32:00 UTC

[01/12] airavata git commit: Fixing rabbitmq reconnect issue

Repository: airavata
Updated Branches:
  refs/heads/emailMonitoring 9f1fa2d35 -> 95fae20b1


Fixing rabbitmq reconnect issue


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

Branch: refs/heads/emailMonitoring
Commit: a51a7ca2265bcc2e56de8868bd0291d4437e941a
Parents: 764a239
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Thu Apr 2 11:02:44 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Thu Apr 2 11:02:44 2015 -0400

----------------------------------------------------------------------
 .../AiravataExperimentStatusUpdator.java        | 16 +++++++++--
 .../client/samples/CreateLaunchExperiment.java  |  2 +-
 .../airavata/common/utils/ServerSettings.java   | 13 ++++++++-
 .../main/resources/airavata-server.properties   |  3 +-
 .../test/resources/airavata-server.properties   | 30 ++++++++++++--------
 .../airavata/gfac/server/GfacServerHandler.java |  9 +++---
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  6 ++--
 .../core/impl/RabbitMQTaskLaunchConsumer.java   | 21 ++++++++++++++
 .../core/impl/RabbitMQTaskLaunchPublisher.java  | 14 ++++-----
 .../cpi/impl/SimpleOrchestratorImpl.java        |  1 -
 10 files changed, 81 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
index aabba55..e7503e6 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
@@ -27,6 +27,7 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.*;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
 import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
 import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
@@ -128,9 +129,20 @@ public class AiravataExperimentStatusUpdator implements AbstractActivityListener
 		}
     }
 
-    private void cleanup(WorkflowNodeStatusChangeEvent nodeStatus, String experimentNode, String experimentPath) throws ApplicationSettingsException, KeeperException, InterruptedException, AiravataException {
+    private void cleanup(WorkflowNodeStatusChangeEvent nodeStatus, String experimentNode, String experimentPath) throws KeeperException, InterruptedException, AiravataException {
+        int count =0;
+        long deliveryTag = AiravataZKUtils.getDeliveryTag(nodeStatus.getWorkflowNodeIdentity().getExperimentId(), zk, experimentNode, ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME));
         if (ServerSettings.isGFacPassiveMode()) {
-            consumer.sendAck(AiravataZKUtils.getDeliveryTag(nodeStatus.getWorkflowNodeIdentity().getExperimentId(), zk, experimentNode, ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME)));
+            while(!consumer.isOpen() && count<3){
+                try {
+                    consumer.reconnect();
+                } catch (AiravataException e) {
+                    count++;
+                }
+            }
+            if(consumer.isOpen()){
+                consumer.sendAck(deliveryTag);
+            }
         }
         ZKUtil.deleteRecursive(zk, experimentPath + AiravataZKUtils.DELIVERY_TAG_POSTFIX);
         ZKUtil.deleteRecursive(zk, experimentPath);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/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 0652fbc..d173a0b 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
@@ -58,7 +58,7 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_GATEWAY = "php_reference_gateway";
     private static Airavata.Client airavataClient;
 
-    private static String echoAppId = "Echo_11afd5ec-e04e-45c9-843b-0c5b28a617f8";
+    private static String echoAppId = "Echo_fcac7076-e350-4dfb-a6eb-73e2d648fc60";
     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_aa083c86-4680-4002-b3ef-fad93c181926";

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
index 1c338d4..39da292 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
@@ -59,9 +59,11 @@ public class ServerSettings extends ApplicationSettings {
     public static final String JOB_NOTIFICATION_EMAILIDS = "job.notification.emailids";
     public static final String JOB_NOTIFICATION_FLAGS = "job.notification.flags";
     public static final String GFAC_PASSIVE = "gfac.passive"; // by default this is desabled
+    public static final String LAUNCH_QUEUE_NAME = "launch.queue.name";
+    public static final String CANCEL_QUEUE_NAME = "cancel.queue.name";
 
 
-//    Workflow Enactment Service component configuration.
+    //    Workflow Enactment Service component configuration.
     private static final String ENACTMENT_THREAD_POOL_SIZE = "enactment.thread.pool.size";
     private static final int DEFAULT_ENACTMENT_THREAD_POOL_SIZE = 10;
     private static final String WORKFLOW_PARSER = "workflow.parser";
@@ -73,6 +75,15 @@ public class ServerSettings extends ApplicationSettings {
         return getSetting(DEFAULT_USER);
     }
 
+    public static String getLaunchQueueName() {
+        return getSetting(LAUNCH_QUEUE_NAME, "launch.queue");
+    }
+
+
+    public static String getCancelQueueName() {
+        return getSetting(CANCEL_QUEUE_NAME, "cancel.queue");
+    }
+
     public static String getDefaultUserPassword() throws ApplicationSettingsException {
         return getSetting(DEFAULT_USER_PASSWORD);
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 7410d7f..0d6f4e4 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -227,7 +227,8 @@ task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunch
 rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
 rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
 durable.queue=false
-
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
 activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
 rabbitmq.exchange.name=airavata_rabbitmq_exchange
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties b/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
index b466d8b..f6c98db 100644
--- a/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
+++ b/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
@@ -31,10 +31,10 @@
 
 #for derby [AiravataJPARegistry]
 registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
 # MySql database configuration
 #registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+#registry.jdbc.url=jdbc:mysql://localhost:3306/experiment_catalog
 registry.jdbc.user=airavata
 registry.jdbc.password=airavata
 start.derby.server.mode=true
@@ -82,9 +82,9 @@ gfac.server.port=8950
 orchestrator.server.min.threads=50
 
 ###########################################################################
-#  Job Scheduler can send informative email messages to you about the status of your job.
+#  Job Scheduler can send informative email messages to you about the status of your job.  
 # Specify a string which consists of either the single character "n" (no mail), or one or more
-#  of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
+#  of the characters "a" (send mail when job is aborted), "b" (send mail when job begins), 
 # and "e" (send mail when job terminates).  The default is "a" if not specified.
 ###########################################################################
 
@@ -100,7 +100,7 @@ start.credential.store=false
 credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
 credential.store.keystore.alias=airavata
 credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
 credential.store.jdbc.user=airavata
 credential.store.jdbc.password=airavata
 credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
@@ -137,7 +137,7 @@ myproxy.password=
 myproxy.life=3600
 # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
 trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
-gfac.passive=true
+gfac.passive=false
 # SSH PKI key pair or ssh password can be used SSH based authentication is used.
 # if user specify both password authentication gets the higher preference
 
@@ -146,7 +146,7 @@ gfac.passive=true
 #private.ssh.key=/path to private key file for ssh
 #ssh.keypass=passphrase for the private key
 #ssh.username=username for ssh connection
-### Incase of password authentication.
+### Incase of password authentication. 
 #ssh.password=Password for ssh connection
 
 
@@ -216,20 +216,26 @@ connection.name=xsede
 #publisher
 activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator,org.apache.airavata.workflow.engine.util.ProxyMonitorPublisher
 publish.rabbitmq=false
+
+rabbitmq.broker.url=amqp://localhost:5672
+
 status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
 task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
-rabbitmq.broker.url=amqp://localhost:5672
 rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
 rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
-
+durable.queue=false
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
 
 ###########################################################################
 # Orchestrator module Configuration
 ###########################################################################
 
 #job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
-job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
-#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
+job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
 job.validators=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
 submitter.interval=10000
 threadpool.size=10
@@ -251,4 +257,4 @@ gfac-server=/gfac-server
 gfac-experiments=/gfac-experiments
 gfac-server-name=gfac-node0
 orchestrator-server-name=orch-node0
-airavata-server-name=api-node0
+airavata-server-name=api-node0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index f2c5075..c8fc3fb 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.server;
 
 import com.google.common.eventbus.EventBus;
+import edu.uiuc.ncsa.security.delegation.services.Server;
 import org.airavata.appcatalog.cpi.AppCatalog;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.aiaravata.application.catalog.data.impl.AppCatalogFactory;
@@ -306,8 +307,6 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
     }
 
     private class TaskLaunchMessageHandler implements MessageHandler {
-        public static final String LAUNCH_TASK = "launch.task";
-        public static final String TERMINATE_TASK = "teminate.task";
         private String experimentNode;
         private String nodeName;
 
@@ -319,10 +318,10 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
         public Map<String, Object> getProperties() {
             Map<String, Object> props = new HashMap<String, Object>();
             ArrayList<String> keys = new ArrayList<String>();
-            keys.add(LAUNCH_TASK);
-            keys.add(TERMINATE_TASK);
+            keys.add(ServerSettings.getLaunchQueueName());
+            keys.add(ServerSettings.getCancelQueueName());
             props.put(MessagingConstants.RABBIT_ROUTING_KEY, keys);
-            props.put(MessagingConstants.RABBIT_QUEUE, LAUNCH_TASK);
+            props.put(MessagingConstants.RABBIT_QUEUE, ServerSettings.getLaunchQueueName());
             return props;
         }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/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 8d09a09..3fa7237 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
@@ -115,10 +115,8 @@ public class BetterGfacImpl implements GFac,Watcher {
     public static void startStatusUpdators(Registry registry, ZooKeeper zk, MonitorPublisher publisher,RabbitMQTaskLaunchConsumer rabbitMQTaskLaunchConsumer) {
         try {
             String[] listenerClassList = ServerSettings.getActivityListeners();
-            Publisher rabbitMQPublisher = null;
-            if (ServerSettings.isRabbitMqPublishEnabled()){
-                rabbitMQPublisher = PublisherFactory.createActivityPublisher();
-            }
+            Publisher rabbitMQPublisher = PublisherFactory.createActivityPublisher();
+
             for (String listenerClass : listenerClassList) {
                 Class<? extends AbstractActivityListener> aClass = Class.forName(listenerClass).asSubclass(AbstractActivityListener.class);
                 AbstractActivityListener abstractActivityListener = aClass.newInstance();

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
index 52cf7e0..0cd1042 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchConsumer.java
@@ -52,6 +52,8 @@ public class RabbitMQTaskLaunchConsumer {
     private Channel channel;
     private Map<String, QueueDetails> queueDetailsMap = new HashMap<String, QueueDetails>();
     private boolean durableQueue;
+    private MessageHandler messageHandler;
+
 
     public RabbitMQTaskLaunchConsumer() throws AiravataException {
         try {
@@ -94,8 +96,21 @@ public class RabbitMQTaskLaunchConsumer {
         }
     }
 
+    public void reconnect() throws AiravataException{
+        if(messageHandler!=null) {
+            try {
+                listen(messageHandler);
+            } catch (AiravataException e) {
+                String msg = "could not open channel for exchange " + taskLaunchExchangeName;
+                log.error(msg);
+                throw new AiravataException(msg, e);
+
+            }
+        }
+    }
     public String listen(final MessageHandler handler) throws AiravataException {
         try {
+            messageHandler = handler;
             Map<String, Object> props = handler.getProperties();
             final Object routing = props.get(MessagingConstants.RABBIT_ROUTING_KEY);
             if (routing == null) {
@@ -245,6 +260,12 @@ public class RabbitMQTaskLaunchConsumer {
             }
         }
     }
+    public boolean isOpen(){
+        if(connection!=null){
+            return connection.isOpen();
+        }
+        return false;
+    }
 
     public void sendAck(long deliveryTag){
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchPublisher.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchPublisher.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchPublisher.java
index 3d8a377..919087e 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchPublisher.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQTaskLaunchPublisher.java
@@ -20,7 +20,6 @@
 */
 package org.apache.airavata.messaging.core.impl;
 
-import com.rabbitmq.client.MessageProperties;
 import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
@@ -29,23 +28,24 @@ import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.MessagingConstants;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.model.messaging.event.*;
+import org.apache.catalina.Server;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class RabbitMQTaskLaunchPublisher implements Publisher{
     private final static Logger log = LoggerFactory.getLogger(RabbitMQTaskLaunchPublisher.class);
-    public static final String LAUNCH_TASK = "launch.task";
-    public static final String TERMINATE_TASK = "teminate.task";
+    private  String launchTask;
+    private  String cancelTask;
 
     private RabbitMQProducer rabbitMQProducer;
 
     public RabbitMQTaskLaunchPublisher() throws Exception {
         String brokerUrl;
-        String exchangeName;
         try {
             brokerUrl = ServerSettings.getSetting(MessagingConstants.RABBITMQ_BROKER_URL);
-            exchangeName = ServerSettings.getSetting(MessagingConstants.RABBITMQ_TASK_LAUNCH_EXCHANGE_NAME);
+            launchTask = ServerSettings.getLaunchQueueName();
+            cancelTask = ServerSettings.getCancelQueueName();
         } catch (ApplicationSettingsException e) {
             String message = "Failed to get read the required properties from airavata to initialize rabbitmq";
             log.error(message, e);
@@ -66,9 +66,9 @@ public class RabbitMQTaskLaunchPublisher implements Publisher{
             message.setUpdatedTime(msgCtx.getUpdatedTime().getTime());
             String routingKey = null;
             if (msgCtx.getType().equals(MessageType.LAUNCHTASK)){
-                routingKey = LAUNCH_TASK;
+                routingKey = launchTask;
             }else if(msgCtx.getType().equals(MessageType.TERMINATETASK)){
-                routingKey = TERMINATE_TASK;
+                routingKey = cancelTask;
             }
             byte[] messageBody = ThriftUtils.serializeThriftObject(message);
             rabbitMQProducer.sendToWorkerQueue(messageBody, routingKey);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a51a7ca2/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 0a2b5a3..3c7c294 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -76,7 +76,6 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
         } catch (Exception e) {
             throw new OrchestratorException("Error launching the job", e);
         }
-
     }
 
     /**


[08/12] airavata git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata

Posted by sh...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata


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

Branch: refs/heads/emailMonitoring
Commit: 97bd7a77aff6fb4f8ca56671be8fd3bb0becaa0a
Parents: 526aa77 7515c46
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Mon Apr 6 22:40:16 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Mon Apr 6 22:40:16 2015 -0400

----------------------------------------------------------------------
 .../airavata-cpp-sdk/pom.xml                    |   3 -
 .../airavata-php-sdk/pom.xml                    |   3 -
 .../airavata-python-sdk/pom.xml                 |   3 -
 modules/commons/utils/pom.xml                   |   6 +-
 modules/distribution/client/java/pom.xml        | 236 +------------------
 modules/distribution/release/pom.xml            |   3 -
 modules/distribution/server/pom.xml             |  22 +-
 modules/distribution/xbaya-gui/pom.xml          |  18 --
 modules/integration-tests/pom.xml               |  13 -
 modules/messaging/client/pom.xml                |   9 -
 modules/orchestrator/orchestrator-core/pom.xml  |  19 --
 modules/workflow-model/workflow-engine/pom.xml  |   5 -
 modules/xbaya-gui/pom.xml                       |  32 ---
 pom.xml                                         |  78 ++----
 samples/java-client/experiment/pom.xml          |  72 +-----
 tools/gsissh-cli-tools/pom.xml                  |  56 -----
 tools/gsissh/pom.xml                            |   8 -
 17 files changed, 28 insertions(+), 558 deletions(-)
----------------------------------------------------------------------



[12/12] airavata git commit: Merge branch 'master' into emailMonitoring

Posted by sh...@apache.org.
Merge branch 'master' into emailMonitoring


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

Branch: refs/heads/emailMonitoring
Commit: 95fae20b18f562c2d0bed46e58924516c3eccd67
Parents: 9f1fa2d 2265395
Author: shamrath <sh...@gmail.com>
Authored: Tue Apr 7 22:31:55 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Tue Apr 7 22:31:55 2015 -0400

----------------------------------------------------------------------
 .../AiravataExperimentStatusUpdator.java        |  16 +-
 .../airavata-cpp-sdk/pom.xml                    |   3 -
 .../airavata-php-sdk/pom.xml                    |   3 -
 .../airavata-python-sdk/pom.xml                 |   3 -
 .../client/samples/CreateLaunchExperiment.java  |   2 +-
 .../data/impl/ApplicationDeploymentImpl.java    |   5 +-
 modules/commons/utils/pom.xml                   |   6 +-
 .../airavata/common/utils/ServerSettings.java   |  13 +-
 .../main/resources/airavata-server.properties   |   3 +-
 .../test/resources/airavata-server.properties   |  30 +-
 modules/distribution/client/java/pom.xml        | 236 +-----------
 modules/distribution/release/pom.xml            |   3 -
 modules/distribution/server/pom.xml             |  22 +-
 modules/distribution/xbaya-gui/pom.xml          |  18 -
 .../airavata/gfac/server/GfacServerHandler.java |  24 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |   6 +-
 .../gfac/core/utils/GFacThreadPoolExecutor.java |   2 +
 .../airavata/gfac/core/utils/GFacUtils.java     |   9 +-
 .../gfac/core/utils/InputHandlerWorker.java     |   4 +-
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |   2 +-
 modules/integration-tests/pom.xml               |  13 -
 modules/messaging/client/pom.xml                |   9 -
 .../core/impl/RabbitMQTaskLaunchConsumer.java   |  21 +
 .../core/impl/RabbitMQTaskLaunchPublisher.java  |  14 +-
 modules/orchestrator/orchestrator-core/pom.xml  |  19 -
 .../cpi/impl/SimpleOrchestratorImpl.java        |   1 -
 .../test-suite/multi-tenanted-airavata/README   |  59 +++
 .../ApplicationRegister.java                    |  56 +--
 .../ComputeResourceRegister.java                |  50 ++-
 .../ExperimentExecution.java                    | 381 ++++++++++++-------
 .../FrameworkBootstrapping.java                 | 106 +++++-
 .../multitenantedairavata/FrameworkSetup.java   |  10 +
 .../multitenantedairavata/GatewayRegister.java  |  55 +--
 .../multitenantedairavata/LoadTester.java       |  50 ---
 .../utils/TestFrameworkConstants.java           |  10 +-
 .../main/resources/airavata-client.properties   |   4 +-
 .../main/resources/test-framework.properties    |  18 +-
 modules/workflow-model/workflow-engine/pom.xml  |   5 -
 modules/xbaya-gui/pom.xml                       |  32 --
 pom.xml                                         |  78 +---
 samples/java-client/experiment/pom.xml          |  72 +---
 tools/gsissh-cli-tools/pom.xml                  |  56 ---
 tools/gsissh/pom.xml                            |   8 -
 43 files changed, 645 insertions(+), 892 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/95fae20b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/95fae20b/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------


[02/12] airavata git commit: removing unnessaray fture list

Posted by sh...@apache.org.
removing unnessaray fture list


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

Branch: refs/heads/emailMonitoring
Commit: 8feb5d0da418943ae62fa070c47805da49fe9702
Parents: a51a7ca
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Fri Apr 3 12:51:32 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Fri Apr 3 12:51:32 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/server/GfacServerHandler.java      | 15 +++++++++------
 .../gfac/core/utils/GFacThreadPoolExecutor.java      |  2 ++
 .../airavata/gfac/core/utils/InputHandlerWorker.java |  4 +++-
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java      |  2 +-
 4 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index c8fc3fb..7d5e223 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -60,6 +60,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.*;
 import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.locks.Lock;
 
@@ -92,8 +93,6 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
 
     private String airavataServerHostPort;
 
-    private List<Future> inHandlerFutures;
-
 
     private BlockingQueue<TaskSubmitEvent> taskSubmitEvents;
 
@@ -123,8 +122,6 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
                 rabbitMQTaskLaunchConsumer.listen(new TaskLaunchMessageHandler());
             }
             BetterGfacImpl.startStatusUpdators(registry, zk, publisher, rabbitMQTaskLaunchConsumer);
-            inHandlerFutures = new ArrayList<Future>();
-
         } catch (ApplicationSettingsException e) {
             logger.error("Error initialising GFAC", e);
             throw new Exception("Error initialising GFAC", e);
@@ -245,9 +242,15 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
         InputHandlerWorker inputHandlerWorker = new InputHandlerWorker(gfac, experimentId, taskId, gatewayId);
 //        try {
 //            if( gfac.submitJob(experimentId, taskId, gatewayId)){
-        logger.debugId(experimentId, "Submitted jog to the Gfac Implementation, experiment {}, task {}, gateway " +
+        logger.debugId(experimentId, "Submitted job to the Gfac Implementation, experiment {}, task {}, gateway " +
                 "{}", experimentId, taskId, gatewayId);
-        inHandlerFutures.add(GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker));
+        try {
+            GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker).get();
+        } catch (InterruptedException e) {
+            logger.error(e.getMessage(), e);
+        } catch (ExecutionException e) {
+            logger.error(e.getMessage(), e);
+        }
         // we immediately return when we have a threadpool
         return true;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
index b1f0572..7853513 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
@@ -51,4 +51,6 @@ public class GFacThreadPoolExecutor {
         }
         return threadPool;
     }
+
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
index efa7c0c..963db7c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
@@ -46,6 +46,8 @@ public class InputHandlerWorker implements Callable {
 
     @Override
     public Object call() throws Exception {
-        return gfac.submitJob(experimentId,taskId,gatewayId);
+        boolean b = gfac.submitJob(experimentId, taskId, gatewayId);
+        log.info("InHandler and provider Gfac invocation returned: " + b);
+        return b;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
index a416dbd..f09a662 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
@@ -93,7 +93,7 @@ public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication {
                 try {
                     gssCredentials = getDefaultCredentials();
                 } catch (Exception e) {
-                    throw new SecurityException("Error retrieving my proxy using username password");
+                    throw new SecurityException("Error retrieving my proxy using username password",e.getCause());
                 }
             }
             // if still null, throw an exception


[10/12] airavata git commit: completing initial test framework - AIRAVATA-1652

Posted by sh...@apache.org.
completing initial test framework - AIRAVATA-1652


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

Branch: refs/heads/emailMonitoring
Commit: 16700506e7d183808ac8365adb35e660b772fe93
Parents: 05bb24d
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Apr 7 15:10:03 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Apr 7 15:10:03 2015 -0400

----------------------------------------------------------------------
 .../test-suite/multi-tenanted-airavata/README   | 59 ++++++++++++++++++++
 .../ExperimentExecution.java                    | 42 +++++++-------
 .../FrameworkBootstrapping.java                 |  6 +-
 .../multitenantedairavata/GatewayRegister.java  |  1 -
 4 files changed, 80 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/16700506/modules/test-suite/multi-tenanted-airavata/README
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/README b/modules/test-suite/multi-tenanted-airavata/README
new file mode 100644
index 0000000..da5abd2
--- /dev/null
+++ b/modules/test-suite/multi-tenanted-airavata/README
@@ -0,0 +1,59 @@
+PRE_REQUISITES
+============================
+
+1. Set up new airavata instance with mysql database
+2. Update credential store settings according to mysql database
+
+ASSUMPTIONS
+==============================
+1. We assume airavata has a default gateway setup with "php-reference-gateway"
+2. Only Amber and Echo applications will be created for trestles, stampede and Bigred2
+
+
+How to build
+=============================
+1. Go to <airavata-source>/modules/test-suite/multi-tenanted-airavata and uncomment the mysql dependency from the pom.
+2. Run mvn clean install
+3. Once the build completes, there will be a jar called "multi-tenanted-airavata-0.15-SNAPSHOT-jar-with-dependencies.jar" inside target directory
+
+
+How to run
+========================
+
+1. Copy multi-tenanted-airavata-0.15-SNAPSHOT-jar-with-dependencies.jar to a location
+2. Create a folder called "resources" in the same location and copy airavata-client.properties and test-framework.properties.
+3. Update the options in the properties file
+    In airavata-client.properties
+        * thrift.server.host
+        * thrift.server.port
+        * credential.store.keystore.url
+        * credential.store.keystore.alias
+        * credential.store.keystore.password
+        * credential.store.jdbc.url
+        * credential.store.jdbc.user
+        * credential.store.jdbc.password
+        * credential.store.jdbc.driver
+        * rabbitmq.exchange.name
+        * rabbitmq.broker.url
+
+    In test-framework.properties
+        * ssh.pub.key.location
+        * ssh.private.key.location
+        * ssh.password
+        * ssh.username
+        * token.file.location
+        * result.file.location
+        * Amber input file locations (02_Heat.rst_location, 03_Prod.in_location, prmtop_location)
+3. To run the jar, in the command line type :
+        java -Xmx1024m -jar multi-tenanted-airavata-0.15-SNAPSHOT-jar-with-dependencies.jar -regApps
+
+        You can provide different parameters.
+            -regApps = to register gateways, generate SSH keys, register applications
+            -expExec = to create Amber and Echo experiments, launch them and monitor
+            -runAll = to do above two options together
+
+4. Monitor results will be written in to the location you specified in "result.file.location" with name of the current timestamp
+
+
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/16700506/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index 1f71908..a12af50 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -314,18 +314,17 @@ public class ExperimentExecution {
                                     experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
                                     experimentsWithTokens.put(experimentId, token);
                                     experimentsWithGateway.put(experimentId, gatewayId);
+                                } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
+                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
+                                    userConfigurationData.setAiravataAutoSchedule(false);
+                                    userConfigurationData.setOverrideManualScheduledParams(false);
+                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+                                    experimentsWithTokens.put(experimentId, token);
+                                    experimentsWithGateway.put(experimentId, gatewayId);
                                 }
-//                                else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
-//                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-//                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-//                                    userConfigurationData.setAiravataAutoSchedule(false);
-//                                    userConfigurationData.setOverrideManualScheduledParams(false);
-//                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-//                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-//                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-//                                    experimentsWithTokens.put(experimentId, token);
-//                                    experimentsWithGateway.put(experimentId, gatewayId);
-//                                }
                             }
                         }
                     }
@@ -387,18 +386,17 @@ public class ExperimentExecution {
                                         experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
                                         experimentsWithTokens.put(experimentId, token);
                                         experimentsWithGateway.put(experimentId, gatewayId);
+                                    }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
                                     }
-//                                    else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
-//                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-//                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
-//                                        userConfigurationData.setAiravataAutoSchedule(false);
-//                                        userConfigurationData.setOverrideManualScheduledParams(false);
-//                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
-//                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
-//                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-//                                        experimentsWithTokens.put(experimentId, token);
-//                                        experimentsWithGateway.put(experimentId, gatewayId);
-//                                    }
                                 }
                             }
                         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/16700506/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
index cff569a..1c03d8e 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
@@ -79,10 +79,6 @@ public class FrameworkBootstrapping {
                 experimentExecution.createAmberExperiment();
                 experimentExecution.launchExperiments();
                 experimentExecution.monitorExperiments();
-//                PrintWriter resultWriter = experimentExecution.getResultWriter();
-//                resultWriter.println("End of test framework results");
-//                resultWriter.println("======================================");
-//                resultWriter.flush();
             }
         } catch (Exception e) {
             logger.error("Error occured while set up", e);
@@ -118,7 +114,7 @@ public class FrameworkBootstrapping {
 
             options.addOption("regApps", false , "Gateway ID");
             options.addOption("expExec", false, "Experiment ID");
-            options.addOption("a", false, "Do application registration and experiment execution together");
+            options.addOption("runAll", false, "Do application registration and experiment execution together");
 
             CommandLineParser parser = new PosixParser();
             CommandLine cmd = parser.parse( options, args);

http://git-wip-us.apache.org/repos/asf/airavata/blob/16700506/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
index a3a1f2e..0059e27 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
@@ -66,7 +66,6 @@ public class GatewayRegister {
             logger.error("Error while initializing setup step", e);
             throw new Exception("Error while initializing setup step", e);
         }
-
     }
 
     public void createGateways() throws Exception{


[04/12] airavata git commit: passing options as arguments AIRAVATA-1652

Posted by sh...@apache.org.
passing options as arguments AIRAVATA-1652


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

Branch: refs/heads/emailMonitoring
Commit: d61d33ee47e6a687cc754101630828ccd899992e
Parents: 4d478d8
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Apr 3 16:36:21 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Apr 3 16:36:21 2015 -0400

----------------------------------------------------------------------
 .../ApplicationRegister.java                    |   8 +-
 .../ExperimentExecution.java                    | 108 +++++++++++--------
 .../FrameworkBootstrapping.java                 | 106 ++++++++++++++++--
 .../multitenantedairavata/FrameworkSetup.java   |  10 ++
 .../multitenantedairavata/GatewayRegister.java  |  12 ++-
 .../multitenantedairavata/LoadTester.java       |  50 ---------
 .../utils/TestFrameworkConstants.java           |   6 +-
 7 files changed, 192 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
index d73ccba..6681219 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
@@ -97,10 +97,10 @@ public class ApplicationRegister {
             // add amber deployment
             List<String> moduleLoadCMDs = new ArrayList<String>();
             moduleLoadCMDs.add("module load amber");
-            String amberStampedeAppDeployId = airavata.registerApplicationDeployment(gateway.getGatewayId(),
-                    createApplicationDeployment(amberModuleId, stampedeResourceId,
-                            "/opt/apps/intel13/mvapich2_1_9/amber/12.0/bin/sander.MPI -O", ApplicationParallelismType.MPI,
-                            TestFrameworkConstants.AppcatalogConstants.AMBER_DESCRIPTION, moduleLoadCMDs, null, null));
+            ApplicationDeploymentDescription amberStampedeDeployment = createApplicationDeployment(amberModuleId, stampedeResourceId,
+                    "/opt/apps/intel13/mvapich2_1_9/amber/12.0/bin/sander.MPI -O", ApplicationParallelismType.MPI,
+                    TestFrameworkConstants.AppcatalogConstants.AMBER_DESCRIPTION, moduleLoadCMDs, null, null);
+            String amberStampedeAppDeployId = airavata.registerApplicationDeployment(gateway.getGatewayId(),amberStampedeDeployment);
 
             String amberTrestlesAppDeployId = airavata.registerApplicationDeployment(gateway.getGatewayId(),
                     createApplicationDeployment(amberModuleId, trestlesResourceId,

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index 7a79735..08ae052 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -27,13 +27,16 @@ import org.apache.airavata.messaging.core.MessageContext;
 import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.messaging.core.MessagingConstants;
 import org.apache.airavata.messaging.core.impl.RabbitMQStatusConsumer;
-import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.error.AiravataClientException;
+import org.apache.airavata.model.error.AiravataSystemException;
+import org.apache.airavata.model.error.InvalidRequestException;
 import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.MessageType;
 import org.apache.airavata.model.util.ExperimentModelUtil;
+import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.model.workspace.experiment.ExperimentState;
@@ -57,23 +60,64 @@ public class ExperimentExecution {
     private Map<String, String> experimentsWithTokens;
     private Map<String, String> experimentsWithGateway;
     private Map<String, String> csTokens;
-    private Map<String, String> appInterfaceMap;
-    private Map<String, String> projectsMap;
+    private Map<String, Map<String, String>> appInterfaceMap;
+    private Map<String, List<Project>> projectsMap;
     private PropertyReader propertyReader;
 
     public ExperimentExecution(Airavata.Client airavata,
-                               Map<String, String> tokenMap,
-                               Map<String, String> appInterfaces,
-                               Map<String, String> projectMap ) {
+                               Map<String, String> tokenMap ) {
         this.airavata = airavata;
         this.csTokens = tokenMap;
-        this.appInterfaceMap = appInterfaces;
+        this.appInterfaceMap = getApplicationMap(tokenMap);
         this.propertyReader = new PropertyReader();
-        this.projectsMap = projectMap;
+        this.projectsMap = getProjects(tokenMap);
         this.experimentsWithTokens = new HashMap<String, String>();
         this.experimentsWithGateway = new HashMap<String, String>();
     }
 
+    protected Map<String, Map<String, String>> getApplicationMap (Map<String, String> tokenMap){
+        appInterfaceMap = new HashMap<String, Map<String, String>>();
+        try {
+            if (tokenMap != null && !tokenMap.isEmpty()){
+                for (String gatewayId : tokenMap.keySet()){
+                    Map<String, String> allApplicationInterfaceNames = airavata.getAllApplicationInterfaceNames(gatewayId);
+                    appInterfaceMap.put(gatewayId, allApplicationInterfaceNames);
+                }
+            }
+        } catch (AiravataSystemException e) {
+            e.printStackTrace();
+        } catch (InvalidRequestException e) {
+            e.printStackTrace();
+        } catch (AiravataClientException e) {
+            e.printStackTrace();
+        } catch (TException e) {
+            e.printStackTrace();
+        }
+        return appInterfaceMap;
+    }
+
+    protected Map<String, List<Project>> getProjects (Map<String, String> tokenMap){
+        projectsMap = new HashMap<String, List<Project>>();
+        try {
+            if (tokenMap != null && !tokenMap.isEmpty()){
+                for (String gatewayId : tokenMap.keySet()){
+                    String userName = "testUser_" + gatewayId;
+                    List<Project> allUserProjects = airavata.getAllUserProjects(gatewayId, userName);
+                    projectsMap.put(gatewayId, allUserProjects);
+                }
+            }
+        } catch (AiravataSystemException e) {
+            e.printStackTrace();
+        } catch (InvalidRequestException e) {
+            e.printStackTrace();
+        } catch (AiravataClientException e) {
+            e.printStackTrace();
+        } catch (TException e) {
+            e.printStackTrace();
+        }
+        return projectsMap;
+    }
+
     public void launchExperiments () throws Exception {
         try {
             for (String expId : experimentsWithTokens.keySet()){
@@ -155,7 +199,7 @@ public class ExperimentExecution {
         try {
             for (String gatewayId : csTokens.keySet()){
                 String token = csTokens.get(gatewayId);
-                Map<String, String> appsWithNames = generateAppsPerGateway(gatewayId);
+                Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
                 for (String appId : appsWithNames.keySet()){
                     List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
                     List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
@@ -175,9 +219,13 @@ public class ExperimentExecution {
                             }
                         }
 
-                        String projectId = getProjectIdForGateway(gatewayId);
+                        List<Project> projectsPerGateway = projectsMap.get(gatewayId);
+                        String projectID = null;
+                        if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
+                            projectID = projectsPerGateway.get(0).getProjectID();
+                        }
                         Experiment simpleExperiment =
-                                ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "Amber Experiment", "Amber Experiment run", appId, applicationInputs);
+                                ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Amber Experiment", "Amber Experiment run", appId, applicationInputs);
                         simpleExperiment.setExperimentOutputs(appOutputs);
                         String experimentId;
                         Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
@@ -226,39 +274,11 @@ public class ExperimentExecution {
         }
     }
 
-    public String getProjectIdForGateway (String gatewayId){
-        for (String projectId : projectsMap.keySet()){
-            String gateway = projectsMap.get(projectId);
-            if (gateway.equals(gatewayId)){
-                return projectId;
-            }
-        }
-        return null;
-    }
-
-    public Map<String, String> generateAppsPerGateway (String gatewayId) throws Exception {
-        Map<String, String> appWithNames = new HashMap<String, String>();
-        try {
-            for (String appId : appInterfaceMap.keySet()){
-                String gateway = appInterfaceMap.get(appId);
-                ApplicationInterfaceDescription applicationInterface = airavata.getApplicationInterface(appId);
-                if (gateway.equals(gatewayId)){
-                    appWithNames.put(appId, applicationInterface.getApplicationName());
-                }
-            }
-        }catch (Exception e){
-            logger.error("Error while getting application interface", e);
-            throw new Exception("Error while getting application interface", e);
-        }
-
-        return appWithNames;
-    }
-
     public void createEchoExperiment () throws Exception{
         try {
             for (String gatewayId : csTokens.keySet()) {
                 String token = csTokens.get(gatewayId);
-                Map<String, String> appsWithNames = generateAppsPerGateway(gatewayId);
+                Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
                 for (String appId : appsWithNames.keySet()) {
                     List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
                     List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
@@ -270,9 +290,13 @@ public class ExperimentExecution {
                             }
                         }
 
-                        String projectId = getProjectIdForGateway(gatewayId);
+                        List<Project> projectsPerGateway = projectsMap.get(gatewayId);
+                        String projectID = null;
+                        if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
+                            projectID = projectsPerGateway.get(0).getProjectID();
+                        }
                         Experiment simpleExperiment =
-                                ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "Echo Experiment", "Echo Experiment run", appId, applicationInputs);
+                                ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Echo Experiment", "Echo Experiment run", appId, applicationInputs);
                         simpleExperiment.setExperimentOutputs(appOutputs);
                         String experimentId;
                         Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
index 22a1608..61e0101 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
@@ -21,24 +21,118 @@
 
 package org.apache.airavata.testsuite.multitenantedairavata;
 
+import org.apache.airavata.testsuite.multitenantedairavata.utils.PropertyFileType;
+import org.apache.airavata.testsuite.multitenantedairavata.utils.PropertyReader;
+import org.apache.airavata.testsuite.multitenantedairavata.utils.TestFrameworkConstants;
+import org.apache.commons.cli.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
 public class FrameworkBootstrapping {
     private final static Logger logger = LoggerFactory.getLogger(FrameworkBootstrapping.class);
+    private static boolean runAll = false;
+    private static boolean regApps = false;
+    private static boolean expExec = false;
+    private static PropertyReader propertyReader;
+    private static Map<String, String> tokens;
+    private static ExperimentExecution experimentExecution;
 
     public static void main(String[] args) {
+        parseArguments(args);
         try {
             FrameworkSetup setup = FrameworkSetup.getInstance();
-            setup.getGatewayRegister().createGateways();
-            logger.info("Gateways created...");
-            setup.getGatewayRegister().registerSSHKeys();
-            logger.info("Registered SSH keys to each gateway...");
-            setup.getApplicationRegister().addApplications();
-            logger.info("Applications registered for each each gateway...");
+            propertyReader = new PropertyReader();
+
+            if (runAll){
+                setup.getGatewayRegister().createGateways();
+                logger.info("Gateways created...");
+                setup.getGatewayRegister().registerSSHKeys();
+                logger.info("Registered SSH keys to each gateway...");
+                tokens = readTokens();
+                setup.getApplicationRegister().addApplications();
+                logger.info("Applications registered for each each gateway...");
+                experimentExecution = new ExperimentExecution(setup.getAiravata(), tokens);
+                experimentExecution.createEchoExperiment();
+                experimentExecution.createAmberExperiment();
+                experimentExecution.launchExperiments();
+                experimentExecution.monitorExperiments();
+            }else if (regApps){
+                setup.getGatewayRegister().createGateways();
+                logger.info("Gateways created...");
+                setup.getGatewayRegister().registerSSHKeys();
+                logger.info("Registered SSH keys to each gateway...");
+                tokens = readTokens();
+                setup.getComputeResourceRegister().addComputeResources();
+                setup.getApplicationRegister().addApplications();
+                logger.info("Applications registered for each each gateway...");
+            }else if (expExec){
+                tokens = readTokens();
+                experimentExecution = new ExperimentExecution(setup.getAiravata(), tokens);
+                experimentExecution.createEchoExperiment();
+                experimentExecution.createAmberExperiment();
+                experimentExecution.launchExperiments();
+                experimentExecution.monitorExperiments();
+            }
         } catch (Exception e) {
             logger.error("Error occured while set up", e);
         }
+    }
+
+    public static Map<String, String> readTokens () throws Exception{
+        Map<String, String> tokens = new HashMap<String, String>();
+        String fileLocation = propertyReader.readProperty(TestFrameworkConstants.FrameworkPropertiesConstants.TOKEN_WRITE_LOCATION, PropertyFileType.TEST_FRAMEWORK);
+        String fileName = TestFrameworkConstants.CredentialStoreConstants.TOKEN_FILE_NAME;
+        String path = fileLocation + File.separator + fileName;
+        File tokenFile = new File(path);
+        if (tokenFile.exists()){
+            FileInputStream fis = new FileInputStream(tokenFile);
+            //Construct BufferedReader from InputStreamReader
+            BufferedReader br = new BufferedReader(new InputStreamReader(fis));
+
+            String line;
+            while ((line = br.readLine()) != null) {
+                String[] strings = line.split(":");
+                tokens.put(strings[0], strings[1]);
+            }
+            br.close();
+        }else {
+            throw new Exception("Could not find token file.. Please run application registration step if you haven't run it");
+        }
+        return tokens;
+    }
+
+    public static void parseArguments(String[] args) {
+        try{
+            Options options = new Options();
 
+            options.addOption("regApps", false , "Gateway ID");
+            options.addOption("expExec", false, "Experiment ID");
+            options.addOption("a", false, "Do application registration and experiment execution together");
+
+            CommandLineParser parser = new PosixParser();
+            CommandLine cmd = parser.parse( options, args);
+            if (cmd.getOptions() == null || cmd.getOptions().length == 0){
+                logger.info("You have not specified any options. We assume you need to start from the scratch...");
+                runAll= true;
+            }
+            if (cmd.hasOption("regApps")){
+                logger.info("Register Applications only...");
+                regApps = true;
+            }else if (cmd.hasOption("expExec")){
+                logger.info("Execute Experiments only...");
+                expExec = true;
+            }else {
+                runAll = true;
+            }
+        } catch (ParseException e) {
+            logger.error("Error while reading command line parameters" , e);
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkSetup.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkSetup.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkSetup.java
index d0666e4..306a601 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkSetup.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkSetup.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
 public class FrameworkSetup {
     private static FrameworkSetup instance = new FrameworkSetup();
     private GatewayRegister gatewayRegister;
+    private ComputeResourceRegister computeResourceRegister;
     private ApplicationRegister applicationRegister;
     private Airavata.Client airavata;
     private final static Logger logger = LoggerFactory.getLogger(FrameworkSetup.class);
@@ -42,6 +43,7 @@ public class FrameworkSetup {
             this.airavata = airavataClient.getAiravataClient();
             gatewayRegister = new GatewayRegister(airavata);
             applicationRegister = new ApplicationRegister(airavata);
+            computeResourceRegister = new ComputeResourceRegister(airavata);
         } catch (Exception e) {
             logger.error("Error while creating airavata client instance", e);
         }
@@ -70,4 +72,12 @@ public class FrameworkSetup {
     public void setAiravata(Airavata.Client airavata) {
         this.airavata = airavata;
     }
+
+    public ComputeResourceRegister getComputeResourceRegister() {
+        return computeResourceRegister;
+    }
+
+    public void setComputeResourceRegister(ComputeResourceRegister computeResourceRegister) {
+        this.computeResourceRegister = computeResourceRegister;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
index f0fba59..ca5cce7 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
@@ -43,10 +43,7 @@ import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
+import java.io.*;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -116,6 +113,11 @@ public class GatewayRegister {
 
     public void registerSSHKeys () throws Exception{
         try {
+            // write tokens to file
+            String tokenWriteLocation = propertyReader.readProperty(TestFrameworkConstants.FrameworkPropertiesConstants.TOKEN_WRITE_LOCATION, PropertyFileType.TEST_FRAMEWORK);
+            String fileName = tokenWriteLocation + File.separator + TestFrameworkConstants.CredentialStoreConstants.TOKEN_FILE_NAME;
+
+            PrintWriter tokenWriter = new PrintWriter(fileName, "UTF-8");
             // credential store related functions are not in the current api, so need to call credential store directly
             AiravataUtils.setExecutionAsClient();
             String jdbcURL = propertyReader.readProperty(TestFrameworkConstants.AiravataClientConstants.CS_JBDC_URL, PropertyFileType.AIRAVATA_CLIENT);
@@ -149,7 +151,9 @@ public class GatewayRegister {
                 sshCredential.setPassphrase(keyPassword);
                 writer.writeCredentials(sshCredential);
                 tokenMap.put(gateway.getGatewayId(), token);
+                tokenWriter.println(gateway.getGatewayId() + ":" + token);
             }
+            tokenWriter.close();
         } catch (ClassNotFoundException e) {
             logger.error("Unable to find mysql driver", e);
             throw new Exception("Unable to find mysql driver",e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/LoadTester.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/LoadTester.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/LoadTester.java
deleted file mode 100644
index b27b429..0000000
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/LoadTester.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-
-package org.apache.airavata.testsuite.multitenantedairavata;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-public class LoadTester {
-    private final static Logger logger = LoggerFactory.getLogger(LoadTester.class);
-    public static void main(String[] args) {
-        try {
-            FrameworkSetup frameworkSetup = FrameworkSetup.getInstance();
-            Map<String, String> tokenMap = frameworkSetup.getGatewayRegister().getTokenMap();
-            Map<String, String> projectMap = frameworkSetup.getGatewayRegister().getProjectMap();
-            Map<String, String> appInterfaceMap = frameworkSetup.getApplicationRegister().getApplicationInterfaceListPerGateway();
-
-            ExperimentExecution experimentExecution = new ExperimentExecution(frameworkSetup.getAiravata(),tokenMap, appInterfaceMap, projectMap);
-            experimentExecution.createAmberExperiment();
-            experimentExecution.createEchoExperiment();
-            experimentExecution.launchExperiments();
-            experimentExecution.monitorExperiments();
-        } catch (Exception e) {
-            logger.error("Error while submitting experiments", e);
-        }
-
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/d61d33ee/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
index f64ce67..93991cd 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
@@ -46,11 +46,12 @@ public class TestFrameworkConstants {
         public static final String SSH_PRIKEY_LOCATION = "ssh.private.key.location";
         public static final String SSH_PWD = "ssh.password";
         public static final String SSH_USERNAME = "ssh.username";
+        public static final String TOKEN_WRITE_LOCATION = "token.file.location";
     }
 
     public static final class GatewayConstants {
-        public static final String GENERIC_GATEWAY_NAME = "testGateway";
-        public static final String GENERIC_GATEWAY_DOMAIN = ".airavata.org";
+        public static final String GENERIC_GATEWAY_NAME = "generic.gateway.name";
+        public static final String GENERIC_GATEWAY_DOMAIN = "generic.gateway.domain";
     }
 
     public static final class AppcatalogConstants {
@@ -94,6 +95,7 @@ public class TestFrameworkConstants {
     }
 
     public static final class CredentialStoreConstants {
+        public static final String TOKEN_FILE_NAME = "testFrameworkTokens";
 
     }
 


[06/12] airavata git commit: Removing unused dependencies - AIRAVATA-1658

Posted by sh...@apache.org.
Removing unused dependencies - AIRAVATA-1658


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

Branch: refs/heads/emailMonitoring
Commit: 7515c461de76249aec7e6f8ad37553ef5358b913
Parents: 28043f5
Author: Suresh Marru <sm...@apache.org>
Authored: Mon Apr 6 00:10:30 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Mon Apr 6 00:10:30 2015 -0400

----------------------------------------------------------------------
 .../airavata-cpp-sdk/pom.xml                    |   2 -
 .../airavata-php-sdk/pom.xml                    |   2 -
 .../airavata-python-sdk/pom.xml                 |   2 -
 modules/distribution/client/java/pom.xml        | 210 +------------------
 modules/distribution/release/pom.xml            |   2 -
 modules/distribution/server/pom.xml             |   2 +-
 modules/integration-tests/pom.xml               |   1 -
 pom.xml                                         |   2 -
 samples/java-client/experiment/pom.xml          |  60 +-----
 9 files changed, 13 insertions(+), 270 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
index b21d9db..b90f8ff 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
@@ -102,8 +102,6 @@
 
     
     <properties>
-        <jersey.version>1.13</jersey.version>
-        <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-client-cpp-sdk</archive.name>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
index 7c614c7..78e9f76 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
@@ -102,8 +102,6 @@
 
     
     <properties>
-        <jersey.version>1.13</jersey.version>
-        <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-php-sdk</archive.name>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
index bf53fce..ab9fb4a 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
@@ -102,8 +102,6 @@
 
     
     <properties>
-        <jersey.version>1.13</jersey.version>
-        <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-client-python-sdk</archive.name>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/modules/distribution/client/java/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/pom.xml b/modules/distribution/client/java/pom.xml
index 01ba905..94fe1ba 100644
--- a/modules/distribution/client/java/pom.xml
+++ b/modules/distribution/client/java/pom.xml
@@ -8,7 +8,8 @@
     ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under 
     the License. -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
         <groupId>org.apache.airavata</groupId>
         <artifactId>airavata-client-parent</artifactId>
@@ -24,7 +25,7 @@
 
     <build>
         <plugins>
-	    <plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <version>2.8</version>
@@ -103,190 +104,26 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xpp3</artifactId>
-            <version>${xpp3.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xpp5</artifactId>
-            <version>${xpp5.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>xsul</artifactId>
-            <version>${xsul.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>gpel-client</artifactId>
-            <version>${gpel.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.ogce</groupId>
-            <artifactId>atomixmiser</artifactId>
-            <version>${atomixmiser.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-            <version>3.1</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>1.6</version>
-        </dependency>
-	<dependency>
-            <groupId>commons-cli</groupId>
-            <artifactId>commons-cli</artifactId>
-            <version>1.2</version>
-        </dependency>  
-        <dependency>
-            <groupId>org.python</groupId>
-            <artifactId>jython</artifactId>
-            <version>${jython.version}</version>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>${junit.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-            <version>${xmlbeans.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-api</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-impl</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.axiom</groupId>
-            <artifactId>axiom-dom</artifactId>
-            <version>1.2.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ws.commons.schema</groupId>
-            <artifactId>XmlSchema</artifactId>
-            <version>1.4.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.neethi</groupId>
-            <artifactId>neethi</artifactId>
-            <version>2.0.4</version>
-        </dependency>
-
-        <!-- AMAZON STUFFS -->
-        <dependency>
-            <groupId>com.amazonaws</groupId>
-            <artifactId>aws-java-sdk</artifactId>
-            <version>1.3.20</version>
-        </dependency>
-        <dependency>
-            <groupId>net.java.dev.jets3t</groupId>
-            <artifactId>jets3t</artifactId>
-            <version>0.8.0</version>
-        </dependency>
-
-        <!-- AIRAVATA modules -->
-<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-orchestrator-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-gfac-schema-utils</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-execution-context</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-cpi</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-credential-store</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!--dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-message-monitor</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-model-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-messenger-commons</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-messenger-client</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-workflow-tracking</artifactId>
-            <version>${project.version}</version>
-        </dependency-->
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>gsissh</artifactId>
-            <version>${project.version}</version>
-        </dependency>
+
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-model-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-orchestrator-service</artifactId>
-            <version>${project.version}</version>
-        </dependency>        
 
         <dependency>
             <groupId>org.slf4j</groupId>
@@ -303,36 +140,6 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derbyclient</artifactId>
-            <version>${derby.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.jersey.contribs</groupId>
-            <artifactId>jersey-multipart</artifactId>
-            <version>${jersey.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-mapper-asl</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-xc</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-jaxrs</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-core-asl</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
             <version>0.9.1</version>
@@ -343,13 +150,14 @@
             <version>${project.version}</version>
         </dependency>
     </dependencies>
+
     <properties>
-        <jersey.version>1.13</jersey.version>
-        <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archieve.name>apache-airavata-client</archieve.name>
         <airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>
-        <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
-        <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>
+        <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip
+        </airavata.client-bin.zip>
+        <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz
+        </airavata.client-bin.tar.gz>
     </properties>
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/modules/distribution/release/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/release/pom.xml b/modules/distribution/release/pom.xml
index f3f9291..b96951c 100644
--- a/modules/distribution/release/pom.xml
+++ b/modules/distribution/release/pom.xml
@@ -108,8 +108,6 @@
     </build>
 
     <properties>
-        <jersey.version>1.13</jersey.version>
-        <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archieve.name>apache-airavata-client</archieve.name>
 		<airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index dc25dd7..d157bf9 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -414,7 +414,7 @@
 			<artifactId>jersey-client</artifactId>
 			<version>${jersey.version}</version>
 		</dependency>
-		<!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId> 
+		<!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId>
 			<version>${project.version}</version> </dependency -->
 		<dependency>
 			<groupId>javax.servlet</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/modules/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index 3a363df..087c085 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -263,7 +263,6 @@
 
 
     <properties>
-        <jersey.version>1.13</jersey.version>
         <user />
         <pwd />
         <cert />

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e723b9c..32a5e69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -83,7 +83,6 @@
 		<xsul5.version>1.2.7</xsul5.version>
 		<gpel.version>1.0.9</gpel.version>
 		<atomixmiser.version>0.9.4</atomixmiser.version>
-		<yfilter.version>1.0</yfilter.version>
 		<jython.version>2.5.3</jython.version>
 		<jersey.version>1.13</jersey.version>
 		<tomcat.version>7.0.41</tomcat.version>
@@ -532,7 +531,6 @@
 				<module>modules/server</module>
 				<module>modules/test-suite</module>
 				<module>modules/distribution</module>
-				<!--<module>modules/ws-messenger</module>-->
 				<module>modules/messaging</module>
 				<module>modules/integration-tests</module>
 				<module>modules/workflow</module>

http://git-wip-us.apache.org/repos/asf/airavata/blob/7515c461/samples/java-client/experiment/pom.xml
----------------------------------------------------------------------
diff --git a/samples/java-client/experiment/pom.xml b/samples/java-client/experiment/pom.xml
index 1ed25f0..bde6090 100644
--- a/samples/java-client/experiment/pom.xml
+++ b/samples/java-client/experiment/pom.xml
@@ -8,7 +8,8 @@
     ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under 
     the License. -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
         <groupId>org.apache.airavata</groupId>
         <artifactId>airavata-client-sample</artifactId>
@@ -34,52 +35,12 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-jpa-registry</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-mapper-asl</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-xc</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-jaxrs</artifactId>
-            <version>1.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-core-asl</artifactId>
-            <version>1.9.2</version>
-        </dependency>
+
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-json</artifactId>
-            <version>${jersey.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.jersey</groupId>
-            <artifactId>jersey-client</artifactId>
-            <version>${jersey.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-data-models</artifactId>
             <version>${project.version}</version>
@@ -99,21 +60,6 @@
             <artifactId>libthrift</artifactId>
             <version>${thrift.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
-	<dependency>
-            <groupId>ant-contrib</groupId>
-            <artifactId>ant-contrib</artifactId>
-            <version>1.0b3</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>ant</groupId>
-                    <artifactId>ant</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
     </dependencies>
 
 </project>


[09/12] airavata git commit: adding more changes to test framework AIRAVATA-1652

Posted by sh...@apache.org.
adding more changes to test framework AIRAVATA-1652


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

Branch: refs/heads/emailMonitoring
Commit: 05bb24d9eb46bbe0327312dcadcdf5731caba12f
Parents: 97bd7a7
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Apr 7 14:12:18 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Apr 7 14:12:18 2015 -0400

----------------------------------------------------------------------
 .../ApplicationRegister.java                    |  26 ++-
 .../ComputeResourceRegister.java                |   4 +-
 .../ExperimentExecution.java                    | 233 ++++++++++++-------
 .../FrameworkBootstrapping.java                 |  13 +-
 .../utils/TestFrameworkConstants.java           |   4 +-
 .../main/resources/airavata-client.properties   |   4 +-
 .../main/resources/test-framework.properties    |  18 +-
 7 files changed, 184 insertions(+), 118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
index 06f6343..fa87d83 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
@@ -127,25 +127,25 @@ public class ApplicationRegister {
         appModules.add(amberModuleId);
 
         InputDataObjectType input1 = createAppInput("Heat_Restart_File", null,
-                DataType.URI, null, 1, true, true,false, "Heating up the system equilibration stage - 02_Heat.rst", null);
+                DataType.URI, "-c", 1, true, true,false, "Heating up the system equilibration stage - 02_Heat.rst", null);
 
         InputDataObjectType input2 = createAppInput("Production_Control_File", null,
-                DataType.URI, null, 2, true, true, false, "Constant pressure and temperature for production stage - 03_Prod.in", null);
+                DataType.URI, "-i ", 2, true, true, false, "Constant pressure and temperature for production stage - 03_Prod.in", null);
 
         InputDataObjectType input3 = createAppInput("Parameter_Topology_File", null,
-                DataType.URI, null, 3, true, true, false, "Parameter and Topology coordinates - prmtop", null);
+                DataType.URI, "-p", 3, true, true, false, "Parameter and Topology coordinates - prmtop", null);
 
         List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
         applicationInputs.add(input1);
         applicationInputs.add(input2);
         applicationInputs.add(input3);
 
-        OutputDataObjectType output1 = createAppOutput("AMBER_Execution_Summary", "03_Prod.info", DataType.URI, true, true);
-        OutputDataObjectType output2 = createAppOutput("AMBER_Execution_log", "03_Prod.out", DataType.URI, true, true);
-        OutputDataObjectType output3 = createAppOutput("AMBER_Trajectory_file", "03_Prod.mdcrd", DataType.URI, true, true);
-        OutputDataObjectType output4 = createAppOutput("AMBER_Restart_file", "03_Prod.rst", DataType.URI, true, true);
-        OutputDataObjectType output5 = createAppOutput("STDOUT", null, DataType.STDOUT, true, false);
-        OutputDataObjectType output6 = createAppOutput("STDERR", null, DataType.STDERR, true, false);
+        OutputDataObjectType output1 = createAppOutput("AMBER_Execution_Summary", "03_Prod.info", DataType.URI, true, true, "-inf");
+        OutputDataObjectType output2 = createAppOutput("AMBER_Execution_log", "03_Prod.out", DataType.URI, true, true, "-o");
+        OutputDataObjectType output3 = createAppOutput("AMBER_Trajectory_file", "03_Prod.mdcrd", DataType.URI, true, true, "-x");
+        OutputDataObjectType output4 = createAppOutput("AMBER_Restart_file", "03_Prod.rst", DataType.URI, true, true, " -r");
+        OutputDataObjectType output5 = createAppOutput("STDOUT", null, DataType.STDOUT, true, false, null);
+        OutputDataObjectType output6 = createAppOutput("STDERR", null, DataType.STDERR, true, false, null);
         List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
         applicationOutputs.add(output1);
         applicationOutputs.add(output2);
@@ -171,8 +171,8 @@ public class ApplicationRegister {
         List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
         applicationInputs.add(input1);
 
-        OutputDataObjectType output1 = createAppOutput("STDOUT", null, DataType.STDOUT, true, false);
-        OutputDataObjectType output2 = createAppOutput("STDERR", null, DataType.STDERR, true, false);
+        OutputDataObjectType output1 = createAppOutput("STDOUT", null, DataType.STDOUT, true, false, null);
+        OutputDataObjectType output2 = createAppOutput("STDERR", null, DataType.STDERR, true, false, null);
         List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
         applicationOutputs.add(output1);
         applicationOutputs.add(output2);
@@ -282,13 +282,15 @@ public class ApplicationRegister {
                                                        String value,
                                                        DataType type,
                                                        boolean isRequired,
-                                                       boolean requiredToCMD) {
+                                                       boolean requiredToCMD,
+                                                       String argument) {
         OutputDataObjectType outputDataObjectType = new OutputDataObjectType();
         if (inputName != null) outputDataObjectType.setName(inputName);
         if (value != null) outputDataObjectType.setValue(value);
         if (type != null) outputDataObjectType.setType(type);
         outputDataObjectType.setIsRequired(isRequired);
         outputDataObjectType.setRequiredToAddedToCommandLine(requiredToCMD);
+        outputDataObjectType.setApplicationArgument(argument);
         return outputDataObjectType;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
index c17f073..ebb1451 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
@@ -99,12 +99,12 @@ public class ComputeResourceRegister {
                 if (resourceName.contains("stampede")) {
                     // adding stampede
                     stampedeResourceId = registerComputeHost(resourceName, "TACC Stampede Cluster",
-                            ResourceJobManagerType.SLURM, "push", "/usr/bin", SecurityProtocol.SSH_KEYS, 22, null);
+                            ResourceJobManagerType.SLURM, "push", "/usr/bin", SecurityProtocol.SSH_KEYS, 22, "ibrun");
                     System.out.println("Stampede Resource Id is " + stampedeResourceId);
                 } else if (resourceName.contains("trestles")) {
                     //Register Trestles
                     trestlesResourceId = registerComputeHost("trestles.sdsc.xsede.org", "SDSC Trestles Cluster",
-                            ResourceJobManagerType.PBS, "push", "/opt/torque/bin/", SecurityProtocol.SSH_KEYS, 22, null);
+                            ResourceJobManagerType.PBS, "push", "/opt/torque/bin/", SecurityProtocol.SSH_KEYS, 22, "mpirun -np");
                     System.out.println("Trestles Resource Id is " + trestlesResourceId);
                 } else if (resourceName.contains("bigred2")) {
                     //Register BigRedII

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index 16a2d88..1f71908 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -37,10 +37,7 @@ import org.apache.airavata.model.messaging.event.JobStatusChangeEvent;
 import org.apache.airavata.model.messaging.event.MessageType;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.testsuite.multitenantedairavata.utils.PropertyFileType;
 import org.apache.airavata.testsuite.multitenantedairavata.utils.PropertyReader;
 import org.apache.airavata.testsuite.multitenantedairavata.utils.TestFrameworkConstants;
@@ -49,10 +46,11 @@ import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.io.File;
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 public class ExperimentExecution {
     private Airavata.Client airavata;
@@ -63,9 +61,10 @@ public class ExperimentExecution {
     private Map<String, Map<String, String>> appInterfaceMap;
     private Map<String, List<Project>> projectsMap;
     private PropertyReader propertyReader;
+    private PrintWriter resultWriter;
 
     public ExperimentExecution(Airavata.Client airavata,
-                               Map<String, String> tokenMap ) {
+                               Map<String, String> tokenMap ) throws Exception {
         this.airavata = airavata;
         this.csTokens = tokenMap;
         this.appInterfaceMap = getApplicationMap(tokenMap);
@@ -73,9 +72,23 @@ public class ExperimentExecution {
         this.projectsMap = getProjects(tokenMap);
         this.experimentsWithTokens = new HashMap<String, String>();
         this.experimentsWithGateway = new HashMap<String, String>();
+        String resultFileLocation = propertyReader.readProperty(TestFrameworkConstants.FrameworkPropertiesConstants.RESULT_WRITE_LOCATION, PropertyFileType.TEST_FRAMEWORK);
+        String resultFileName = getResultFileName();
+        File resultFile = new File(resultFileLocation + resultFileName);
+        resultWriter = new PrintWriter(resultFile, "UTF-8");
+        resultWriter.println("Test Framework Results");
+        resultWriter.println("========================================");
     }
 
-    protected Map<String, Map<String, String>> getApplicationMap (Map<String, String> tokenMap){
+    public PrintWriter getResultWriter() {
+        return resultWriter;
+    }
+
+    public void setResultWriter(PrintWriter resultWriter) {
+        this.resultWriter = resultWriter;
+    }
+
+    protected Map<String, Map<String, String>> getApplicationMap (Map<String, String> tokenMap) throws  Exception{
         appInterfaceMap = new HashMap<String, Map<String, String>>();
         try {
             if (tokenMap != null && !tokenMap.isEmpty()){
@@ -85,18 +98,22 @@ public class ExperimentExecution {
                 }
             }
         } catch (AiravataSystemException e) {
-            e.printStackTrace();
+            logger.error("Error while getting application interfaces", e);
+            throw new Exception("Error while getting application interfaces", e);
         } catch (InvalidRequestException e) {
-            e.printStackTrace();
+            logger.error("Error while getting application interfaces", e);
+            throw new Exception("Error while getting application interfaces", e);
         } catch (AiravataClientException e) {
-            e.printStackTrace();
+            logger.error("Error while getting application interfaces", e);
+            throw new Exception("Error while getting application interfaces", e);
         } catch (TException e) {
-            e.printStackTrace();
+            logger.error("Error while getting application interfaces", e);
+            throw new Exception("Error while getting application interfaces", e);
         }
         return appInterfaceMap;
     }
 
-    protected Map<String, List<Project>> getProjects (Map<String, String> tokenMap){
+    protected Map<String, List<Project>> getProjects (Map<String, String> tokenMap) throws Exception{
         projectsMap = new HashMap<String, List<Project>>();
         try {
             if (tokenMap != null && !tokenMap.isEmpty()){
@@ -109,13 +126,17 @@ public class ExperimentExecution {
                 }
             }
         } catch (AiravataSystemException e) {
-            e.printStackTrace();
+            logger.error("Error while getting all user projects", e);
+            throw new Exception("Error while getting all user projects", e);
         } catch (InvalidRequestException e) {
-            e.printStackTrace();
+            logger.error("Error while getting all user projects", e);
+            throw new Exception("Error while getting all user projects", e);
         } catch (AiravataClientException e) {
-            e.printStackTrace();
+            logger.error("Error while getting all user projects", e);
+            throw new Exception("Error while getting all user projects", e);
         } catch (TException e) {
-            e.printStackTrace();
+            logger.error("Error while getting all user projects", e);
+            throw new Exception("Error while getting all user projects", e);
         }
         return projectsMap;
     }
@@ -132,69 +153,107 @@ public class ExperimentExecution {
     }
 
     public void monitorExperiments () throws Exception {
+
         String brokerUrl = propertyReader.readProperty(TestFrameworkConstants.AiravataClientConstants.RABBIT_BROKER_URL, PropertyFileType.AIRAVATA_CLIENT);
         System.out.println("broker url " + brokerUrl);
         final String exchangeName = propertyReader.readProperty(TestFrameworkConstants.AiravataClientConstants.RABBIT_EXCHANGE_NAME, PropertyFileType.AIRAVATA_CLIENT);
         RabbitMQStatusConsumer consumer = new RabbitMQStatusConsumer(brokerUrl, exchangeName);
-        for (final String expId : experimentsWithGateway.keySet()){
-            final String gatewayId = experimentsWithGateway.get(expId);
-            consumer.listen(new MessageHandler() {
-                @Override
-                public Map<String, Object> getProperties() {
-                    Map<String, Object> props = new HashMap<String, Object>();
-                    List<String> routingKeys = new ArrayList<String>();
+
+        consumer.listen(new MessageHandler() {
+            @Override
+            public Map<String, Object> getProperties() {
+                Map<String, Object> props = new HashMap<String, Object>();
+                List<String> routingKeys = new ArrayList<String>();
+                for (String expId : experimentsWithGateway.keySet()) {
+                    String gatewayId = experimentsWithGateway.get(expId);
+                    System.out.println("experiment Id : " + expId + " gateway Id : " + gatewayId);
+
                     routingKeys.add(gatewayId);
                     routingKeys.add(gatewayId + "." + expId);
                     routingKeys.add(gatewayId + "." + expId + ".*");
                     routingKeys.add(gatewayId + "." + expId + ".*.*");
                     routingKeys.add(gatewayId + "." + expId + ".*.*.*");
-
-                    props.put(MessagingConstants.RABBIT_ROUTING_KEY, routingKeys);
-                    return props;
                 }
+                props.put(MessagingConstants.RABBIT_ROUTING_KEY, routingKeys);
+                return props;
+            }
 
-                @Override
-                public void onMessage(MessageContext message) {
+            @Override
+            public void onMessage(MessageContext message) {
 
-                    if (message.getType().equals(MessageType.EXPERIMENT)){
-                        try {
-                            ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent();
-                            TBase messageEvent = message.getEvent();
-                            byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
-                            ThriftUtils.createThriftFromBytes(bytes, event);
-                            ExperimentState expState = event.getState();
-                            if (expState.equals(ExperimentState.COMPLETED)){
-                                // check file transfers
-                                List<OutputDataObjectType> experimentOutputs = airavata.getExperimentOutputs(expId);
-                                int i = 1;
-                                for (OutputDataObjectType output : experimentOutputs){
-                                    logger.info("################ Experiment : " + expId + " COMPLETES ###################");
-                                    logger.info("Output " + i + " : "  + output.getValue());
-                                    i++;
-                                }
+                if (message.getType().equals(MessageType.EXPERIMENT)) {
+                    try {
+                        ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent();
+                        TBase messageEvent = message.getEvent();
+                        byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                        ThriftUtils.createThriftFromBytes(bytes, event);
+                        ExperimentState expState = event.getState();
+                        String expId = event.getExperimentId();
+                        String gatewayId = event.getGatewayId();
+
+                        if (expState.equals(ExperimentState.COMPLETED)) {
+                            resultWriter.println();
+                            resultWriter.println("Results for experiment : " + expId + " of gateway Id : " + gatewayId);
+                            resultWriter.println("=====================================================================");
+                            resultWriter.println("Status : " + ExperimentState.COMPLETED.toString());
+                            // check file transfers
+                            List<OutputDataObjectType> experimentOutputs = airavata.getExperimentOutputs(expId);
+                            int i = 1;
+                            for (OutputDataObjectType output : experimentOutputs) {
+
+                                System.out.println("################ Experiment : " + expId + " COMPLETES ###################");
+                                System.out.println("Output " + i + " : " + output.getValue());
+                                resultWriter.println("Output " + i + " : " + output.getValue());
+                                i++;
                             }
-                            logger.info(" Experiment Id : '" + expId
-                                    + "' with state : '" + event.getState().toString() +
-                                    " for Gateway " + event.getGatewayId());
-                        } catch (TException e) {
-                            logger.error(e.getMessage(), e);
-                        }
-                    }else if (message.getType().equals(MessageType.JOB)){
-                        try {
-                            JobStatusChangeEvent event = new JobStatusChangeEvent();
-                            TBase messageEvent = message.getEvent();
-                            byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
-                            ThriftUtils.createThriftFromBytes(bytes, event);
-                            logger.info(" Job ID : '" + event.getJobIdentity().getJobId()
-                                    + "' with state : '" + event.getState().toString() +
-                                    " for Gateway " + event.getJobIdentity().getGatewayId());
-                        } catch (TException e) {
-                            logger.error(e.getMessage(), e);
+                            resultWriter.println("################  End of Results for Experiment : " + expId + " ###############");
+                            resultWriter.println();
+                        } else if (expState.equals(ExperimentState.FAILED)) {
+                            // check file transfers
+                            int j = 1;
+                            resultWriter.println("Status : " + ExperimentState.FAILED.toString());
+                            System.out.println("################ Experiment : " + expId + " FAILED ###################");
+                            Experiment experiment = airavata.getExperiment(expId);
+                            List<ErrorDetails> errors = experiment.getErrors();
+                            for (ErrorDetails errorDetails : errors) {
+                                System.out.println(errorDetails.getActualErrorMessage());
+                                resultWriter.println("Actual Error : " + j + " : " + errorDetails.getActualErrorMessage());
+                                resultWriter.println("User Friendly Message : " + j + " : " + errorDetails.getUserFriendlyMessage());
+                                resultWriter.println("Corrective Action : " + j + " : " + errorDetails.getCorrectiveAction());
+                            }
+                            resultWriter.println("################  End of Results for Experiment : " + expId + " ###############");
                         }
+                        System.out.println(" Experiment Id : '" + expId
+                                + "' with state : '" + event.getState().toString() +
+                                " for Gateway " + event.getGatewayId());
+                    } catch (TException e) {
+                        e.printStackTrace();
+                        logger.error(e.getMessage(), e);
+                    }
+                } else if (message.getType().equals(MessageType.JOB)) {
+                    try {
+                        JobStatusChangeEvent event = new JobStatusChangeEvent();
+                        TBase messageEvent = message.getEvent();
+                        byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                        ThriftUtils.createThriftFromBytes(bytes, event);
+                        System.out.println(" Job ID : '" + event.getJobIdentity().getJobId()
+                                + "' with state : '" + event.getState().toString() +
+                                " for Gateway " + event.getJobIdentity().getGatewayId());
+//                        resultWriter.println("Job Status : " + event.getState().toString());
+
+                    } catch (TException e) {
+                        logger.error(e.getMessage(), e);
                     }
                 }
-            });
-        }
+            resultWriter.flush();
+            }
+        });
+    }
+
+    private String getResultFileName (){
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
+        Calendar cal = Calendar.getInstance();
+        return dateFormat.format(cal.getTime());
     }
 
     public void createAmberExperiment () throws Exception{
@@ -255,17 +314,18 @@ public class ExperimentExecution {
                                     experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
                                     experimentsWithTokens.put(experimentId, token);
                                     experimentsWithGateway.put(experimentId, gatewayId);
-                                }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
                                 }
+//                                else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
+//                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+//                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
+//                                    userConfigurationData.setAiravataAutoSchedule(false);
+//                                    userConfigurationData.setOverrideManualScheduledParams(false);
+//                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
+//                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
+//                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+//                                    experimentsWithTokens.put(experimentId, token);
+//                                    experimentsWithGateway.put(experimentId, gatewayId);
+//                                }
                             }
                         }
                     }
@@ -327,17 +387,18 @@ public class ExperimentExecution {
                                         experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
                                         experimentsWithTokens.put(experimentId, token);
                                         experimentsWithGateway.put(experimentId, gatewayId);
-                                    } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
-                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                        userConfigurationData.setAiravataAutoSchedule(false);
-                                        userConfigurationData.setOverrideManualScheduledParams(false);
-                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                        experimentsWithTokens.put(experimentId, token);
-                                        experimentsWithGateway.put(experimentId, gatewayId);
                                     }
+//                                    else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
+//                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+//                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+//                                        userConfigurationData.setAiravataAutoSchedule(false);
+//                                        userConfigurationData.setOverrideManualScheduledParams(false);
+//                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+//                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+//                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+//                                        experimentsWithTokens.put(experimentId, token);
+//                                        experimentsWithGateway.put(experimentId, gatewayId);
+//                                    }
                                 }
                             }
                         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
index 93811a6..cff569a 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
@@ -28,10 +28,7 @@ import org.apache.commons.cli.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
+import java.io.*;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -79,9 +76,13 @@ public class FrameworkBootstrapping {
                 tokens = readTokens();
                 experimentExecution = new ExperimentExecution(setup.getAiravata(), tokens);
                 experimentExecution.createEchoExperiment();
-//                experimentExecution.createAmberExperiment();
+                experimentExecution.createAmberExperiment();
                 experimentExecution.launchExperiments();
-//                experimentExecution.monitorExperiments();
+                experimentExecution.monitorExperiments();
+//                PrintWriter resultWriter = experimentExecution.getResultWriter();
+//                resultWriter.println("End of test framework results");
+//                resultWriter.println("======================================");
+//                resultWriter.flush();
             }
         } catch (Exception e) {
             logger.error("Error occured while set up", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
index 93991cd..35cc6d1 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/utils/TestFrameworkConstants.java
@@ -47,6 +47,7 @@ public class TestFrameworkConstants {
         public static final String SSH_PWD = "ssh.password";
         public static final String SSH_USERNAME = "ssh.username";
         public static final String TOKEN_WRITE_LOCATION = "token.file.location";
+        public static final String RESULT_WRITE_LOCATION = "result.file.location";
     }
 
     public static final class GatewayConstants {
@@ -89,9 +90,6 @@ public class TestFrameworkConstants {
         public static final String AMBER_HEAT_RST_LOCATION = "02_Heat.rst_location";
         public static final String AMBER_PROD_IN_LOCATION = "03_Prod.in_location";
         public static final String AMBER_PRMTOP_LOCATION = "prmtop_location";
-
-
-
     }
 
     public static final class CredentialStoreConstants {

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-client.properties b/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-client.properties
index c44bd1f..8e79d9b 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-client.properties
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/resources/airavata-client.properties
@@ -39,10 +39,10 @@ thrift.server.port=8930
 credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
 credential.store.keystore.alias=airavata
 credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+credential.store.jdbc.url=jdbc:mysql://localhost:3306/experiment_catalog
 credential.store.jdbc.user=airavata
 credential.store.jdbc.password=airavata
-credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+credential.store.jdbc.driver=com.mysql.jdbc.Driver
 
 
 ######################################################################

http://git-wip-us.apache.org/repos/asf/airavata/blob/05bb24d9/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.properties
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.properties b/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.properties
index fe83905..3a66eb1 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.properties
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.properties
@@ -20,19 +20,23 @@
 
 # Test environment related properties
 numberof.gateways=10
+generic.gateway.name=testGateway
+generic.gateway.domain=.airavata.org
 users.per.gateway=10
 compute.resoure.list=trestles.sdsc.xsede.org,stampede.tacc.xsede.org,bigred2.uits.iu.edu
 login.usernames=ogce,ogce,cgateway
 application.list=amber_sander,echo
-ssh.pub.key.location=ssh_key_location
-ssh.private.key.location=ssh_key_location
-ssh.password=pwd
-ssh.username=username
+ssh.pub.key.location=/Users/chathuri/.ssh/id_dsa.pub
+ssh.private.key.location=/Users/chathuri/.ssh/id_dsa
+ssh.password=
+ssh.username=ogce
+token.file.location=/tmp/
+result.file.location=/tmp/test_framework_results/
 
 # Application Inputs
 # Amber input file locations
-02_Heat.rst_location=/a/b/c/02_Heat.rst
-03_Prod.in_location=/a/b/c/03_Prod.in
-prmtop_location=/a/b/c/prmtop
+02_Heat.rst_location=/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/02_Heat.rst
+03_Prod.in_location=/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/03_Prod.in
+prmtop_location=/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/prmtop
 
 


[11/12] airavata git commit: completing initial test framework - AIRAVATA-1652

Posted by sh...@apache.org.
completing initial test framework - AIRAVATA-1652


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

Branch: refs/heads/emailMonitoring
Commit: 226539552a86fbf8e4500a869fbca43f010fbf42
Parents: 1670050
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Apr 7 15:48:53 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Apr 7 15:48:53 2015 -0400

----------------------------------------------------------------------
 .../multitenantedairavata/ExperimentExecution.java    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/22653955/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index a12af50..807dd1d 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -191,8 +191,8 @@ public class ExperimentExecution {
                         String expId = event.getExperimentId();
                         String gatewayId = event.getGatewayId();
 
+                        resultWriter.println();
                         if (expState.equals(ExperimentState.COMPLETED)) {
-                            resultWriter.println();
                             resultWriter.println("Results for experiment : " + expId + " of gateway Id : " + gatewayId);
                             resultWriter.println("=====================================================================");
                             resultWriter.println("Status : " + ExperimentState.COMPLETED.toString());
@@ -200,16 +200,17 @@ public class ExperimentExecution {
                             List<OutputDataObjectType> experimentOutputs = airavata.getExperimentOutputs(expId);
                             int i = 1;
                             for (OutputDataObjectType output : experimentOutputs) {
-
                                 System.out.println("################ Experiment : " + expId + " COMPLETES ###################");
                                 System.out.println("Output " + i + " : " + output.getValue());
                                 resultWriter.println("Output " + i + " : " + output.getValue());
                                 i++;
                             }
-                            resultWriter.println("################  End of Results for Experiment : " + expId + " ###############");
+                            resultWriter.println("End of Results for Experiment : " + expId );
+                            resultWriter.println("=====================================================================");
                             resultWriter.println();
                         } else if (expState.equals(ExperimentState.FAILED)) {
-                            // check file transfers
+                            resultWriter.println("Results for experiment : " + expId + " of gateway Id : " + gatewayId);
+                            resultWriter.println("=====================================================================");
                             int j = 1;
                             resultWriter.println("Status : " + ExperimentState.FAILED.toString());
                             System.out.println("################ Experiment : " + expId + " FAILED ###################");
@@ -221,13 +222,14 @@ public class ExperimentExecution {
                                 resultWriter.println("User Friendly Message : " + j + " : " + errorDetails.getUserFriendlyMessage());
                                 resultWriter.println("Corrective Action : " + j + " : " + errorDetails.getCorrectiveAction());
                             }
-                            resultWriter.println("################  End of Results for Experiment : " + expId + " ###############");
+                            resultWriter.println("End of Results for Experiment : " + expId );
+                            resultWriter.println("=====================================================================");
+                            resultWriter.println();
                         }
                         System.out.println(" Experiment Id : '" + expId
                                 + "' with state : '" + event.getState().toString() +
                                 " for Gateway " + event.getGatewayId());
                     } catch (TException e) {
-                        e.printStackTrace();
                         logger.error(e.getMessage(), e);
                     }
                 } else if (message.getType().equals(MessageType.JOB)) {


[03/12] airavata git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata

Posted by sh...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata


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

Branch: refs/heads/emailMonitoring
Commit: 4d478d80c49b5647544cc0df3875de8409037c3d
Parents: 8feb5d0 732da59
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Fri Apr 3 12:53:06 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Fri Apr 3 12:53:06 2015 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[07/12] airavata git commit: more fixes to test framework - AIRAVATA-1652

Posted by sh...@apache.org.
more fixes to test framework - AIRAVATA-1652


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

Branch: refs/heads/emailMonitoring
Commit: 526aa7782eb78b6e88bfa84f0165689cf605ebde
Parents: d61d33e
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Mon Apr 6 22:39:48 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Mon Apr 6 22:39:48 2015 -0400

----------------------------------------------------------------------
 .../data/impl/ApplicationDeploymentImpl.java    |   5 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |   9 +-
 .../ApplicationRegister.java                    |  22 ++--
 .../ComputeResourceRegister.java                |  46 ++++---
 .../ExperimentExecution.java                    | 122 ++++++++++---------
 .../FrameworkBootstrapping.java                 |   7 +-
 .../multitenantedairavata/GatewayRegister.java  |  44 +++----
 7 files changed, 140 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
index adace03..f0027ab 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ApplicationDeploymentImpl.java
@@ -55,11 +55,12 @@ public class ApplicationDeploymentImpl implements ApplicationDeployment {
                 throw new AppCatalogException("Application module does not exist in the system. Please create an application module first...");
             }
             AppModuleResource module = (AppModuleResource)moduleResource.get(deploymentDescription.getAppModuleId());
-            deploymentResource.setDeploymentId(deploymentDescription.getComputeHostId() + "_" + module.getModuleName());
+            ComputeResourceResource hostResource = (ComputeResourceResource) computeHostResource.get(deploymentDescription.getComputeHostId());
+            deploymentResource.setDeploymentId(hostResource.getHostName() + "_" + deploymentDescription.getAppModuleId());
             deploymentResource.setAppModuleId(deploymentDescription.getAppModuleId());
             deploymentResource.setModuleResource(module);
             deploymentResource.setHostId(deploymentDescription.getComputeHostId());
-            deploymentResource.setHostResource((ComputeResourceResource)computeHostResource.get(deploymentDescription.getComputeHostId()));
+            deploymentResource.setHostResource(hostResource);
             deploymentResource.setAppDes(deploymentDescription.getAppDeploymentDescription());
             deploymentResource.setExecutablePath(deploymentDescription.getExecutablePath());
             deploymentResource.setGatewayId(gatewayId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 80bc37f..9f80785 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -1167,15 +1167,17 @@ public class GFacUtils {
 		} else if (experimentEntry == null) {  // this means this is a very new experiment
 			// are going to create a new node
 			log.info("This is a new Job, so creating all the experiment docs from the scratch");
-			Stat expParent = zk.exists(newExpNode, false);
+
 			zk.create(newExpNode, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
 					CreateMode.PERSISTENT);
-
+            Stat expParent = zk.exists(newExpNode, false);
 			if (tokenId != null && expParent != null) {
 				zk.setData(newExpNode, tokenId.getBytes(),
 						expParent.getVersion());
 			}
-			String s = zk.create(newExpNode + File.separator + "state", String
+
+            String token = AiravataZKUtils.getExpTokenId(zk, experimentID, taskID);
+            String s = zk.create(newExpNode + File.separator + "state", String
 							.valueOf(GfacExperimentState.LAUNCHED.getValue())
 							.getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE,
 					CreateMode.PERSISTENT);
@@ -1227,7 +1229,6 @@ public class GFacUtils {
 	 * This will return a value if the server is down because we iterate through exisiting experiment nodes, not
 	 * through gfac-server nodes
 	 * @param experimentID
-	 * @param taskID
 	 * @param zk
 	 * @return
 	 * @throws KeeperException

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
index 6681219..06f6343 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ApplicationRegister.java
@@ -55,17 +55,6 @@ public class ApplicationRegister {
         allGateways = getAllGateways(airavata);
         applicationInterfaceListPerGateway = new HashMap<String, String>();
         applicationDeployementListPerGateway = new HashMap<String, String>();
-        Map<String, String> allComputeResourceNames = airavata.getAllComputeResourceNames();
-        for (String resourceId : allComputeResourceNames.keySet()){
-            String resourceName = allComputeResourceNames.get(resourceId);
-            if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME)){
-                stampedeResourceId = resourceId;
-            }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME)){
-                trestlesResourceId = resourceId;
-            }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)){
-                br2ResourceId = resourceId;
-            }
-        }
     }
 
     public List<Gateway> getAllGateways(Airavata.Client client) throws Exception{
@@ -78,6 +67,17 @@ public class ApplicationRegister {
     }
 
     public void addApplications () throws Exception{
+        Map<String, String> allComputeResourceNames = airavata.getAllComputeResourceNames();
+        for (String resourceId : allComputeResourceNames.keySet()){
+            String resourceName = allComputeResourceNames.get(resourceId);
+            if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME)){
+                stampedeResourceId = resourceId;
+            }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME)){
+                trestlesResourceId = resourceId;
+            }else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)){
+                br2ResourceId = resourceId;
+            }
+        }
         addAmberApplication();
         addEchoApplication();
         addLAMMPSApplication();

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
index db2965f..c17f073 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ComputeResourceRegister.java
@@ -40,6 +40,7 @@ public class ComputeResourceRegister {
     private List<String> computeResourceIds;
     private PropertyReader propertyReader;
     private Map<String, String> loginNamesWithResourceMap;
+    private Map<String, String> loginNamesWithResourceIds;
     private final static Logger logger = LoggerFactory.getLogger(ComputeResourceRegister.class);
 
     public ComputeResourceRegister(Airavata.Client airavata) throws Exception {
@@ -78,6 +79,17 @@ public class ComputeResourceRegister {
         return loginNamesWithResourceMap;
     }
 
+    public Map<String, String> getLoginNamesWithResourceIDs() throws Exception {
+        loginNamesWithResourceIds = new HashMap<String, String>();
+        Map<String, String> allComputeResourceNames = airavata.getAllComputeResourceNames();
+        for (String resourceId : allComputeResourceNames.keySet()) {
+            String resourceName = allComputeResourceNames.get(resourceId);
+            loginNamesWithResourceIds.put(resourceId, loginNamesWithResourceMap.get(resourceName));
+        }
+
+        return loginNamesWithResourceIds;
+    }
+
     public void addComputeResources () throws Exception {
         String stampedeResourceId = null;
         String trestlesResourceId = null;
@@ -171,25 +183,25 @@ public class ComputeResourceRegister {
             ComputeResourcePreference trestlesResourcePreferences = null;
             ComputeResourcePreference bigRedResourcePreferences = null;
 
-            for (String resourceName : loginNamesWithResourceMap.keySet()) {
-                if (resourceName.contains("stampede")) {
-                    stampedeResourcePreferences = createComputeResourcePreference(resourceName, "TG-STA110014S", false, null,
-                            JobSubmissionProtocol.SSH, DataMovementProtocol.SCP, "/scratch/01437/ogce/gta-work-dirs", loginNamesWithResourceMap.get(resourceName));
-                }else if (resourceName.contains("trestles")){
-                    trestlesResourcePreferences = createComputeResourcePreference(resourceName, "sds128", false, null, JobSubmissionProtocol.SSH,
-                            DataMovementProtocol.SCP, "/oasis/scratch/trestles/ogce/temp_project/gta-work-dirs", loginNamesWithResourceMap.get(resourceName));
-                }else if (resourceName.contains("bigred2")){
-                    bigRedResourcePreferences = createComputeResourcePreference(resourceName, "TG-STA110014S", false, null, null, null,
-                            "/N/dc2/scratch/cgateway/gta-work-dirs", loginNamesWithResourceMap.get(resourceName));
-                }
-            }
+            loginNamesWithResourceIds = getLoginNamesWithResourceIDs();
 
             List<GatewayResourceProfile> allGatewayComputeResources = airavata.getAllGatewayComputeResources();
-            for (GatewayResourceProfile gatewayResourceProfile : allGatewayComputeResources){
-                gatewayResourceProfile.addToComputeResourcePreferences(stampedeResourcePreferences);
-                gatewayResourceProfile.addToComputeResourcePreferences(trestlesResourcePreferences);
-                gatewayResourceProfile.addToComputeResourcePreferences(bigRedResourcePreferences);
-                airavata.updateGatewayResourceProfile(gatewayResourceProfile.getGatewayID(), gatewayResourceProfile);
+            for (GatewayResourceProfile gatewayResourceProfile : allGatewayComputeResources) {
+                for (String resourceId : loginNamesWithResourceIds.keySet()) {
+                    if (resourceId.contains("stampede")) {
+                        stampedeResourcePreferences = createComputeResourcePreference(resourceId, "TG-STA110014S", false, null,
+                                JobSubmissionProtocol.SSH, DataMovementProtocol.SCP, "/scratch/01437/ogce/gta-work-dirs", loginNamesWithResourceIds.get(resourceId));
+                        airavata.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), resourceId, stampedeResourcePreferences);
+                    }else if (resourceId.contains("trestles")){
+                        trestlesResourcePreferences = createComputeResourcePreference(resourceId, "sds128", false, null, JobSubmissionProtocol.SSH,
+                                DataMovementProtocol.SCP, "/oasis/scratch/trestles/ogce/temp_project/gta-work-dirs", loginNamesWithResourceIds.get(resourceId));
+                        airavata.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), resourceId, trestlesResourcePreferences);
+                    }else if (resourceId.contains("bigred2")){
+                        bigRedResourcePreferences = createComputeResourcePreference(resourceId, "TG-STA110014S", false, null, null, null,
+                                "/N/dc2/scratch/cgateway/gta-work-dirs", loginNamesWithResourceIds.get(resourceId));
+                        airavata.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), resourceId, bigRedResourcePreferences);
+                    }
+                }
             }
         } catch (TException e) {
             logger.error("Error occured while updating gateway resource profiles", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index 08ae052..16a2d88 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -101,9 +101,11 @@ public class ExperimentExecution {
         try {
             if (tokenMap != null && !tokenMap.isEmpty()){
                 for (String gatewayId : tokenMap.keySet()){
-                    String userName = "testUser_" + gatewayId;
-                    List<Project> allUserProjects = airavata.getAllUserProjects(gatewayId, userName);
-                    projectsMap.put(gatewayId, allUserProjects);
+                    if (!gatewayId.equals("php_reference_gateway")){
+                        String userName = "testUser_" + gatewayId;
+                        List<Project> allUserProjects = airavata.getAllUserProjects(gatewayId, userName);
+                        projectsMap.put(gatewayId, allUserProjects);
+                    }
                 }
             }
         } catch (AiravataSystemException e) {
@@ -224,8 +226,9 @@ public class ExperimentExecution {
                         if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
                             projectID = projectsPerGateway.get(0).getProjectID();
                         }
+                        String userName = "testUser_" + gatewayId;
                         Experiment simpleExperiment =
-                                ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Amber Experiment", "Amber Experiment run", appId, applicationInputs);
+                                ExperimentModelUtil.createSimpleExperiment(projectID, userName, "Amber Experiment", "Amber Experiment run", appId, applicationInputs);
                         simpleExperiment.setExperimentOutputs(appOutputs);
                         String experimentId;
                         Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
@@ -277,67 +280,70 @@ public class ExperimentExecution {
     public void createEchoExperiment () throws Exception{
         try {
             for (String gatewayId : csTokens.keySet()) {
-                String token = csTokens.get(gatewayId);
-                Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
-                for (String appId : appsWithNames.keySet()) {
-                    List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
-                    List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
-                    String appName = appsWithNames.get(appId);
-                    if (appName.equals(TestFrameworkConstants.AppcatalogConstants.ECHO_NAME)) {
-                        for (InputDataObjectType inputDataObjectType : applicationInputs) {
-                            if (inputDataObjectType.getName().equalsIgnoreCase("input_to_Echo")) {
-                                inputDataObjectType.setValue("Hello World !!!");
+                if (!gatewayId.equals("php_reference_gateway")){
+                    String token = csTokens.get(gatewayId);
+                    Map<String, String> appsWithNames = appInterfaceMap.get(gatewayId);
+                    for (String appId : appsWithNames.keySet()) {
+                        String appName = appsWithNames.get(appId);
+                        if (appName.equals(TestFrameworkConstants.AppcatalogConstants.ECHO_NAME)) {
+                            List<InputDataObjectType> applicationInputs = airavata.getApplicationInputs(appId);
+                            List<OutputDataObjectType> appOutputs = airavata.getApplicationOutputs(appId);
+                            for (InputDataObjectType inputDataObjectType : applicationInputs) {
+                                if (inputDataObjectType.getName().equalsIgnoreCase("input_to_Echo")) {
+                                    inputDataObjectType.setValue("Hello World !!!");
+                                }
                             }
-                        }
 
-                        List<Project> projectsPerGateway = projectsMap.get(gatewayId);
-                        String projectID = null;
-                        if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
-                            projectID = projectsPerGateway.get(0).getProjectID();
-                        }
-                        Experiment simpleExperiment =
-                                ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Echo Experiment", "Echo Experiment run", appId, applicationInputs);
-                        simpleExperiment.setExperimentOutputs(appOutputs);
-                        String experimentId;
-                        Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
-                        if (computeResources != null && computeResources.size() != 0) {
-                            for (String id : computeResources.keySet()) {
-                                String resourceName = computeResources.get(id);
-                                if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME)) {
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
-                                } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME)) {
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
-                                } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
-                                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
-                                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                                    userConfigurationData.setAiravataAutoSchedule(false);
-                                    userConfigurationData.setOverrideManualScheduledParams(false);
-                                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                                    experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
-                                    experimentsWithTokens.put(experimentId, token);
-                                    experimentsWithGateway.put(experimentId, gatewayId);
+                            List<Project> projectsPerGateway = projectsMap.get(gatewayId);
+                            String projectID = null;
+                            if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
+                                projectID = projectsPerGateway.get(0).getProjectID();
+                            }
+                            Experiment simpleExperiment =
+                                    ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Echo Experiment", "Echo Experiment run", appId, applicationInputs);
+                            simpleExperiment.setExperimentOutputs(appOutputs);
+                            String experimentId;
+                            Map<String, String> computeResources = airavata.getAvailableAppInterfaceComputeResources(appId);
+                            if (computeResources != null && computeResources.size() != 0) {
+                                for (String id : computeResources.keySet()) {
+                                    String resourceName = computeResources.get(id);
+                                    if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.TRESTLES_RESOURCE_NAME)) {
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.STAMPEDE_RESOURCE_NAME)) {
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    } else if (resourceName.equals(TestFrameworkConstants.AppcatalogConstants.BR2_RESOURCE_NAME)) {
+                                        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 4, 1, 1, "normal", 20, 0, 1, null);
+                                        UserConfigurationData userConfigurationData = new UserConfigurationData();
+                                        userConfigurationData.setAiravataAutoSchedule(false);
+                                        userConfigurationData.setOverrideManualScheduledParams(false);
+                                        userConfigurationData.setComputationalResourceScheduling(scheduling);
+                                        simpleExperiment.setUserConfigurationData(userConfigurationData);
+                                        experimentId = airavata.createExperiment(gatewayId, simpleExperiment);
+                                        experimentsWithTokens.put(experimentId, token);
+                                        experimentsWithGateway.put(experimentId, gatewayId);
+                                    }
                                 }
                             }
                         }
                     }
                 }
+
             }
         }catch (Exception e){
             logger.error("Error while creating Echo experiment", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
index 61e0101..93811a6 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/FrameworkBootstrapping.java
@@ -56,6 +56,8 @@ public class FrameworkBootstrapping {
                 setup.getGatewayRegister().registerSSHKeys();
                 logger.info("Registered SSH keys to each gateway...");
                 tokens = readTokens();
+                setup.getComputeResourceRegister().addComputeResources();
+                setup.getComputeResourceRegister().registerGatewayResourceProfile();
                 setup.getApplicationRegister().addApplications();
                 logger.info("Applications registered for each each gateway...");
                 experimentExecution = new ExperimentExecution(setup.getAiravata(), tokens);
@@ -70,15 +72,16 @@ public class FrameworkBootstrapping {
                 logger.info("Registered SSH keys to each gateway...");
                 tokens = readTokens();
                 setup.getComputeResourceRegister().addComputeResources();
+                setup.getComputeResourceRegister().registerGatewayResourceProfile();
                 setup.getApplicationRegister().addApplications();
                 logger.info("Applications registered for each each gateway...");
             }else if (expExec){
                 tokens = readTokens();
                 experimentExecution = new ExperimentExecution(setup.getAiravata(), tokens);
                 experimentExecution.createEchoExperiment();
-                experimentExecution.createAmberExperiment();
+//                experimentExecution.createAmberExperiment();
                 experimentExecution.launchExperiments();
-                experimentExecution.monitorExperiments();
+//                experimentExecution.monitorExperiments();
             }
         } catch (Exception e) {
             logger.error("Error occured while set up", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/526aa778/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
index ca5cce7..a3a1f2e 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/GatewayRegister.java
@@ -131,27 +131,29 @@ public class GatewayRegister {
             SSHCredentialWriter writer = new SSHCredentialWriter(dbUtil);
             List<Gateway> allGateways = airavata.getAllGateways();
             for (Gateway gateway : allGateways){
-                SSHCredential sshCredential = new SSHCredential();
-                sshCredential.setGateway(gateway.getGatewayId());
-                String token = TokenGenerator.generateToken(gateway.getGatewayId(), null);
-                sshCredential.setToken(token);
-                sshCredential.setPortalUserName("testuser");
-                FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
-                File filePri = new File(privateKeyPath);
-                byte[] bFilePri = new byte[(int) filePri.length()];
-                privateKeyStream.read(bFilePri);
-                FileInputStream pubKeyStream = new FileInputStream(pubKeyPath);
-                File filePub = new File(pubKeyPath);
-                byte[] bFilePub = new byte[(int) filePub.length()];
-                pubKeyStream.read(bFilePub);
-                privateKeyStream.close();
-                pubKeyStream.close();
-                sshCredential.setPrivateKey(bFilePri);
-                sshCredential.setPublicKey(bFilePub);
-                sshCredential.setPassphrase(keyPassword);
-                writer.writeCredentials(sshCredential);
-                tokenMap.put(gateway.getGatewayId(), token);
-                tokenWriter.println(gateway.getGatewayId() + ":" + token);
+                if (!gateway.getGatewayId().equals("php_reference_gateway")){
+                    SSHCredential sshCredential = new SSHCredential();
+                    sshCredential.setGateway(gateway.getGatewayId());
+                    String token = TokenGenerator.generateToken(gateway.getGatewayId(), null);
+                    sshCredential.setToken(token);
+                    sshCredential.setPortalUserName("testuser");
+                    FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
+                    File filePri = new File(privateKeyPath);
+                    byte[] bFilePri = new byte[(int) filePri.length()];
+                    privateKeyStream.read(bFilePri);
+                    FileInputStream pubKeyStream = new FileInputStream(pubKeyPath);
+                    File filePub = new File(pubKeyPath);
+                    byte[] bFilePub = new byte[(int) filePub.length()];
+                    pubKeyStream.read(bFilePub);
+                    privateKeyStream.close();
+                    pubKeyStream.close();
+                    sshCredential.setPrivateKey(bFilePri);
+                    sshCredential.setPublicKey(bFilePub);
+                    sshCredential.setPassphrase(keyPassword);
+                    writer.writeCredentials(sshCredential);
+                    tokenMap.put(gateway.getGatewayId(), token);
+                    tokenWriter.println(gateway.getGatewayId() + ":" + token);
+                }
             }
             tokenWriter.close();
         } catch (ClassNotFoundException e) {


[05/12] airavata git commit: Updating Airavata to use Java 8 - AIRAVATA-1658

Posted by sh...@apache.org.
Updating Airavata to use Java 8 - AIRAVATA-1658


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

Branch: refs/heads/emailMonitoring
Commit: 28043f51af7d8ce85f79d10c07ef156ed9d34d03
Parents: d61d33e
Author: Suresh Marru <sm...@apache.org>
Authored: Sun Apr 5 23:36:23 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Sun Apr 5 23:36:23 2015 -0400

----------------------------------------------------------------------
 .../airavata-cpp-sdk/pom.xml                    |  1 -
 .../airavata-php-sdk/pom.xml                    |  1 -
 .../airavata-python-sdk/pom.xml                 |  1 -
 modules/commons/utils/pom.xml                   |  6 +-
 modules/distribution/client/java/pom.xml        | 26 -------
 modules/distribution/release/pom.xml            |  1 -
 modules/distribution/server/pom.xml             | 20 ------
 modules/distribution/xbaya-gui/pom.xml          | 18 -----
 modules/integration-tests/pom.xml               | 12 ----
 modules/messaging/client/pom.xml                |  9 ---
 modules/orchestrator/orchestrator-core/pom.xml  | 19 -----
 modules/workflow-model/workflow-engine/pom.xml  |  5 --
 modules/xbaya-gui/pom.xml                       | 32 ---------
 pom.xml                                         | 76 ++++----------------
 samples/java-client/experiment/pom.xml          | 12 ----
 tools/gsissh-cli-tools/pom.xml                  | 56 ---------------
 tools/gsissh/pom.xml                            |  8 ---
 17 files changed, 15 insertions(+), 288 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
index 7243c36..b21d9db 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/pom.xml
@@ -106,7 +106,6 @@
         <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-client-cpp-sdk</archive.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>
         <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
         <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
index 7754333..7c614c7 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/pom.xml
@@ -106,7 +106,6 @@
         <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-php-sdk</archive.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>
         <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
         <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml b/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
index 9f5c1ae..bf53fce 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/pom.xml
@@ -106,7 +106,6 @@
         <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archive.name>apache-airavata-client-python-sdk</archive.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
         <airavata.client-dist.name>${archive.name}-${project.version}</airavata.client-dist.name>
         <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
         <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/commons/utils/pom.xml
----------------------------------------------------------------------
diff --git a/modules/commons/utils/pom.xml b/modules/commons/utils/pom.xml
index 5514364..44d7465 100644
--- a/modules/commons/utils/pom.xml
+++ b/modules/commons/utils/pom.xml
@@ -60,11 +60,7 @@
             <artifactId>xsul5</artifactId>
             <version>${xsul5.version}</version>
         </dependency> 
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-            <version>${axis2.version}</version>
-        </dependency> -->
+ -->
         <dependency>
             <groupId>commons-dbcp</groupId>
             <artifactId>commons-dbcp</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/distribution/client/java/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/client/java/pom.xml b/modules/distribution/client/java/pom.xml
index 9db0b4d..01ba905 100644
--- a/modules/distribution/client/java/pom.xml
+++ b/modules/distribution/client/java/pom.xml
@@ -164,16 +164,6 @@
             <version>${xmlbeans.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
             <version>1.2.8</version>
@@ -198,16 +188,6 @@
             <artifactId>neethi</artifactId>
             <version>2.0.4</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-local</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-http</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
 
         <!-- AMAZON STUFFS -->
         <dependency>
@@ -323,11 +303,6 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>${jcr.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derbyclient</artifactId>
             <version>${derby.version}</version>
@@ -373,7 +348,6 @@
         <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archieve.name>apache-airavata-client</archieve.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
         <airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>
         <airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
         <airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/distribution/release/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/release/pom.xml b/modules/distribution/release/pom.xml
index bd03bc3..f3f9291 100644
--- a/modules/distribution/release/pom.xml
+++ b/modules/distribution/release/pom.xml
@@ -112,7 +112,6 @@
         <grizzly.version>2.0.0-M3</grizzly.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archieve.name>apache-airavata-client</archieve.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
 		<airavata.client-dist.name>${archieve.name}-${project.version}</airavata.client-dist.name>
 		<airavata.client-bin.zip>${project.build.directory}/${airavata.client-dist.name}-bin.zip</airavata.client-bin.zip>
 		<airavata.client-bin.tar.gz>${project.build.directory}/${airavata.client-dist.name}-bin.tar.gz</airavata.client-bin.tar.gz>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/distribution/server/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml
index f666428..dc25dd7 100644
--- a/modules/distribution/server/pom.xml
+++ b/modules/distribution/server/pom.xml
@@ -169,18 +169,6 @@
 			<artifactId>log4j</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>javax.jcr</groupId>
-			<artifactId>jcr</artifactId>
-			<version>${jcr.version}</version>
-		</dependency>
-		<!-- dependency> <groupId>org.ogce</groupId> <artifactId>xpp3</artifactId> 
-			<version>${xpp3.version}</version> </dependency> <dependency> <groupId>org.ogce</groupId> 
-			<artifactId>xpp5</artifactId> <version>${xpp5.version}</version> </dependency> 
-			<dependency> <groupId>org.ogce</groupId> <artifactId>xsul</artifactId> <version>${xsul.version}</version> 
-			</dependency> <dependency> <groupId>org.ogce</groupId> <artifactId>gpel-client</artifactId> 
-			<version>${gpel.version}</version> </dependency> <dependency> <groupId>org.python</groupId> 
-			<artifactId>jython</artifactId> <version>${jython.version}</version> </dependency> -->
-		<dependency>
 			<groupId>com.amazonaws</groupId>
 			<artifactId>aws-java-sdk</artifactId>
 			<version>1.9.0</version>
@@ -196,9 +184,6 @@
 			<artifactId>jets3t</artifactId>
 			<version>0.8.0</version>
 		</dependency>
-		<!-- dependency> <groupId>org.ogce</groupId> <artifactId>atomixmiser</artifactId> 
-			<version>${atomixmiser.version}</version> </dependency> <dependency> <groupId>org.ogce</groupId> 
-			<artifactId>yfilter</artifactId> <version>${yfilter.version}</version> </dependency> -->
 		<dependency>
 			<groupId>commons-collections</groupId>
 			<artifactId>commons-collections</artifactId>
@@ -645,14 +630,9 @@
 		<grizzly.version>2.0.0-M3</grizzly.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<archieve.name>apache-airavata-server</archieve.name>
-		<used.axis2.release>${axis2.version}</used.axis2.release>
 		<airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name>
 		<airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir>
 		<airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip>
 		<airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz>
-		<airavata.webapp.dir>${project.build.directory}/airavata-axis2</airavata.webapp.dir>
-		<!--airavata.war.dir>${project.build.directory}/test</airavata.war.dir> 
-			<airavata.webapp.war.zip>${project.build.directory}/${airavata.dist.name}.war.zip</airavata.webapp.war.zip> 
-			<airavata.webapp.war.tar.gz>${project.build.directory}/${airavata.dist.name}.war.tar.gz</airavata.webapp.war.tar.gz -->
 	</properties>
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/distribution/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/xbaya-gui/pom.xml b/modules/distribution/xbaya-gui/pom.xml
index 80a0c4f..2255b33 100644
--- a/modules/distribution/xbaya-gui/pom.xml
+++ b/modules/distribution/xbaya-gui/pom.xml
@@ -55,24 +55,6 @@
 							</execution>
 						</executions>
 					</plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <encoding>UTF-8</encoding>
-                            <source>1.6</source>
-                            <target>1.6</target>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <id>default</id>
-                                <phase>compile</phase>
-                                <goals>
-                                    <goal>compile</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
 				    <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-assembly-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index ebe70aa..3a363df 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -269,18 +269,6 @@
         <cert />
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <archieve.name>apache-airavata</archieve.name>
-        <used.axis2.release>${axis2.version}</used.axis2.release>
-        <major.tomcat.version>7</major.tomcat.version>
-        <cargo.debug.address>8000</cargo.debug.address>
-        <cargo.debug.suspend>y</cargo.debug.suspend>
-        <test.running.port>8080</test.running.port>
-        <tomcat.extract.dir>${project.build.directory}</tomcat.extract.dir>
-        <tomcat.work.dir>${tomcat.extract.dir}/apache-tomcat-${tomcat.version}</tomcat.work.dir>
-        <local.tomcat.distribution>
-            ${settings.localRepository}/org/apache/airavata/integration/tomcat/apache-tomcat/${tomcat.version}/apache-tomcat-${tomcat.version}.zip
-        </local.tomcat.distribution>
-
-
         <airavata.executable>airavata-server.sh</airavata.executable>
         <airavata.server.name>apache-airavata-server</airavata.server.name>
         <airavata.server.start.spawn>true</airavata.server.start.spawn>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/messaging/client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/messaging/client/pom.xml b/modules/messaging/client/pom.xml
index 5db9d4d..8523807 100644
--- a/modules/messaging/client/pom.xml
+++ b/modules/messaging/client/pom.xml
@@ -67,15 +67,6 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-            <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
                     <archive>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 99c0abb..b9d26f5 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -128,24 +128,5 @@ the License. -->
         	<version>${zk.version}</version>
         </dependency>
     </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-        </plugins>
-        <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
-        <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
-        <testResources>
-            <testResource>
-                <directory>${project.basedir}/src/test/resources</directory>
-            </testResource>
-        </testResources>
-    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml
index a136ae7..7de0b8d 100644
--- a/modules/workflow-model/workflow-engine/pom.xml
+++ b/modules/workflow-model/workflow-engine/pom.xml
@@ -287,11 +287,6 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>${jcr.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-workflow-execution-context</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index 64eb014..9589084 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -146,16 +146,6 @@
             <version>${xmlbeans.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-kernel</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
             <version>1.2.8</version>
@@ -180,16 +170,6 @@
             <artifactId>neethi</artifactId>
             <version>2.0.4</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-local</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-http</artifactId>
-            <version>${axis2.version}</version>
-        </dependency>
 
         <!-- AMAZON STUFFS -->
         <dependency>
@@ -247,11 +227,6 @@
 
         <!-- JCR Support -->
         <!-- TODO need clean up -->
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-gfac-schema-utils</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-gfac-core</artifactId>
@@ -277,17 +252,10 @@
             <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>${jcr.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-workflow-execution-context</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-jpa-registry</artifactId> <version>${project.version}</version> 
-            </dependency -->
         <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derbyclient</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fdad93a..e723b9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>org.apache</groupId>
 		<artifactId>apache</artifactId>
-		<version>14</version>
+		<version>16</version>
 	</parent>
 
 	<groupId>org.apache.airavata</groupId>
@@ -69,14 +69,13 @@
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 		<axis2.version>1.5.1</axis2.version>
-		<derby.version>10.9.1.0</derby.version>
-		<org.slf4j.version>1.7.6</org.slf4j.version>
-		<log4j.version>1.2.16</log4j.version>
+		<derby.version>10.11.1.1</derby.version>
+		<org.slf4j.version>1.7.10</org.slf4j.version>
+		<log4j.version>1.2.17</log4j.version>
 		<axiom.version>1.2.8</axiom.version>
-		<surefire.version>2.12</surefire.version>
-		<junit.version>4.7</junit.version>
+		<surefire.version>2.18.1</surefire.version>
+		<junit.version>4.12</junit.version>
 		<curator.version>2.7.1</curator.version>
-		<jcr.version>2.0</jcr.version>
 		<xmlbeans.version>2.5.0</xmlbeans.version>
 		<xpp3.version>1.1.6</xpp3.version>
 		<xpp5.version>1.2.8</xpp5.version>
@@ -90,12 +89,12 @@
 		<tomcat.version>7.0.41</tomcat.version>
 		<cargo.version>1.3.1</cargo.version>
 		<oa4mp.version>1.1.3</oa4mp.version>
-		<antrun.version>1.7</antrun.version>
+		<antrun.version>1.8</antrun.version>
 		<bouncy.castle.version>1.50</bouncy.castle.version>
 		<jglobus.version>2.1.0</jglobus.version>
 		<ebay.cors.filter>1.0.0</ebay.cors.filter>
 		<thrift.version>0.9.1</thrift.version>
-		<mysql.connector.version>5.1.31</mysql.connector.version>
+		<mysql.connector.version>5.1.34</mysql.connector.version>
 		<skipTests>false</skipTests>
         <google.gson.version>2.3</google.gson.version>
 		<zk.version>3.4.0</zk.version>
@@ -489,8 +488,8 @@
 						<artifactId>maven-compiler-plugin</artifactId>
 						<version>3.1</version>
 						<configuration>
-							<source>1.6</source>
-							<target>1.6</target>
+							<source>1.8</source>
+							<target>1.8</target>
 						</configuration>
 					</plugin>
 					<plugin>
@@ -582,8 +581,8 @@
 						<artifactId>maven-compiler-plugin</artifactId>
 						<version>3.1</version>
 						<configuration>
-							<source>1.6</source>
-							<target>1.6</target>
+							<source>1.8</source>
+							<target>1.8</target>
 						</configuration>
 					</plugin>
 					<plugin>
@@ -622,53 +621,6 @@
 				<module>modules/integration-tests</module>
 			</modules>
 		</profile>
-		<!--profile> <id>ec2Tests</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-			<artifactId>maven-remote-resources-plugin</artifactId> <executions> <execution> 
-			<goals> <goal>process</goal> </goals> </execution> </executions> </plugin> 
-			<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> 
-			<executions> <execution> <id>copy-resources</id> <phase>validate</phase> 
-			<goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target/classes/META-INF</outputDirectory> 
-			<resources> <resource> <directory>${basedir}/src/main/assembly/dist</directory> 
-			<filtering>true</filtering> </resource> </resources> </configuration> </execution> 
-			</executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-			<artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> 
-			<source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> 
-			<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> 
-			<version>${surefire.version}</version> <configuration> <failIfNoTests>false</failIfNoTests> 
-			<skipTests>${skipTests}</skipTests> <workingDirectory>${project.build.testOutputDirectory}</workingDirectory> 
-			<excludes> <exclude>**/IT.java</exclude> </excludes> <includes> <include>**/*TestEC2Auth.java</include> 
-			</includes> </configuration> </plugin> </plugins> </build> <activation> <activeByDefault>true</activeByDefault> 
-			</activation> <modules> <module>airavata-api</module> <module>modules/gfac</module> 
-			<module>modules/ws-messenger</module> <module>modules/workflow-model</module> 
-			<module>modules/commons</module> <module>modules/registry</module> <module>modules/airavata-client</module> 
-			<module>modules/security</module> <module>modules/credential-store</module> 
-			<module>modules/orchestrator</module> <module>tools</module> <module>modules/server</module> 
-			<module>modules/test-suite</module> <module>modules/distribution</module> 
-			<module>modules/integration-tests</module> </modules> </profile> <profile> 
-			<id>allHpcTests</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-			<artifactId>maven-remote-resources-plugin</artifactId> <executions> <execution> 
-			<goals> <goal>process</goal> </goals> </execution> </executions> </plugin> 
-			<plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.5</version> 
-			<executions> <execution> <id>copy-resources</id> <phase>validate</phase> 
-			<goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target/classes/META-INF</outputDirectory> 
-			<resources> <resource> <directory>${basedir}/src/main/assembly/dist</directory> 
-			<filtering>true</filtering> </resource> </resources> </configuration> </execution> 
-			</executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-			<artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> 
-			<source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> 
-			<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> 
-			<version>${surefire.version}</version> <configuration> <failIfNoTests>false</failIfNoTests> 
-			<skipTests>${skipTests}</skipTests> <workingDirectory>${project.build.testOutputDirectory}</workingDirectory> 
-			<excludes> <exclude>**/IT.java</exclude> </excludes> <includes> <include>**/*TestWithMyProxyAuth.java</include> 
-			<include>**/*TestWithSSHAuth.java</include> <include>**/*TestWithEC2Auth.java</include> 
-			</includes> </configuration> </plugin> </plugins> </build> <activation> <activeByDefault>true</activeByDefault> 
-			</activation> <modules> <module>airavata-api</module> <module>modules/gfac</module> 
-			<module>modules/ws-messenger</module> <module>modules/workflow-model</module> 
-			<module>modules/commons</module> <module>modules/registry</module> <module>modules/airavata-client</module> 
-			<module>modules/security</module> <module>modules/credential-store</module> 
-			<module>modules/orchestrator</module> <module>tools</module> <module>modules/server</module> 
-			<module>modules/test-suite</module> <module>modules/distribution</module> 
-			<module>modules/integration-tests</module> </modules> </profile -->
 		<profile>
 			<id>pedantic</id>
 			<build>
@@ -678,8 +630,8 @@
 						<artifactId>maven-compiler-plugin</artifactId>
 						<version>3.1</version>
 						<configuration>
-							<source>1.6</source>
-							<target>1.6</target>
+							<source>1.8</source>
+							<target>1.8</target>
 						</configuration>
 					</plugin>
 					<plugin>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/samples/java-client/experiment/pom.xml
----------------------------------------------------------------------
diff --git a/samples/java-client/experiment/pom.xml b/samples/java-client/experiment/pom.xml
index 8e2e414..1ed25f0 100644
--- a/samples/java-client/experiment/pom.xml
+++ b/samples/java-client/experiment/pom.xml
@@ -35,18 +35,6 @@
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-webapp</artifactId>
-            <version>${axis2.version}</version>
-            <type>war</type>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-jpa-registry</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/tools/gsissh-cli-tools/pom.xml
----------------------------------------------------------------------
diff --git a/tools/gsissh-cli-tools/pom.xml b/tools/gsissh-cli-tools/pom.xml
index ee09a1d..7f7b729 100644
--- a/tools/gsissh-cli-tools/pom.xml
+++ b/tools/gsissh-cli-tools/pom.xml
@@ -96,65 +96,9 @@
 
 	</dependencies>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>xmlbeans-maven-plugin</artifactId>
-				<version>2.3.3</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>xmlbeans</goal>
-						</goals>
-					</execution>
-				</executions>
-				<inherited>true</inherited>
-				<configuration>
-					<schemaDirectory>src/main/resources/schemas</schemaDirectory>
-					<xmlConfigs>
-						<xmlConfig implementation="java.io.File">src/main/resources/schemas/gsissh-schemas.xsdconfig
-						</xmlConfig>
-					</xmlConfigs>
-					<outputJar>target/generated/${project.artifactId}-${project.version}.jar</outputJar>
-				</configuration>
-			</plugin>
-			<plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <executions>
-                <execution>
-                    <id>copy-dependencies</id>
-                    <phase>prepare-package</phase>
-                    <goals>
-                        <goal>copy-dependencies</goal>
-                    </goals>
-                    <configuration>
-                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                        <overWriteReleases>false</overWriteReleases>
-                        <overWriteSnapshots>false</overWriteSnapshots>
-                        <overWriteIfNewer>true</overWriteIfNewer>
-                    </configuration>
-                </execution>
-            </executions>
-        </plugin>
-		</plugins>
-	</build>
 
 	<properties>
 		<jglobus.version>2.0.6</jglobus.version>
-		<surefire.version>2.12</surefire.version>
-		<junit.version>4.7</junit.version>
-		<log4j.version>1.2.17</log4j.version>
-		<org.slf4j.version>1.7.2</org.slf4j.version>
 		<skipTests>false</skipTests>
 		<xmlbeans.version>2.5.0</xmlbeans.version>
 	</properties>

http://git-wip-us.apache.org/repos/asf/airavata/blob/28043f51/tools/gsissh/pom.xml
----------------------------------------------------------------------
diff --git a/tools/gsissh/pom.xml b/tools/gsissh/pom.xml
index 4ccc340..7976490 100644
--- a/tools/gsissh/pom.xml
+++ b/tools/gsissh/pom.xml
@@ -113,14 +113,6 @@
 	<build>
 		<plugins>
 			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
 				<groupId>org.codehaus.mojo</groupId>
 				<artifactId>xmlbeans-maven-plugin</artifactId>
 				<version>2.3.3</version>