Author: lahiru
Date: Mon Oct 14 16:56:56 2013
New Revision: 1531976

URL: http://svn.apache.org/r1531976
Log:
changing host.xml reading and adding bigred2 and other hosts as default hosts.

Modified:
    
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/airavata-server.properties
    
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/host.xml
    
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java

Modified: 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/airavata-server.properties
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/airavata-server.properties?rev=1531976&r1=1531975&r2=1531976&view=diff
==============================================================================
--- 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/airavata-server.properties
 (original)
+++ 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/airavata-server.properties
 Mon Oct 14 16:56:56 2013
@@ -102,10 +102,20 @@ myproxy.life=3600
 # XSEDE Trusted certificates can be downloaded from 
https://software.xsede.org/security/xsede-certs.tar.gz
 trusted.cert.location=/path/to/trusted/certificates
 
-# SSH PKI key pair is SSH based authentication is used.
-#ssh.key=/home/user/.ssh/id_rsa
-#ssh.keypass=
-#ssh.username=usernameAtHost
+# SSH PKI key pair or ssh password can be used SSH based authentication is 
used.
+
+################# ---------- For ssh key pair authentication 
------------------- ################
+#public.ssh.key=/path to public key for ssh
+#ssh.username=username for ssh connection
+#private.ssh.key=/path to private key file for ssh
+#ssh.keypass=passphrase for the private key
+
+
+################# ---------- For ssh key pair authentication 
------------------- ################
+#ssh.username=username for ssh connection
+#ssh.password=Password for ssh connection
+
+
 
 ###########################################################################
 # Airavata Message Broker Basic Configurations.

Modified: 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/host.xml
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/host.xml?rev=1531976&r1=1531975&r2=1531976&view=diff
==============================================================================
--- 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/host.xml
 (original)
+++ 
airavata/trunk/modules/distribution/airavata-server/src/main/resources/conf/host.xml
 Mon Oct 14 16:56:56 2013
@@ -14,6 +14,7 @@
 
 <servers>
     <server>
+        <type>local</type>
         <name>LocalHost</name>
         <host>127.0.0.1</host>
     </server>
@@ -32,33 +33,59 @@
         
<gridftp.endpoint>gsiftp://gridftp-forge.ncsa.xsede.org:2811/</gridftp.endpoint>
     </server>
        -->
-     <server>
-        <name>lonestar</name>
+    <server>
+        <name>globus-lonestar</name>
+        <type>globus</type>
         <host>lonestar4.tacc.teragrid.org</host>
         
<gram.endpoint>gridftp1.ls4.tacc.utexas.edu:2119/jobmanager-sge</gram.endpoint>
         
<gridftp.endpoint>gsiftp://gridftp1.ls4.tacc.utexas.edu:2811/</gridftp.endpoint>
     </server>
 
-     <server>
-        <name>stampede</name>
+    <server>
+        <type>globus</type>
+        <name>globus-stampede</name>
         <host>stampede.tacc.utexas.edu</host>
         
<gram.endpoint>login5.stampede.tacc.utexas.edu:2119/jobmanager-slurm3</gram.endpoint>
         
<gridftp.endpoint>gsiftp://data1.stampede.tacc.utexas.edu:2811/</gridftp.endpoint>
     </server>
 
-     <server>
-        <name>trestles</name>
+    <server>
+        <type>globus</type>
+        <name>globus-trestles</name>
         <host>trestles.sdsc.edu</host>
         
<gram.endpoint>trestles-login2.sdsc.edu:2119/jobmanager-pbstest2</gram.endpoint>
         
<gridftp.endpoint>gsiftp://trestles-dm1.sdsc.edu:2811/</gridftp.endpoint>
     </server>
-    
-<!--     
-     <server>
-        <name>kraken</name>
-        <host>gsissh.kraken.nics.xsede.org</host>
-        <gram.endpoint>grid.nics.xsede.org:2119/jobmanager-pbs</gram.endpoint>
-        
<gridftp.endpoint>gsiftp://gridftp.kraken.nics.xsede.org:2811/</gridftp.endpoint>
-    </server> -->
+    <server>
+        <type>ssh</type>
+        <name>bigred2</name>
+        <host>bigred2.uits.iu.edu</host>
+        <hpc.resource>true</hpc.resource>
+    </server>
+
+  <server>
+        <name>gsissh-lonestar</name>
+        <type>gsissh</type>
+        <host>lonestar4.tacc.teragrid.org</host>
+    </server>
+
+    <server>
+        <type>gsissh</type>
+        <name>gsissh-stampede</name>
+        <host>stampede.tacc.utexas.edu</host>
+    </server>
+
+    <server>
+        <type>gsissh</type>
+        <name>gsissh-trestles</name>
+        <host>trestles.sdsc.edu</host>
+    </server>
+    <!--
+    <server>
+       <name>kraken</name>
+       <host>gsissh.kraken.nics.xsede.org</host>
+       <gram.endpoint>grid.nics.xsede.org:2119/jobmanager-pbs</gram.endpoint>
+       
<gridftp.endpoint>gsiftp://gridftp.kraken.nics.xsede.org:2811/</gridftp.endpoint>
+   </server> -->
 
 </servers>

Modified: 
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
URL: 
http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java?rev=1531976&r1=1531975&r2=1531976&view=diff
==============================================================================
--- 
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
 (original)
+++ 
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
 Mon Oct 14 16:56:56 2013
@@ -49,7 +49,9 @@ import org.apache.airavata.common.utils.
 import 
org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
+import org.apache.airavata.schemas.gfac.GsisshHostType;
 import org.apache.airavata.schemas.gfac.HostDescriptionType;
+import org.apache.airavata.schemas.gfac.SSHHostType;
 import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
@@ -117,7 +119,7 @@ public class WorkflowInterpretorSkeleton
        protected static final String JCR_REG = "jcr_registry";
 
        protected WIServiceThread thread;
-    
+
     private AiravataAPI getAiravataAPI(){
         if (airavataAPI==null) {
                        try {
@@ -140,7 +142,7 @@ public class WorkflowInterpretorSkeleton
        }
        return interactor;
     }
-    
+
     public void startUp(final ConfigurationContext configctx, AxisService 
service) {
        AiravataUtils.setExecutionAsServer();
        new Thread(){
@@ -177,7 +179,7 @@ public class WorkflowInterpretorSkeleton
                             e.printStackTrace();
                         } catch (AiravataAPIInvocationException e) {
                                    e.printStackTrace();
-                               
+
                         }
                     }else{
                                provenance = false;
@@ -193,7 +195,7 @@ public class WorkflowInterpretorSkeleton
                            }else{
                                gfacEmbeddedMode = false;
                            }
-                     
+
                      //save the interpreter service url in context
                     String localAddress = 
ServiceUtils.generateServiceURLFromConfigurationContext(configctx,SERVICE_NAME);
                                        configctx.setProperty(SERVICE_URL,new 
URI(localAddress));
@@ -215,7 +217,7 @@ public class WorkflowInterpretorSkeleton
        }.start();
 
     }
-    
+
     public void suspendWorkflow(String experimentId)throws Exception{
        if (workflowConfigurations.containsKey(experimentId)){
                if 
(getInteractor().isExecutionPaused(workflowConfigurations.get(experimentId))){
@@ -228,13 +230,13 @@ public class WorkflowInterpretorSkeleton
                throw new Exception("Invalid Experiment id: Experiment 
"+experimentId+" not running");
        }
     }
-    
+
     public void resumeWorkflow(String experimentId)throws Exception{
        if (workflowConfigurations.containsKey(experimentId)){
                if 
(getInteractor().isExecutionPaused(workflowConfigurations.get(experimentId)) || 
workflowConfigurations.get(experimentId).getWorkflow().getExecutionState()==WorkflowExecutionState.STOPPED){
                        log.info("Resuming workflow execution 
"+experimentId+"...");
                        
getInteractor().resumeExecution(workflowConfigurations.get(experimentId));
-                       
+
                }else{
                        throw new Exception("Experiment '"+experimentId+"' is 
not suspended!!!");
                }
@@ -243,7 +245,7 @@ public class WorkflowInterpretorSkeleton
                throw new Exception("Invalid Experiment id: Experiment 
"+experimentId+" not running");
        }
     }
-    
+
     public void haltWorkflow(String experimentId)throws Exception{
        if (workflowConfigurations.containsKey(experimentId)){
                        log.info("Terminating workflow execution 
"+experimentId+"...");
@@ -252,7 +254,7 @@ public class WorkflowInterpretorSkeleton
                throw new Exception("Invalid Experiment id: Experiment 
"+experimentId+" not running");
        }
     }
-    
+
     /**
      *
      * @param workflowAsString
@@ -347,7 +349,7 @@ public class WorkflowInterpretorSkeleton
        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(BROKER, 
getAiravataAPI().getAiravataManager().getEventingServiceURL().toASCIIString());
         configuration.put(MSGBOX, 
getAiravataAPI().getAiravataManager().getMessageBoxServiceURL().toASCIIString());
-        
+
        return setupAndLaunch(workflowAsString, experimentId, gatewayId, 
username, inputData.toArray(new NameValue[]{}), configuration, inNewThread, 
builder);
     }
     private String setupAndLaunch(String workflowAsString, String topic, 
String gatewayId, String username,
@@ -413,7 +415,7 @@ public class WorkflowInterpretorSkeleton
 
         final WorkflowInterpretorEventListener finalListener = listener;
         conf.setAiravataAPI(getAiravataAPI());
-       
+
         final WorkflowInterpreter finalInterpreter = interpreter;
 //        interpreter.setActOnProvenance(provenance);
         interpreter.setProvenanceWriter(runner);
@@ -528,15 +530,24 @@ public class WorkflowInterpretorSkeleton
         StAXOMBuilder builder = new StAXOMBuilder(reader);
         OMElement documentElement = builder.getDocumentElement();
         Iterator<?> server = documentElement.getChildrenWithName(new 
QName("server"));
+        HostDescription hostDescription = new HostDescription();
         while (server.hasNext()) {
             OMElement next = (OMElement) server.next();
-            HostDescription hostDescription;
-            if (next.getFirstChildWithName(new QName("gram.endpoint")) != 
null) {
-                hostDescription = new HostDescription(GlobusHostType.type);
+            if (next.getFirstChildWithName(new QName("gram.endpoint")) != null 
&&
+                    "globus".equals(next.getFirstChildWithName(new 
QName("type")).getText())) {
+                hostDescription.getType().changeType(GlobusHostType.type);
                 ((GlobusHostType) 
hostDescription.getType()).addGlobusGateKeeperEndPoint(next.getFirstChildWithName(new
 QName("gram.endpoint")).getText());
                 ((GlobusHostType) 
hostDescription.getType()).addGridFTPEndPoint(next.getFirstChildWithName(new 
QName("gridftp.endpoint")).getText());
-            } else {
-                hostDescription = new 
HostDescription(HostDescriptionType.type);
+            } else if("ssh".equals(next.getFirstChildWithName(new 
QName("type")).getText())) {
+                hostDescription.getType().changeType(SSHHostType.type);
+                if(next.getFirstChildWithName(new QName("hpc.resource")) != 
null){
+                    if("true".equals(next.getFirstChildWithName(new 
QName("gram.endpoint")))){
+                        ((SSHHostType) 
hostDescription.getType()).setHpcResource(true);
+                    }
+                }
+                ((SSHHostType) 
hostDescription.getType()).setHpcResource(false);
+            } else if("gsissh".equals(next.getFirstChildWithName(new 
QName("type")).getText())) {
+                hostDescription.getType().changeType(GsisshHostType.type);
             }
             
(hostDescription.getType()).setHostName(next.getFirstChildWithName(new 
QName("name")).getText());
             
(hostDescription.getType()).setHostAddress(next.getFirstChildWithName(new 
QName("host")).getText());


Reply via email to