You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by as...@apache.org on 2012/02/06 00:10:03 UTC
svn commit: r1240854 [2/2] - in /whirr/trunk: ./ cli/
cli/src/main/java/org/apache/whirr/cli/command/ core/
core/src/main/java/org/apache/whirr/
core/src/main/java/org/apache/whirr/service/
core/src/main/java/org/apache/whirr/util/ core/src/main/resour...
Added: whirr/trunk/platforms/karaf/feature/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/feature/pom.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/feature/pom.xml (added)
+++ whirr/trunk/platforms/karaf/feature/pom.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,159 @@
+<?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.whirr</groupId>
+ <artifactId>karaf</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.whirr.karaf</groupId>
+ <artifactId>apache-whirr</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Whirr Karaf Feature</name>
+ <properties>
+ <activation.spec.version>1.1</activation.spec.version>
+ <ant.bundle.version>1.7.0_5</ant.bundle.version>
+ <aopalliance.bundle.version>1.0_5</aopalliance.bundle.version>
+ <!-- Downgrading commons-conifiguration version to 1.6, since 1.7 imports the world -->
+ <commons.configuration.version>1.6</commons.configuration.version>
+ <commons.beanutils.version>1.8.3</commons.beanutils.version>
+ <commons.collections.version>3.2.1</commons.collections.version>
+ <commons.digester.version>2.1</commons.digester.version>
+ <commons.jexl.bundle.version>1.1_5</commons.jexl.bundle.version>
+ <commons.jxpath.bundle.version>1.2_5</commons.jxpath.bundle.version>
+ <commons.lang.version>2.6</commons.lang.version>
+ <commons.vfs2.version>2.0</commons.vfs2.version>
+ <dnsjava.version>2.0.8</dnsjava.version>
+ <javax.mail.bundle.version>1.4.1_4</javax.mail.bundle.version>
+ <junit.bundle.version>4.9_1</junit.bundle.version>
+ <jclouds.karaf.version>1.3.1</jclouds.karaf.version>
+ <jopt.simple.bundle.version>4.3_1</jopt.simple.bundle.version>
+ <jsch.bundle.version>0.1.44_2</jsch.bundle.version>
+ <not-yet-commons-ssl.bundle.version>0.3.11_1</not-yet-commons-ssl.bundle.version>
+ <servlet.spec.version>1.2</servlet.spec.version>
+ </properties>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <useDefaultDelimiters>false</useDefaultDelimiters>
+ <delimiters>
+ <delimiter>${*}</delimiter>
+ </delimiters>
+ </configuration>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>attach-artifact</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/classes/features.xml</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>features-maven-plugin</artifactId>
+ <version>${karaf.version}</version>
+ <executions>
+ <execution>
+ <id>add-features-to-repo</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <!-- We are doing so to just to validate that all artifacts are reachable -->
+ <goal>add-features-to-repo</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>file:${basedir}/target/classes/features.xml</descriptor>
+ </descriptors>
+ <features>
+ <feature>whirr</feature>
+ <feature>whirr-cassandra</feature>
+ <feature>whirr-chef</feature>
+ <feature>whirr-cassandra</feature>
+ <feature>whirr-chef</feature>
+ <feature>whirr-elasticsearch</feature>
+ <feature>whirr-ganglia</feature>
+ <feature>whirr-hadoop</feature>
+ <feature>whirr-hama</feature>
+ <feature>whirr-hbase</feature>
+ <feature>whirr-puppet</feature>
+ <feature>whirr-mahout</feature>
+ <feature>whirr-zookeeper</feature>
+ </features>
+ <repository>target/features-repo</repository>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
+
+
+
+
+
+
+
+
+
+
Added: whirr/trunk/platforms/karaf/feature/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/feature/src/main/resources/features.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/feature/src/main/resources/features.xml (added)
+++ whirr/trunk/platforms/karaf/feature/src/main/resources/features.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,104 @@
+<?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.
+-->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+
+ <repository>mvn:org.jclouds.karaf/jclouds-karaf/${jclouds.karaf.version}/xml/features</repository>
+
+ <feature name="whirr" version="${project.version}" description="Apache Whirr Core" resolver="(obr)">
+ <feature version="${jclouds.karaf.version}">jclouds-aws-ec2</feature>
+ <feature version="${jclouds.karaf.version}">jclouds-aws-s3</feature>
+ <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/${activation.spec.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${servlet.spec.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/${jsch.bundle.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail/${javax.mail.bundle.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jopt-simple/${jopt.simple.bundle.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.not-yet-commons-ssl/${not-yet-commons-ssl.bundle.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.junit/${junit.bundle.version}</bundle>
+ <!--bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-jexl/${commons.jexl.bundle.version}</bundle-->
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-jxpath/${commons.jxpath.bundle.version}</bundle>
+ <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/${ant.bundle.version}</bundle>
+ <!--bundle dependency='true'>mvn:org.apache.commons/commons-vfs2/${commons.vfs2.version}</bundle-->
+ <bundle dependency='true'>mvn:commons-digester/commons-digester/${commons.digester.version}</bundle>
+ <bundle dependency='true'>mvn:commons-beanutils/commons-beanutils/${commons.beanutils.version}</bundle>
+ <bundle dependency='true'>mvn:commons-collections/commons-collections/${commons.collections.version}</bundle>
+ <bundle dependency='true'>mvn:commons-configuration/commons-configuration/${commons.configuration.version}</bundle>
+ <bundle dependency='true'>mvn:commons-codec/commons-codec/${commons.codec.version}</bundle>
+ <bundle dependency='true'>mvn:commons-lang/commons-lang/${commons.lang.version}</bundle>
+ <bundle dependency="true">wrap:mvn:dnsjava/dnsjava/${dnsjava.version}</bundle>
+ <bundle>mvn:org.apache.whirr/whirr-core/${project.version}</bundle>
+ <bundle>mvn:org.apache.whirr/whirr-cli/${project.version}</bundle>
+ <bundle>mvn:org.apache.whirr.karaf/org.apache.whirr.karaf.commands/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-cassandra" version="${project.version}" description="Apache Whirr Cassandra Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-cassandra/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-chef" version="${project.version}" description="Apache Whirr Chef Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-chef/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-elasticsearch" version="${project.version}" description="Apache Whirr ElasticSearch Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-elasticsearch/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-ganglia" version="${project.version}" description="Apache Whirr Ganglia Service"
+ resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-ganglia/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-hadoop" version="${project.version}" description="Apache Whirr Hadoop Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-hadoop/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-hbase" version="${project.version}" description="Apache Whirr Hbase Service" resolver="(obr)">
+ <feature version="${project.version}">whirr-hadoop</feature>
+ <feature version="${project.version}">whirr-zookeeper</feature>
+ <bundle>mvn:org.apache.whirr/whirr-hbase/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-hama" version="${project.version}" description="Apache Whirr Hama Service" resolver="(obr)">
+ <feature version="${project.version}">whirr-hadoop</feature>
+ <feature version="${project.version}">whirr-zookeeper</feature>
+ <bundle>mvn:org.apache.whirr/whirr-hama/${project.version}</bundle>
+ </feature>
+ <feature name="whirr-mahout" version="${project.version}" description="Apache Whirr Mahout Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-mahout/${project.version}</bundle>
+ </feature>
+ <feature name="whirr-puppet" version="${project.version}" description="Apache Whirr Puppet Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-puppet/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-voldemort" version="${project.version}" description="Apache Whirr Voldermort Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-voldemort/${project.version}</bundle>
+ </feature>
+
+ <feature name="whirr-zookeeper" version="${project.version}" description="Apache Whirr Zookeeper Service" resolver="(obr)">
+ <feature version="${project.version}">whirr</feature>
+ <bundle>mvn:org.apache.whirr/whirr-zookeeper/${project.version}</bundle>
+ </feature>
+
+</features>
Propchange: whirr/trunk/platforms/karaf/itests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb 5 23:09:59 2012
@@ -0,0 +1 @@
+target
Added: whirr/trunk/platforms/karaf/itests/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/itests/pom.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/itests/pom.xml (added)
+++ whirr/trunk/platforms/karaf/itests/pom.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,124 @@
+<?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>
+ <artifactId>karaf</artifactId>
+ <groupId>org.apache.whirr</groupId>
+ <version>0.8.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.whirr.karaf</groupId>
+ <artifactId>itests</artifactId>
+ <name>Apache Whirr Karaf Integration Tests</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <!-- Pax Exam Requires guava 10 -->
+ <!-- Inside the container the correct version will still be used -->
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>10.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.whirr</groupId>
+ <artifactId>whirr-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ops4j.pax.url</groupId>
+ <artifactId>pax-url-mvn</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ops4j.pax.url</groupId>
+ <artifactId>pax-url-aether</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf.version}</version>
+ <type>tar.gz</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openengsb.labs.paxexam.karaf</groupId>
+ <artifactId>paxexam-karaf-container</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>3.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>2.3.0.M1</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrInstallationTest.java
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrInstallationTest.java?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrInstallationTest.java (added)
+++ whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrInstallationTest.java Sun Feb 5 23:09:59 2012
@@ -0,0 +1,56 @@
+/*
+ * 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.whirr.karaf.itest;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openengsb.labs.paxexam.karaf.options.LogLevelOption;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
+import org.osgi.framework.Bundle;
+
+
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
+
+@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
+public class WhirrInstallationTest extends WhirrKarafTestSupport {
+
+ @Test
+ public void testInstallation() throws InterruptedException {
+ //Install Whirr and check if it has been properly installed.
+ installWhirr();
+ System.err.println(executeCommand("osgi:list"));
+
+ Bundle commandsBundle = getInstalledBundle("org.apache.whirr.karaf.commands");
+ Assert.assertEquals("Expected bundle to be started",Bundle.ACTIVE,commandsBundle.getState());
+ }
+
+
+ @Configuration
+ public Option[] config() {
+ return new Option[]{
+ whirrDistributionConfiguration(), keepRuntimeFolder(),logLevel(LogLevelOption.LogLevel.ERROR)};
+ }
+}
Added: whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrKarafTestSupport.java
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrKarafTestSupport.java?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrKarafTestSupport.java (added)
+++ whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrKarafTestSupport.java Sun Feb 5 23:09:59 2012
@@ -0,0 +1,293 @@
+/*
+ * 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.whirr.karaf.itest;
+
+import org.apache.felix.service.command.CommandProcessor;
+import org.apache.felix.service.command.CommandSession;
+import org.ops4j.pax.exam.MavenUtils;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.TestProbeBuilder;
+import org.ops4j.pax.exam.junit.ProbeBuilder;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+import javax.inject.Inject;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+
+public class WhirrKarafTestSupport {
+
+ static final Long COMMAND_TIMEOUT = 300000L;
+ static final Long SERVICE_TIMEOUT = 30000L;
+ static final Long DEFAULT_WAIT = 20000L;
+
+ private static final String UNINSTALLED = "[uninstalled]";
+ private static final String INSTALLED = "[installed ]";
+
+ static final String GROUP_ID = "org.apache.karaf";
+ static final String ARTIFACT_ID = "apache-karaf";
+
+ static final String WHIRR_VERSION = "0.8.0-SNAPSHOT";
+
+ static final String WHIRR_FEATURE_URL = String.format("mvn:org.apache.whirr.karaf/apache-whirr/%s/xml/features", WHIRR_VERSION);
+
+ static final String DEBUG_OPTS = " --java-opts \"-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%s\"";
+
+ ExecutorService executor = Executors.newCachedThreadPool();
+
+ @Inject
+ protected BundleContext bundleContext;
+
+ /**
+ * @param probe
+ * @return
+ */
+ @ProbeBuilder
+ public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
+ probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*,org.apache.felix.service.*;status=provisional");
+
+ return probe;
+ }
+
+ /**
+ * Installs the Whiir feature
+ */
+ protected void installWhirr() {
+ System.err.println(executeCommand("features:addurl " + WHIRR_FEATURE_URL));
+ System.err.println(executeCommand("features:listurl"));
+ System.err.println(executeCommand("features:list"));
+ executeCommand("features:install whirr");
+ }
+
+ protected void unInstallWhirr() {
+ System.err.println(executeCommand("features:uninstall whirr"));
+ }
+
+ /**
+ * Create an {@link org.ops4j.pax.exam.Option} for using a .
+ *
+ * @return
+ */
+ protected Option whirrDistributionConfiguration() {
+ return karafDistributionConfiguration().frameworkUrl(
+ maven().groupId(GROUP_ID).artifactId(ARTIFACT_ID).versionAsInProject().type("tar.gz"))
+ .karafVersion(MavenUtils.getArtifactVersion(GROUP_ID, ARTIFACT_ID)).name("Apache Karaf").unpackDirectory(new File("target/paxexam/"));
+ }
+
+ /**
+ * Executes a shell command and returns output as a String.
+ * Commands have a default timeout of 10 seconds.
+ *
+ * @param command
+ * @return
+ */
+ protected String executeCommand(final String command) {
+ return executeCommand(command, COMMAND_TIMEOUT, false);
+ }
+
+ /**
+ * Executes a shell command and returns output as a String.
+ * Commands have a default timeout of 10 seconds.
+ *
+ * @param command The command to execute.
+ * @param timeout The amount of time in millis to wait for the command to execute.
+ * @param silent Specifies if the command should be displayed in the screen.
+ * @return
+ */
+ protected String executeCommand(final String command, final Long timeout, final Boolean silent) {
+ String response;
+ final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+ final PrintStream printStream = new PrintStream(byteArrayOutputStream);
+ final CommandProcessor commandProcessor = getOsgiService(CommandProcessor.class);
+ final CommandSession commandSession = commandProcessor.createSession(System.in, printStream, System.err);
+ FutureTask<String> commandFuture = new FutureTask<String>(
+ new Callable<String>() {
+ public String call() {
+ try {
+ if (!silent) {
+ System.err.println(command);
+ }
+ commandSession.execute(command);
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ }
+ printStream.flush();
+ return byteArrayOutputStream.toString();
+ }
+ });
+
+ try {
+ executor.submit(commandFuture);
+ response = commandFuture.get(timeout, TimeUnit.MILLISECONDS);
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ response = "SHELL COMMAND TIMED OUT: ";
+ }
+
+ return response;
+ }
+
+ /**
+ * Executes multiple commands inside a Single Session.
+ * Commands have a default timeout of 10 seconds.
+ *
+ * @param commands
+ * @return
+ */
+ protected String executeCommands(final String... commands) {
+ String response;
+ final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+ final PrintStream printStream = new PrintStream(byteArrayOutputStream);
+ final CommandProcessor commandProcessor = getOsgiService(CommandProcessor.class);
+ final CommandSession commandSession = commandProcessor.createSession(System.in, printStream, System.err);
+ FutureTask<String> commandFuture = new FutureTask<String>(
+ new Callable<String>() {
+ public String call() {
+ try {
+ for (String command : commands) {
+ System.err.println(command);
+ commandSession.execute(command);
+ }
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ }
+ return byteArrayOutputStream.toString();
+ }
+ });
+
+ try {
+ executor.submit(commandFuture);
+ response = commandFuture.get(COMMAND_TIMEOUT, TimeUnit.MILLISECONDS);
+ } catch (Exception e) {
+ e.printStackTrace(System.err);
+ response = "SHELL COMMAND TIMED OUT: ";
+ }
+
+ return response;
+ }
+
+ protected Bundle getInstalledBundle(String symbolicName) {
+ for (Bundle b : bundleContext.getBundles()) {
+ if (b.getSymbolicName().equals(symbolicName)) {
+ return b;
+ }
+ }
+ for (Bundle b : bundleContext.getBundles()) {
+ System.err.println("Bundle: " + b.getSymbolicName());
+ }
+ throw new RuntimeException("Bundle " + symbolicName + " does not exist");
+ }
+
+ /*
+ * Explode the dictionary into a ,-delimited list of key=value pairs
+ */
+ private static String explode(Dictionary dictionary) {
+ Enumeration keys = dictionary.keys();
+ StringBuffer result = new StringBuffer();
+ while (keys.hasMoreElements()) {
+ Object key = keys.nextElement();
+ result.append(String.format("%s=%s", key, dictionary.get(key)));
+ if (keys.hasMoreElements()) {
+ result.append(", ");
+ }
+ }
+ return result.toString();
+ }
+
+ protected <T> T getOsgiService(Class<T> type, long timeout) {
+ return getOsgiService(type, null, timeout);
+ }
+
+ protected <T> T getOsgiService(Class<T> type) {
+ return getOsgiService(type, null, SERVICE_TIMEOUT);
+ }
+
+ protected <T> T getOsgiService(Class<T> type, String filter, long timeout) {
+ ServiceTracker tracker = null;
+ try {
+ String flt;
+ if (filter != null) {
+ if (filter.startsWith("(")) {
+ flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")" + filter + ")";
+ } else {
+ flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")(" + filter + "))";
+ }
+ } else {
+ flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
+ }
+ Filter osgiFilter = FrameworkUtil.createFilter(flt);
+ tracker = new ServiceTracker(bundleContext, osgiFilter, null);
+ tracker.open(true);
+ // Note that the tracker is not closed to keep the reference
+ // This is buggy, as the service reference may change i think
+ Object svc = type.cast(tracker.waitForService(timeout));
+ if (svc == null) {
+ Dictionary dic = bundleContext.getBundle().getHeaders();
+ System.err.println("Test bundle headers: " + explode(dic));
+
+ for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, null))) {
+ System.err.println("ServiceReference: " + ref);
+ }
+
+ for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) {
+ System.err.println("Filtered ServiceReference: " + ref);
+ }
+
+ throw new RuntimeException("Gave up waiting for service " + flt);
+ }
+ return type.cast(svc);
+ } catch (InvalidSyntaxException e) {
+ throw new IllegalArgumentException("Invalid filter", e);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ } finally {
+ if (tracker != null) {
+ tracker.close();
+ }
+ }
+ }
+
+ /*
+ * Provides an iterable collection of references, even if the original array is null
+ */
+ private static Collection<ServiceReference> asCollection(ServiceReference[] references) {
+ return references != null ? Arrays.asList(references) : Collections.<ServiceReference>emptyList();
+ }
+
+}
Added: whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrServicesTest.java
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrServicesTest.java?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrServicesTest.java (added)
+++ whirr/trunk/platforms/karaf/itests/src/test/java/org/apache/whirr/karaf/itest/WhirrServicesTest.java Sun Feb 5 23:09:59 2012
@@ -0,0 +1,103 @@
+/*
+ * 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.whirr.karaf.itest;
+
+
+import org.apache.whirr.ClusterController;
+import org.apache.whirr.service.ClusterActionHandler;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openengsb.labs.paxexam.karaf.options.LogLevelOption;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
+
+import java.util.Map;
+
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
+
+@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
+public class WhirrServicesTest extends WhirrKarafTestSupport {
+
+ @Test
+ public void testServices() throws InterruptedException {
+ //Install Whirr
+ installWhirr();
+ System.err.println(executeCommand("osgi:list"));
+ //Install all services
+ executeCommand("features:install whirr-cassandra");
+ executeCommand("features:install whirr-chef");
+ executeCommand("features:install whirr-elasticsearch");
+ executeCommand("features:install whirr-ganglia");
+ executeCommand("features:install whirr-hadoop");
+ executeCommand("features:install whirr-hama");
+ executeCommand("features:install whirr-hbase");
+ executeCommand("features:install whirr-puppet");
+ executeCommand("features:install whirr-mahout");
+ //executeCommand("features:install whirr-voldemort");
+ executeCommand("features:install whirr-zookeeper");
+
+ System.err.println(executeCommand("osgi:list"));
+
+ //Test that services properly register to OSGi service registry.
+ ClusterController clusterController = getOsgiService(ClusterController.class, "(name=default)", SERVICE_TIMEOUT);
+ Map<String, ClusterActionHandler> actionHandlerMap = clusterController.getHandlerMapFactory().create();
+ Assert.assertNotNull(clusterController);
+
+ testService(actionHandlerMap, "cassandra");
+ testService(actionHandlerMap, "chef");
+ testService(actionHandlerMap, "elasticsearch");
+ testService(actionHandlerMap, "ganglia-monitor", "ganglia-metad");
+ testService(actionHandlerMap, "hadoop-namenode", "hadoop-datanode", "hadoop-jobtracker", "hadoop-tasktracker");
+ testService(actionHandlerMap, "hama-master", "hama-groomserver");
+ testService(actionHandlerMap, "hbase-master", "hbase-regionserver", "hbase-restserver", "hbase-avroserver", "hbase-thriftserver");
+ testService(actionHandlerMap, "puppet-install");
+ testService(actionHandlerMap, "mahout-client");
+ //testService(actionHandlerMap,"voldemort");
+ testService(actionHandlerMap, "zookeeper");
+ }
+
+
+ /**
+ * Tests that the {@link ClusterActionHandler} service has been properly exported.
+ *
+ * @param roleNames
+ */
+ public void testService(Map actionHandlerMap, String... roleNames) throws InterruptedException {
+ for (String roleName : roleNames) {
+ ClusterActionHandler clusterActionHandler = getOsgiService(ClusterActionHandler.class,
+ String.format("(name=%s)", roleName), SERVICE_TIMEOUT);
+ Assert.assertNotNull(clusterActionHandler);
+ Assert.assertEquals(clusterActionHandler.getRole(), roleName);
+ Assert.assertTrue(actionHandlerMap.containsKey(roleName));
+ }
+ }
+
+
+ @Configuration
+ public Option[] config() {
+ return new Option[]{
+ whirrDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR)};
+ }
+}
Added: whirr/trunk/platforms/karaf/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/platforms/karaf/pom.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/platforms/karaf/pom.xml (added)
+++ whirr/trunk/platforms/karaf/pom.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,77 @@
+<?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.whirr</groupId>
+ <artifactId>whirr</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.whirr</groupId>
+ <artifactId>karaf</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Whirr Platforms Karaf</name>
+
+ <properties>
+ <karaf.version>2.2.5</karaf.version>
+ <osgi.version>4.2.0</osgi.version>
+ <pax.exam.version>2.3.0.M1</pax.exam.version>
+ <pax.exam.karaf.version>0.4.0</pax.exam.karaf.version>
+ <pax.url.version>1.3.5</pax.url.version>
+ </properties>
+
+
+ <modules>
+ <module>commands</module>
+ <module>feature</module>
+ <module>itests</module>
+ </modules>
+
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.ops4j.pax.url</groupId>
+ <artifactId>pax-url-mvn</artifactId>
+ <version>${pax.url.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.url</groupId>
+ <artifactId>pax-url-aether</artifactId>
+ <version>${pax.url.version}</version>
+ </dependency>
+ <!-- Pax Exam -->
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>${pax.exam.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openengsb.labs.paxexam.karaf</groupId>
+ <artifactId>paxexam-karaf-container</artifactId>
+ <version>${pax.exam.karaf.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
\ No newline at end of file
Modified: whirr/trunk/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/pom.xml (original)
+++ whirr/trunk/pom.xml Sun Feb 5 23:09:59 2012
@@ -51,23 +51,34 @@
<module>services/puppet</module>
<module>services/chef</module>
<module>services/mahout</module>
+ <module>platforms/karaf</module>
</modules>
<properties>
- <guava.version>11.0.1</guava.version>
- <jclouds.version>1.3.1</jclouds.version>
+ <commons.codec.version>1.6</commons.codec.version>
+ <commons.configuration.version>1.7</commons.configuration.version>
+ <commons.httpclient.version>3.1</commons.httpclient.version>
+ <commons.io.version>1.4</commons.io.version>
<common-ssl.version>0.3.11</common-ssl.version>
- <junit.version>4.10</junit.version>
+ <dnsjava.version>2.1.1</dnsjava.version>
+ <guava.version>11.0.1</guava.version>
+ <hadoop.version>0.20.205.0</hadoop.version>
<hamcrest.version>1.1</hamcrest.version>
- <mockito.version>1.9.0</mockito.version>
- <commons-httpclient.version>3.1</commons-httpclient.version>
- <commons-configuration.version>1.7</commons-configuration.version>
- <commons-io.version>2.1</commons-io.version>
- <commons-codec.version>1.6</commons-codec.version>
- <slf4j.version>1.6.4</slf4j.version>
+ <hama.version>0.3.0-incubating</hama.version>
+ <hbase.version>0.89.20100924-28</hbase.version>
+ <jackson.version>1.5.2</jackson.version>
+ <jclouds.version>1.3.1</jclouds.version>
+ <jdom.version>1.1</jdom.version>
+ <jopt.simple.version>3.2</jopt.simple.version>
+ <jsch.version>0.1.44-1</jsch.version>
+ <junit.version>4.8.1</junit.version>
<log4j.version>1.2.16</log4j.version>
- <jsch.version>0.1.45</jsch.version>
- <dnsjava.version>2.1.1</dnsjava.version>
+ <mockito.version>1.9.0</mockito.version>
+ <not.yet.commons.ssl.version>0.3.11</not.yet.commons.ssl.version>
+ <protobuff.version>2.3.0</protobuff.version>
+ <slf4j.version>1.6.3</slf4j.version>
+ <voldermort.version>0.90</voldermort.version>
+ <zookeeper.version>3.3.1</zookeeper.version>
</properties>
<dependencyManagement>
@@ -123,6 +134,18 @@
<version>${jclouds.version}</version>
</dependency>
<dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-core-asl</artifactId>
+ <version>${jackson.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>${jackson.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
@@ -143,22 +166,22 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
+ <version>${commons.httpclient.version}</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>${commons-configuration.version}</version>
+ <version>${commons.configuration.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>${commons-io.version}</version>
+ <version>${commons.io.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>${commons-codec.version}</version>
+ <version>${commons.codec.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -397,6 +420,45 @@
</excludes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.3.6</version>
+ <extensions>true</extensions>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.name}</Bundle-Name>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Bundle-Activator>${osgi.bundle.activator}</Bundle-Activator>
+ <Export-Package>${osgi.export}</Export-Package>
+ <Import-Package>${osgi.import}</Import-Package>
+ <DynamicImport-Package>${osgi.dynamic.import}</DynamicImport-Package>
+ <Private-Package>${osgi.private}</Private-Package>
+ <Require-Bundle>${osgi.bundles}</Require-Bundle>
+ <Export-Service>${osgi.export.service}</Export-Service>
+ <Fragment-Host>${osgi.fragment.host}</Fragment-Host>
+ <SPI-Provider>${osgi.spi.provider}</SPI-Provider>
+ <SPI-Consumer>${osgi.spi.consumer}</SPI-Consumer>
+ </instructions>
+ <supportedProjectTypes>
+ <supportedProjectType>jar</supportedProjectType>
+ <supportedProjectType>war</supportedProjectType>
+ <supportedProjectType>bundle</supportedProjectType>
+ </supportedProjectTypes>
+ <unpackBundle>true</unpackBundle>
+ </configuration>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
<pluginManagement>
<plugins>
@@ -426,6 +488,10 @@
</releases>
</repository>
<repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2/</url>
+ </repository>
+ <repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/content/repositories/releases/</url>
</repository>
Modified: whirr/trunk/services/cassandra/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/cassandra/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/cassandra/pom.xml (original)
+++ whirr/trunk/services/cassandra/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,9 +25,20 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-cassandra</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr Cassandra</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.cassandra*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.cassandra*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Added: whirr/trunk/services/cassandra/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/cassandra/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/cassandra/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/cassandra/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="cassandra"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.cassandra.CassandraClusterActionHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/cdh/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/cdh/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/cdh/pom.xml (original)
+++ whirr/trunk/services/cdh/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,9 +25,18 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-cdh</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr CDH</name>
+ <properties>
+ <osgi.import>
+ !functions*,
+ *
+ </osgi.import>
+ <osgi.export>
+ functions*;version="${project.version}"
+ </osgi.export>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -127,13 +136,11 @@
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
- <version>1.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
- <version>1.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: whirr/trunk/services/chef/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/chef/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/chef/pom.xml (original)
+++ whirr/trunk/services/chef/pom.xml Sun Feb 5 23:09:59 2012
@@ -24,8 +24,19 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>whirr-chef</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<name>Apache Whirr Chef</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.chef*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.chef*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Added: whirr/trunk/services/chef/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/chef/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/chef/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/chef/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="chef"/>
+ </service-properties>
+ <bean factory-ref="chefActionHandlerFactory" factory-method="create">
+ <argument index="0" value="chef"/>
+ </bean>
+ </service>
+
+ <service ref="chefActionHandlerFactory" auto-export="all-classes"/>
+ <bean id="chefActionHandlerFactory" class="org.apache.whirr.service.chef.ChefClusterActionHandlerFactory"/>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/elasticsearch/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/elasticsearch/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/elasticsearch/pom.xml (original)
+++ whirr/trunk/services/elasticsearch/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,9 +25,20 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-elasticsearch</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr ElasticSearch</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.elasticsearch*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.elasticsearch*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Added: whirr/trunk/services/elasticsearch/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/elasticsearch/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/elasticsearch/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/elasticsearch/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="elasticsearch"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.elasticsearch.ElasticSearchHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/ganglia/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/ganglia/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/ganglia/pom.xml (original)
+++ whirr/trunk/services/ganglia/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,8 +25,19 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-ganglia</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<name>Apache Whirr Ganglia</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.ganglia*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.ganglia*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Added: whirr/trunk/services/ganglia/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/ganglia/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/ganglia/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/ganglia/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="ganglia-monitor"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.ganglia.GangliaMonitorClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="ganglia-metad"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.ganglia.GangliaMetadClusterActionHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/hadoop/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hadoop/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/hadoop/pom.xml (original)
+++ whirr/trunk/services/hadoop/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,11 +25,19 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-hadoop</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr Hadoop</name>
<properties>
- <hadoop.version>0.20.205.0</hadoop.version>
+ <osgi.import>
+ !org.apache.whirr.service.hadoop*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.hadoop*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
</properties>
<dependencies>
<dependency>
Added: whirr/trunk/services/hadoop/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hadoop/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/hadoop/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/hadoop/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hadoop-namenode"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hadoop.HadoopNameNodeClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hadoop-datanode"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hadoop.HadoopDataNodeClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hadoop-jobtracker"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hadoop.HadoopJobTrackerClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hadoop-tasktracker"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hadoop.HadoopTaskTrackerClusterActionHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/hama/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hama/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/hama/pom.xml (original)
+++ whirr/trunk/services/hama/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,12 +25,19 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-hama</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr Hama</name>
<properties>
- <hadoop.version>0.20.2</hadoop.version>
- <hama.version>0.3.0-incubating</hama.version>
+ <osgi.import>
+ !org.apache.whirr.service.hama*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.hama*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
</properties>
<dependencies>
<dependency>
@@ -116,7 +123,7 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
- <version>3.3.1</version>
+ <version>${zookeeper.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Added: whirr/trunk/services/hama/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hama/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/hama/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/hama/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hama-master"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hama.HamaMasterClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hama-groomserver"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hama.HamaGroomServerClusterActionHandler"/>
+ </service>
+</blueprint>
Modified: whirr/trunk/services/hbase/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/hbase/pom.xml (original)
+++ whirr/trunk/services/hbase/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,12 +25,19 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-hbase</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr HBase</name>
<properties>
- <hadoop.version>0.20.2</hadoop.version>
- <hbase.version>0.89.20100924-28</hbase.version>
+ <osgi.import>
+ !org.apache.whirr.service.hbase*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.hbase*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
</properties>
<dependencies>
<dependency>
@@ -88,7 +95,7 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
- <version>3.3.1</version>
+ <version>${zookeeper.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Added: whirr/trunk/services/hbase/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/hbase/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/hbase/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/hbase/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hbase-master"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hbase.HBaseMasterClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hbase-regionserver"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hbase.HBaseRegionServerClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hbase-restserver"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hbase.HBaseRestServerClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hbase-avroserver"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hbase.HBaseAvroServerClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="hbase-thriftserver"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.hbase.HBaseThriftServerClusterActionHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/mahout/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/mahout/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/mahout/pom.xml (original)
+++ whirr/trunk/services/mahout/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,11 +25,18 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-mahout</artifactId>
- <packaging>jar</packaging>
- <version>0.8.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
<name>Apache Whirr Mahout</name>
<properties>
- <hadoop.version>0.20.2</hadoop.version>
+ <osgi.import>
+ !org.apache.whirr.service.mahout*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.mahout*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
</properties>
<dependencies>
<dependency>
Added: whirr/trunk/services/mahout/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/mahout/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/mahout/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/mahout/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="mahout-client"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.mahout.MahoutClientClusterActionHandler"/>
+ </service>
+</blueprint>
Modified: whirr/trunk/services/puppet/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/puppet/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/puppet/pom.xml (original)
+++ whirr/trunk/services/puppet/pom.xml Sun Feb 5 23:09:59 2012
@@ -24,8 +24,19 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>whirr-puppet</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<name>Apache Whirr Puppet</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.puppet*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.puppet*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Added: whirr/trunk/services/puppet/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/puppet/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/puppet/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/puppet/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service interface="org.apache.whirr.service.ClusterActionHandler">
+ <service-properties>
+ <entry key="name" value="puppet-install"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.puppet.PuppetInstallClusterActionHandler"/>
+ </service>
+ <service auto-export="all-classes">
+ <bean class="org.apache.whirr.service.puppet.PuppetClusterActionHandlerFactory"/>
+ </service>
+</blueprint>
\ No newline at end of file
Modified: whirr/trunk/services/puppet/src/test/java/org/apache/whirr/service/puppet/PuppetClusterActionHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/whirr/trunk/services/puppet/src/test/java/org/apache/whirr/service/puppet/PuppetClusterActionHandlerFactoryTest.java?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/puppet/src/test/java/org/apache/whirr/service/puppet/PuppetClusterActionHandlerFactoryTest.java (original)
+++ whirr/trunk/services/puppet/src/test/java/org/apache/whirr/service/puppet/PuppetClusterActionHandlerFactoryTest.java Sun Feb 5 23:09:59 2012
@@ -27,12 +27,12 @@ public class PuppetClusterActionHandlerF
@Test
public void testPuppetFactoryIsRegisteredAndWorksWithModules() {
- assertEquals(HandlerMapFactory.create().get("puppet:nginx"), new PuppetClusterActionHandler("nginx"));
+ assertEquals(new HandlerMapFactory().create().get("puppet:nginx"), new PuppetClusterActionHandler("nginx"));
}
@Test
public void testPuppetFactoryIsRegisteredAndWorksWithManifests() {
- assertEquals(HandlerMapFactory.create().get("puppet:postgresql::server"), new PuppetClusterActionHandler(
+ assertEquals(new HandlerMapFactory().create().get("puppet:postgresql::server"), new PuppetClusterActionHandler(
"postgresql::server"));
}
Modified: whirr/trunk/services/voldemort/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/voldemort/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/voldemort/pom.xml (original)
+++ whirr/trunk/services/voldemort/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,9 +25,20 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-voldemort</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr Voldemort</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.voldemort*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.voldemort*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -82,12 +93,12 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
- <version>2.3.0</version>
+ <version>${protobuff.version}</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
- <version>1.1</version>
+ <version>${jdom.version}</version>
</dependency>
</dependencies>
<build>
Added: whirr/trunk/services/voldemort/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/voldemort/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/voldemort/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/voldemort/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service auto-export="all-classes">
+ <service-properties>
+ <entry key="name" value="voldemort"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.voldemort.VoldemortClusterActionHandler"/>
+ </service>
+</blueprint>
Modified: whirr/trunk/services/zookeeper/pom.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/zookeeper/pom.xml?rev=1240854&r1=1240853&r2=1240854&view=diff
==============================================================================
--- whirr/trunk/services/zookeeper/pom.xml (original)
+++ whirr/trunk/services/zookeeper/pom.xml Sun Feb 5 23:09:59 2012
@@ -25,9 +25,20 @@
</parent>
<groupId>org.apache.whirr</groupId>
<artifactId>whirr-zookeeper</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>0.8.0-SNAPSHOT</version>
<name>Apache Whirr ZooKeeper</name>
+ <properties>
+ <osgi.import>
+ !org.apache.whirr.service.zookeeper*,
+ org.apache.commons.configuration*;version="[1.6,2)",
+ *
+ </osgi.import>
+ <osgi.export>
+ org.apache.whirr.service.zookeeper*;version="${project.version}"
+ </osgi.export>
+ <osgi.fragment.host>jclouds-scriptbuilder;bundle-version="${jclouds.version}"</osgi.fragment.host>
+ </properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -74,7 +85,7 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
- <version>3.3.1</version>
+ <version>${zookeeper.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Added: whirr/trunk/services/zookeeper/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/whirr/trunk/services/zookeeper/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1240854&view=auto
==============================================================================
--- whirr/trunk/services/zookeeper/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ whirr/trunk/services/zookeeper/src/main/resources/OSGI-INF/blueprint/blueprint.xml Sun Feb 5 23:09:59 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <service interface="org.apache.whirr.service.ClusterActionHandler">
+ <service-properties>
+ <entry key="name" value="zookeeper"/>
+ </service-properties>
+ <bean class="org.apache.whirr.service.zookeeper.ZooKeeperClusterActionHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file