airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: completing initial test framework - AIRAVATA-1652
Date Tue, 07 Apr 2015 19:10:10 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 05bb24d9e -> 16700506e


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/master
Commit: 16700506e7d183808ac8365adb35e660b772fe93
Parents: 05bb24d
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Apr 7 15:10:03 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@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{


Mime
View raw message