Author: samindaw
Date: Thu Dec 20 20:47:37 2012
New Revision: 1424696
URL: http://svn.apache.org/viewvc?rev=1424696&view=rev
Log:
moving phoebus code to a different maven module
Added:
airavata/trunk/tools/phoebus-integration/
airavata/trunk/tools/phoebus-integration/pom.xml
airavata/trunk/tools/phoebus-integration/src/
airavata/trunk/tools/phoebus-integration/src/main/
airavata/trunk/tools/phoebus-integration/src/main/java/
airavata/trunk/tools/phoebus-integration/src/main/java/org/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/PhoebusGridConfigurationHandler.java
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java
airavata/trunk/tools/phoebus-integration/src/main/resources/
airavata/trunk/tools/phoebus-integration/src/main/resources/service.properties
airavata/trunk/tools/pom.xml
Removed:
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java
Modified:
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/GFacConfiguration.java
airavata/trunk/pom.xml
Modified:
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/GFacConfiguration.java
URL:
http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/GFacConfiguration.java?rev=1424696&r1=1424695&r2=1424696&view=diff
==============================================================================
---
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/GFacConfiguration.java
(original)
+++
airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/context/GFacConfiguration.java
Thu Dec 20 20:47:37 2012
@@ -24,6 +24,8 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.common.exception.ServerSettingsException;
+import org.apache.airavata.common.exception.UnspecifiedServerSettingsException;
import org.apache.airavata.common.utils.ServerSettings;
import org.apache.airavata.core.gfac.external.GridConfigurationHandler;
import org.slf4j.Logger;
@@ -50,17 +52,23 @@ public class GFacConfiguration {
static{
gridConfigurationHandlers=new ArrayList<GridConfigurationHandler>();
- String handlerString = ServerSettings.getSetting(GRID_HANDLERS, null);
- String[] handlers = handlerString.split(",");
- for (String handlerClass : handlers) {
- try {
- @SuppressWarnings("unchecked")
- Class<GridConfigurationHandler> classInstance =
(Class<GridConfigurationHandler>) GFacConfiguration.class
-
.getClassLoader().loadClass(handlerClass);
-
gridConfigurationHandlers.add(classInstance.newInstance());
- } catch (Exception e) {
- log.error("Error while loading Grid
Configuration Handler class "+handlerClass, e);
+ try {
+ String handlerString =
ServerSettings.getSetting(GRID_HANDLERS);
+ String[] handlers = handlerString.split(",");
+ for (String handlerClass : handlers) {
+ try {
+ @SuppressWarnings("unchecked")
+ Class<GridConfigurationHandler>
classInstance = (Class<GridConfigurationHandler>) GFacConfiguration.class
+
.getClassLoader().loadClass(handlerClass);
+
gridConfigurationHandlers.add(classInstance.newInstance());
+ } catch (Exception e) {
+ log.error("Error while loading Grid
Configuration Handler class "+handlerClass, e);
+ }
}
+ } catch (UnspecifiedServerSettingsException e) {
+ //no handlers defined
+ } catch (ServerSettingsException e1) {
+ log.error("Error in reading Configuration handler
data!!!",e1);
}
}
Modified: airavata/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/airavata/trunk/pom.xml?rev=1424696&r1=1424695&r2=1424696&view=diff
==============================================================================
--- airavata/trunk/pom.xml (original)
+++ airavata/trunk/pom.xml Thu Dec 20 20:47:37 2012
@@ -421,10 +421,11 @@
<module>modules/airavata-client</module>
<module>modules/security</module>
<module>modules/rest</module>
+ <module>tools</module>
<module>samples/simple-math-service</module>
<module>samples/complex-math-service</module>
<module>samples/levenshtein-distance-service</module>
- <module>modules/server</module>
+ <module>modules/server</module>
<module>modules/distribution</module>
<module>modules/test-suite</module>
<module>modules/integration-tests</module>
Added: airavata/trunk/tools/phoebus-integration/pom.xml
URL:
http://svn.apache.org/viewvc/airavata/trunk/tools/phoebus-integration/pom.xml?rev=1424696&view=auto
==============================================================================
--- airavata/trunk/tools/phoebus-integration/pom.xml (added)
+++ airavata/trunk/tools/phoebus-integration/pom.xml Thu Dec 20 20:47:37 2012
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-tools-parent</artifactId>
+ <version>0.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>airavata-phoebus-integration</artifactId>
+ <name>Airavata Phoebus Integration</name>
+ <description>Enable Use of Phoebus in Airavata Server</description>
+ <url>http://airavata.apache.org/</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>cog-jglobus</groupId>
+ <artifactId>cog-jglobus</artifactId>
+ <version>1.8.0_1</version>
+ </dependency>
+ <dependency>
+ <groupId>cog-4_1_6_rc2</groupId>
+ <artifactId>puretls</artifactId>
+ <type>jar</type>
+ <version>cog-4_1_6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.6</version>
+ </dependency>
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <!-- GFAC -->
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gfac-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Test -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added:
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/PhoebusGridConfigurationHandler.java
URL:
http://svn.apache.org/viewvc/airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/PhoebusGridConfigurationHandler.java?rev=1424696&view=auto
==============================================================================
---
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/PhoebusGridConfigurationHandler.java
(added)
+++
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/phoebus/impl/PhoebusGridConfigurationHandler.java
Thu Dec 20 20:47:37 2012
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.core.gfac.phoebus.impl;
+
+import org.apache.airavata.core.gfac.external.GridConfigurationHandler;
+import org.apache.airavata.core.gfac.utils.PhoebusUtils;
+import org.globus.ftp.DataChannelAuthentication;
+import org.globus.ftp.GridFTPClient;
+
+public class PhoebusGridConfigurationHandler implements
+ GridConfigurationHandler {
+
+ @Override
+ public void handleSourceFTPClient(GridFTPClient client) throws
Exception {
+ if
(PhoebusUtils.isPhoebusDriverConfigurationsDefined(client.getHost())) {
+
client.setDataChannelAuthentication(DataChannelAuthentication.NONE);
+ client.site("SITE SETNETSTACK phoebus:" +
PhoebusUtils.getPhoebusDataChannelXIODriverParameters(client.getHost()));
+ }
+ }
+
+ @Override
+ public void handleDestinationFTPClient(GridFTPClient client)
+ throws Exception {
+
+ }
+
+}
Added:
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java
URL:
http://svn.apache.org/viewvc/airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java?rev=1424696&view=auto
==============================================================================
---
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java
(added)
+++
airavata/trunk/tools/phoebus-integration/src/main/java/org/apache/airavata/core/gfac/utils/PhoebusUtils.java
Thu Dec 20 20:47:37 2012
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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.core.gfac.utils;
+
+import org.apache.airavata.common.exception.UnspecifiedServerSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+
+public class PhoebusUtils {
+
+ private static String
PHOEBUS_DC_XIO_DRIVERS="dc.phoebus.xio_driver_configurations";
+
+ public static boolean isPhoebusDriverConfigurationsDefined(String
hostAddress) throws Exception{
+ try {
+ return
getPhoebusDataChannelXIODriverParameters(hostAddress)!=null;
+ } catch (UnspecifiedServerSettingsException e) {
+ return false;
+ }
+ }
+
+ public static String getPhoebusDataChannelXIODriverParameters(String
hostAddress) throws Exception{
+ String driverString =
ServerSettings.getSetting(PHOEBUS_DC_XIO_DRIVERS);
+ String[] hostList = driverString.split(";");
+ for (String hostString : hostList) {
+ String[] driverData = hostString.split("=");
+ if (driverData.length!=2){
+ throw new Exception("Invalid Phoebus XIO
drivers settings!!!");
+ }
+ if (hostAddress.equalsIgnoreCase(driverData[0])){
+ return driverData[1];
+ }
+ }
+ throw new Exception("Phoebus XIO drivers not defined for
"+hostAddress);
+ }
+
+}
Added:
airavata/trunk/tools/phoebus-integration/src/main/resources/service.properties
URL:
http://svn.apache.org/viewvc/airavata/trunk/tools/phoebus-integration/src/main/resources/service.properties?rev=1424696&view=auto
==============================================================================
---
airavata/trunk/tools/phoebus-integration/src/main/resources/service.properties
(added)
+++
airavata/trunk/tools/phoebus-integration/src/main/resources/service.properties
Thu Dec 20 20:47:37 2012
@@ -0,0 +1,67 @@
+#
+#
+# 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.
+#
+#
+
+#
+# Properties for JCR Registry interface. By default, Apache Jackrabbit is used.
+#
+# org.apache.jackrabbit.repository.uri=http://localhost:8080/rmi
+# jcr.class=org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory
+jcr.class=org.apache.jackrabbit.core.RepositoryFactoryImpl
+jcr.user=admin
+jcr.pass=admin
+
+
+#
+# Class which implemented Scheduler interface. It will be used to determine a
Provider
+#
+scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
+
+#
+# Data Service Plugins classes
+#
+datachain.classes=
org.apache.airavata.core.gfac.extension.data.RegistryDataService
+
+#
+# Pre execution Plugins classes. For example, GridFTP Input Staging
+#
+prechain.classes=
org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging
+prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
+
+#
+# Post execution Plugins classes. For example, GridFTP Output Staging
+#
+postchain.classes=
org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
+postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
+
+#
+# SSH private key location. It will be used by SSHProvider
+#
+# ssh.key=/home/user/.ssh/id_rsa
+# ssh.keypass=
+# ssh.username=usernameAtHost
+
+#
+# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
+#
+# myproxy.server=myproxy.teragrid.org
+# myproxy.user=username
+# myproxy.pass=password
+# myproxy.life=3600
\ No newline at end of file
Added: airavata/trunk/tools/pom.xml
URL:
http://svn.apache.org/viewvc/airavata/trunk/tools/pom.xml?rev=1424696&view=auto
==============================================================================
--- airavata/trunk/tools/pom.xml (added)
+++ airavata/trunk/tools/pom.xml Thu Dec 20 20:47:37 2012
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<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</artifactId>
+ <version>0.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>airavata-tools-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>Airavata Tools</name>
+ <url>http://airavata.apache.org/</url>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>phoebus-integration</module>
+ </modules>
+ </profile>
+ </profiles>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ </properties>
+</project>