airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [07/12] airavata git commit: more fixes to test framework - AIRAVATA-1652
Date Wed, 08 Apr 2015 02:32:06 GMT
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 <kamalasini@gmail.com>
Authored: Mon Apr 6 22:39:48 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@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) {


Mime
View raw message