provisionr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject [14/21] PROVISIONR-20. Change groupId from com.axemblr.provisionr to org.apache.provisionr
Date Mon, 01 Apr 2013 08:52:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/java/org/apache/provisionr/core/templates/xml/XmlTemplate.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/provisionr/core/templates/xml/XmlTemplate.java b/core/src/main/java/org/apache/provisionr/core/templates/xml/XmlTemplate.java
new file mode 100644
index 0000000..1255082
--- /dev/null
+++ b/core/src/main/java/org/apache/provisionr/core/templates/xml/XmlTemplate.java
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2013 S.C. Axemblr Software Solutions S.R.L
+ *
+ * Licensed 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.provisionr.core.templates.xml;
+
+import org.apache.provisionr.api.network.Network;
+import org.apache.provisionr.api.network.NetworkBuilder;
+import org.apache.provisionr.api.network.Rule;
+import org.apache.provisionr.api.pool.Pool;
+import org.apache.provisionr.api.pool.PoolBuilder;
+import org.apache.provisionr.api.software.Repository;
+import org.apache.provisionr.api.software.Software;
+import org.apache.provisionr.api.software.SoftwareBuilder;
+import org.apache.provisionr.core.templates.PoolTemplate;
+import com.google.common.annotations.VisibleForTesting;
+import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Throwables;
+import static com.google.common.collect.Lists.newArrayList;
+import com.google.common.io.CharStreams;
+import com.google.common.io.Closeables;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.List;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Basic representation of a pool template
+ * <p/>
+ * Designed to be consumed *only* by JAXB
+ * <p/>
+ * If you need to implement a pool template see {@code PoolTemplate}
+ */
+@XmlRootElement(name = "template")
+public class XmlTemplate implements PoolTemplate {
+
+    /**
+     * @return an XmlTemplate instance resulted from parsing the content
+     */
+    public static XmlTemplate newXmlTemplate(String content) {
+        try {
+            JAXBContext context = JAXBContext.newInstance(XmlTemplate.class);
+            return (XmlTemplate) context.createUnmarshaller()
+                .unmarshal(new ByteArrayInputStream(content.getBytes()));
+
+        } catch (JAXBException e) {
+            throw Throwables.propagate(e);
+        }
+    }
+
+    /**
+     * @return an XmlTemplate instance resulted from parsing a file
+     */
+    public static XmlTemplate newXmlTemplate(File file) {
+        FileReader reader = null;
+        try {
+            reader = new FileReader(file);
+            return newXmlTemplate(CharStreams.toString(reader));
+
+        } catch (IOException e) {
+            throw Throwables.propagate(e);
+        } finally {
+            Closeables.closeQuietly(reader);
+        }
+    }
+
+    private String id;
+    private String description;
+    private String osVersion;
+
+    private List<String> packages = newArrayList();
+    private List<Integer> ports = newArrayList();
+
+    private List<FileEntry> files = newArrayList();
+
+    private List<RepositoryEntry> repositories = newArrayList();
+
+    public XmlTemplate() {
+    }
+
+    @Override
+    public Pool apply(Pool pool) {
+        PoolBuilder result = pool.toBuilder();
+
+        result.software(apply(pool.getSoftware()));
+        result.network(apply(pool.getNetwork()));
+
+        if (osVersion != null) {
+            result.provider(pool.getProvider().toBuilder()
+                .option("version", osVersion).createProvider());
+        }
+
+        return result.createPool();
+    }
+
+    @VisibleForTesting
+    Software apply(Software software) {
+        SoftwareBuilder result = software.toBuilder();
+
+        // Add all the new packages
+        for (String pkg : packages) {
+            result.addPackage(pkg);
+        }
+
+        // Add all the new files
+        for (FileEntry entry : files) {
+            result.file(entry.getSource(), entry.getDestination());
+        }
+
+        // Add all the new custom repositories
+        for (RepositoryEntry entry : repositories) {
+            result.repository(Repository.builder().name(entry.getId()).key(entry.getKey())
+                .entries(entry.getEntries()).createRepository());
+        }
+
+        return result.createSoftware();
+    }
+
+    @VisibleForTesting
+    Network apply(Network network) {
+        NetworkBuilder result = network.toBuilder();
+        for (int port : ports) {
+            result.addRules(Rule.builder().anySource().tcp().port(port).createRule());
+        }
+        return result.createNetwork();
+    }
+
+    @XmlAttribute(name = "id")
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = checkNotNull(id, "id is null");
+    }
+
+    @Override
+    public String getDescription() {
+        return description.trim();
+    }
+
+    public void setDescription(String description) {
+        this.description = checkNotNull(description, "description is null");
+    }
+
+    @XmlAttribute(name = "os-version")
+    public String getOsVersion() {
+        return osVersion;
+    }
+
+    public void setOsVersion(String osVersion) {
+        this.osVersion = checkNotNull(osVersion, "osVersion is null");
+    }
+
+    @XmlElementWrapper(name = "packages")
+    @XmlElement(name = "package")
+    public List<String> getPackages() {
+        return packages;
+    }
+
+    public void setPackages(List<String> packages) {
+        this.packages = checkNotNull(packages, "packages is null");
+    }
+
+    @XmlElementWrapper(name = "ports")
+    @XmlElement(name = "port")
+    public List<Integer> getPorts() {
+        return ports;
+    }
+
+    public void setPorts(List<Integer> ports) {
+        this.ports = checkNotNull(ports, "ports is null");
+    }
+
+    @XmlElementWrapper(name = "files")
+    @XmlElement(name = "file")
+    public List<FileEntry> getFiles() {
+        return files;
+    }
+
+    public void setFiles(List<FileEntry> files) {
+        this.files = checkNotNull(files, "files is null");
+    }
+
+    @XmlElementWrapper(name = "repositories")
+    @XmlElement(name = "repository")
+    public List<RepositoryEntry> getRepositories() {
+        return repositories;
+    }
+
+    public void setRepositories(List<RepositoryEntry> repositories) {
+        this.repositories = checkNotNull(repositories, "repositories is null");
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        XmlTemplate that = (XmlTemplate) o;
+
+        if (description != null ? !description.equals(that.description) : that.description != null) return false;
+        if (files != null ? !files.equals(that.files) : that.files != null) return false;
+        if (id != null ? !id.equals(that.id) : that.id != null) return false;
+        if (osVersion != null ? !osVersion.equals(that.osVersion) : that.osVersion != null) return false;
+        if (packages != null ? !packages.equals(that.packages) : that.packages != null) return false;
+        if (ports != null ? !ports.equals(that.ports) : that.ports != null) return false;
+        if (repositories != null ? !repositories.equals(that.repositories) : that.repositories != null) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = id != null ? id.hashCode() : 0;
+        result = 31 * result + (description != null ? description.hashCode() : 0);
+        result = 31 * result + (osVersion != null ? osVersion.hashCode() : 0);
+        result = 31 * result + (packages != null ? packages.hashCode() : 0);
+        result = 31 * result + (ports != null ? ports.hashCode() : 0);
+        result = 31 * result + (files != null ? files.hashCode() : 0);
+        result = 31 * result + (repositories != null ? repositories.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "XmlTemplate{" +
+            "id='" + id + '\'' +
+            ", description='" + description + '\'' +
+            ", osVersion='" + osVersion + '\'' +
+            ", packages=" + packages +
+            ", ports=" + ports +
+            ", files=" + files +
+            ", repositories=" + repositories +
+            '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/OSGI-INF/blueprint/context.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/OSGI-INF/blueprint/context.xml b/core/src/main/resources/OSGI-INF/blueprint/context.xml
index 7d07c57..c66ba80 100644
--- a/core/src/main/resources/OSGI-INF/blueprint/context.xml
+++ b/core/src/main/resources/OSGI-INF/blueprint/context.xml
@@ -17,10 +17,10 @@
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:cfg="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
 
-    <cfg:property-placeholder persistent-id="com.axemblr.provisionr"
+    <cfg:property-placeholder persistent-id="org.apache.provisionr"
                               placeholder-prefix="$(" placeholder-suffix=")" update-strategy="reload">
         <cfg:default-properties>
-            <cfg:property name="activiti.db.url" value="jdbc:h2:mem:axemblr;MVCC=TRUE;DB_CLOSE_DELAY=-1"/>
+            <cfg:property name="activiti.db.url" value="jdbc:h2:mem:provisionr;MVCC=TRUE;DB_CLOSE_DELAY=-1"/>
             <cfg:property name="activiti.db.user" value="sa"/>
             <cfg:property name="activiti.db.password" value=""/>
             <cfg:property name="activiti.db.schemaUpdate" value="true"/>
@@ -53,12 +53,12 @@
     </bean>
 
     <bean id="configurableFailedJobCommandFactory"
-          class="com.axemblr.provisionr.core.activiti.ConfigurableFailedJobCommandFactory">
+          class="org.apache.provisionr.core.activiti.ConfigurableFailedJobCommandFactory">
         <argument value="$(activiti.job.maxNumberOfRetries)"/>
         <argument value="$(activiti.job.timeBetweenRetriesInSeconds)"/>
     </bean>
 
-    <bean id="configurationFactory" class="com.axemblr.provisionr.core.activiti.ConfigurationFactory">
+    <bean id="configurationFactory" class="org.apache.provisionr.core.activiti.ConfigurationFactory">
         <property name="dataSource" ref="dataSource"/>
         <property name="databaseSchemaUpdate" value="$(activiti.db.schemaUpdate)"/>
         <property name="jobExecutorActivate" value="true"/>
@@ -100,26 +100,26 @@
     <bean id="bouncyCastleAsJceProviderRegistration" class="net.schmizz.sshj.common.SecurityUtils"
           factory-method="getSecurityProvider"/>
 
-    <bean id="poolTemplateInstaller" class="com.axemblr.provisionr.core.templates.PoolTemplateInstaller">
+    <bean id="poolTemplateInstaller" class="org.apache.provisionr.core.templates.PoolTemplateInstaller">
         <argument ref="blueprintBundleContext"/>
     </bean>
     <service ref="poolTemplateInstaller" auto-export="interfaces"/>
 
     <!-- Reusable Activiti activities -->
 
-    <bean id="checkSshPortIsOpen" class="com.axemblr.provisionr.core.activities.IsMachinePortOpen">
+    <bean id="checkSshPortIsOpen" class="org.apache.provisionr.core.activities.IsMachinePortOpen">
         <argument value="sshPortIsOpen"/>
         <argument value="22"/>
     </bean>
     <service ref="checkSshPortIsOpen" auto-export="interfaces"/>
 
-    <bean id="installRepositories" class="com.axemblr.provisionr.core.activities.InstallRepositories"/>
+    <bean id="installRepositories" class="org.apache.provisionr.core.activities.InstallRepositories"/>
     <service ref="installRepositories" auto-export="interfaces"/>
 
-    <bean id="installPackages" class="com.axemblr.provisionr.core.activities.InstallPackages"/>
+    <bean id="installPackages" class="org.apache.provisionr.core.activities.InstallPackages"/>
     <service ref="installPackages" auto-export="interfaces"/>
 
-    <bean id="downloadFiles" class="com.axemblr.provisionr.core.activities.DownloadFiles"/>
+    <bean id="downloadFiles" class="org.apache.provisionr.core.activities.DownloadFiles"/>
     <service ref="downloadFiles" auto-export="interfaces"/>
 
 </blueprint>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com.axemblr.provisionr.cfg
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com.axemblr.provisionr.cfg b/core/src/main/resources/com.axemblr.provisionr.cfg
deleted file mode 100644
index cc2e4a4..0000000
--- a/core/src/main/resources/com.axemblr.provisionr.cfg
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#
-# Database configuration
-#
-
-# We use MVCC to enable row-level locking on h2. This avoids transaction dead locks.
-activiti.db.url=jdbc:h2:data/state;MVCC=TRUE;DB_CLOSE_DELAY=-1
-
-activiti.db.user=sa
-# activiti.db.password=
-
-activiti.db.schemaUpdate=true
-
-#
-# Job Executor configuration
-#
-
-activiti.executor.queueSize=30
-
-activiti.executor.corePoolSize=15
-activiti.executor.maxPoolSize=100
-
-activiti.executor.maxJobsPerAcquisition=30
-
-# between two job acquisitions
-activiti.executor.waitTimeInMillis=1000
-activiti.executor.lockTimeInMillis=600000
-
-
-#
-# Job Retries
-#
-
-# Use -1 for infinity
-activiti.job.maxNumberOfRetries=13
-activiti.job.timeBetweenRetriesInSeconds=10
-

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/puppet/files.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/puppet/files.pp.mustache b/core/src/main/resources/com/axemblr/provisionr/core/puppet/files.pp.mustache
deleted file mode 100644
index b804ab5..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/puppet/files.pp.mustache
+++ /dev/null
@@ -1,25 +0,0 @@
-
-package { "wget":
-  ensure => "installed"
-}
-
-define download_file(
-  $uri,
-  $timeout = 300,
-  $user_agent = "Axemblr Provisionr (https://github.com/axemblr/axemblr-provisionr)"
-) {
-  exec { $name:
-    command => "/usr/bin/wget --no-check-certificate -nv -U '${user_agent}' ${uri} -O ${name}",
-    timeout => $timeout, # seconds
-    logoutput => true,
-    tries => 3,
-    try_sleep => 5, # seconds
-    require => Package["wget"]
-  }
-}
-
-{{#files}}
-download_file {"{{destination}}":
-  uri => "{{source}}"
-}
-{{/files}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/puppet/packages.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/puppet/packages.pp.mustache b/core/src/main/resources/com/axemblr/provisionr/core/puppet/packages.pp.mustache
deleted file mode 100644
index 0826e53..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/puppet/packages.pp.mustache
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# Ensure all packages listed bellow are installed
-Package { ensure => "installed" }
-
-{{#packages}}
-package { "{{package}}": }
-{{/packages}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/puppet/repositories.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/puppet/repositories.pp.mustache b/core/src/main/resources/com/axemblr/provisionr/core/puppet/repositories.pp.mustache
deleted file mode 100644
index 67c4385..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/puppet/repositories.pp.mustache
+++ /dev/null
@@ -1,38 +0,0 @@
-# Register repositories and refresh index
-
-define apt::repository (
-  $content,
-  $key,
-  $apt_sources_dir = "/etc/apt/sources.list.d"
-) {
-  file { "apt::repository ${name}":
-    path    => "${apt_sources_dir}/${name}.list",
-    content => "${content}\n",
-    owner   => root,
-    group   => root,
-    mode    => 0644,
-    ensure  => present
-  }
-  file { "/tmp/${name}.key":
-    content => "${key}"
-  }
-  exec { "apt-key add ${name}":
-    command => "/usr/bin/apt-key add /tmp/${name}.key",
-    unless  => "/usr/bin/apt-key list | /bin/grep -c ${name}",
-    require => File["/tmp/${name}.key"],
-  }
-  exec { "apt-get update ${name}":
-    command => "/usr/bin/apt-get update",
-    require => [Exec["apt-key add ${name}"], File["apt::repository ${name}"]]
-  }
-}
-
-{{#repositories}}
-apt::repository { "{{name}}":
-  content => "{{content}}\n",
-  key => "{{key}}"
-}
-{{/repositories}}
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh3.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh3.xml b/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh3.xml
deleted file mode 100644
index a289182..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh3.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<template id="cdh3" os-version="10.04 LTS">
-    <description>
-        Cloudera CDH3 template for Ubuntu 10.04 LTS (lucid) including the Cloudera Manager installer
-    </description>
-    <packages>
-        <package>cloudera-manager-agent</package>
-        <package>cloudera-manager-daemons</package>
-        <package>oracle-j2sdk1.6</package>
-        <package>hadoop-0.20</package>
-        <package>hadoop-0.20-native</package>
-        <package>hadoop-hive</package>
-        <package>hadoop-pig</package>
-        <package>oozie-client</package>
-        <package>oozie</package>
-        <package>hue-plugins</package>
-        <package>hue-common</package>
-        <package>hue-proxy</package>
-        <package>hue-about</package>
-        <package>hue-help</package>
-        <package>hue-filebrowser</package>
-        <package>hue-jobsub</package>
-        <package>hue-beeswax</package>
-        <package>hue-useradmin</package>
-        <package>hue-shell</package>
-        <package>hue</package>
-    </packages>
-    <ports>
-        <port>7180</port>
-        <port>8888</port>
-        <port>8080</port>
-    </ports>
-    <files>
-        <file source="http://archive.cloudera.com/cm4/installer/latest/cloudera-manager-installer.bin"
-              destination="/opt/cloudera-manager-installer.bin"/>
-    </files>
-    <repositories>
-        <repository id="cloudera-cdh3">
-            <entries>
-                <entry>deb http://archive.cloudera.com/debian lucid-cdh3 contrib</entry>
-            </entries>
-            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.9 (GNU/Linux)
-
-mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
-GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
-dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
-EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
-/F9JBLAEuIuUndiOShoB043iDY+rrqCHqHQ/uI2D4piW9cDYMo7EJlsFtQ5g2SFg
-PcS4+DLhU464dTQsTGAhvcv+F0VQV4iu1HdD2/kKJkCS/MZL4rr4emqsh6VIBDdG
-ytPaA/9cyRJZe2BrBM2pECGncE5RUaM3g37Ka+VnmMVOXgZdzgCxwFZyVhyxzssD
-kB4jcm75UEZx8BiaoPQDQEsBongdx5M4Vwv5XnvUq7sK7eZLmUzW9hmkPjgLea0/
-znchvPsLeT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END PGP PUBLIC KEY BLOCK-----]]></key>
-        </repository>
-        <repository id="cloudera-cm4">
-            <entries>
-                <entry>deb http://archive.cloudera.com/cm4/ubuntu/lucid/amd64/cm lucid-cm4 contrib</entry>
-                <entry>deb-src http://archive.cloudera.com/cm4/ubuntu/lucid/amd64/cm lucid-cm4 contrib</entry>
-            </entries>
-            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.9 (GNU/Linux)
-
-mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
-GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
-dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
-EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
-/F9JBLAEuIuUndiOShoB043iDY+rrqCHqHQ/uI2D4piW9cDYMo7EJlsFtQ5g2SFg
-PcS4+DLhU464dTQsTGAhvcv+F0VQV4iu1HdD2/kKJkCS/MZL4rr4emqsh6VIBDdG
-ytPaA/9cyRJZe2BrBM2pECGncE5RUaM3g37Ka+VnmMVOXgZdzgCxwFZyVhyxzssD
-kB4jcm75UEZx8BiaoPQDQEsBongdx5M4Vwv5XnvUq7sK7eZLmUzW9hmkPjgLea0/
-znchvPsLeTNqSfIcH14TbFt6B2y1G3Vbi5/6UiAaIqLrqjZlCrQXQ2xvdWRlcmEg
-QXB0IFJlcG9zaXRvcnmIYAQTEQIAIAUCSe+CLQIbAwYLCQgHAwIEFQIIAwQWAgMB
-Ah4BAheAAAoJEDJ1dO4CqBjdGQUAnitydC/NGEh0aZXDN1v22pWFpRzTAJ46N4gT
-Zx25oWfyppX3R7fSH+7TPrkCDQRJ74ItEAgAq8s4iMsGhk9nnMF6wlarqHjws4Dw
-NFZBzA1Ah8KnMtrdr8t99OfzY1b7PNzHXujcaTTqL6L881ezdsls9aHp2kr24Btr
-8nqEZJHSjCnQscAGu+NrhoH2KvK+tMRCHGRcy5UNQbLTJi4Hf8Lo+zv0WUy9BCDu
-7HoDlwrrh1Rw5oOwLFc2UXSTEB6BwYna0mZcNjVpfKNHa//wJcKR0AtsCwRT9znP
-GS0Hpqi1l0/iU7sJhNWyyF427ANg+Jv2n4IP+dd734ZiFeJ9tWCtBjfc3MZJKETk
-tiCtX7FVIIqBAmYLwPqcvZMGJMrNzLBtRuuiBv5bFcPpMEhoD40oQEG8uwADBQf/
-f3NpQbuAcZLMzbrHYu3FB/+4ETvDJXJIEUiQUdobWancSBUhuNPOqIgLzIWM1jRu
-jWGIpkeP6iqNW9kDrq26CuMFP2CoVvnaMiLXUvyf62HWAiYXXlZle5O97bvhYMtM
-Y4o5sMo2ktI9IcgYIFicFwcmuGyGL7nJ3Bo9FAUV2LvMe++O/f13jsPpygoTZgGT
-6w0erglWgrgf5pXt8ajlI4TUrlMVg9Iy/tB9ZzVHnpk21o4vLHwZkgXe1WlK/Rze
-ZCruXyXHaFyEJN2zlP2xNj2F2WisL+/HEnl/qzU4IpNI2LQV2aiY9Nt8MBXgSHAh
-gWKWkjiB+tswgzuNsBOTM4hJBBgRAgAJBQJJ74ItAhsMAAoJEDJ1dO4CqBjd988A
-oJ1WlEx2BcFA7W1RMyErejcvB6thAKCf3t0thSQvkoGi3AOJ4Haj/C3yUQ==
-=H6IR
------END PGP PUBLIC KEY BLOCK-----]]></key>
-        </repository>
-    </repositories>
-</template>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh4.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh4.xml b/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh4.xml
deleted file mode 100644
index bd9181b..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/templates/cdh4.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<template id="cdh4" os-version="10.04 LTS">
-    <description>
-        Cloudera CDH4 template for Ubuntu 10.04 LTS (lucid)
-    </description>
-    <packages>
-        <package>openjdk-6-jdk</package>
-        <package>hadoop-0.20-mapreduce-jobtracker</package>
-        <package>hadoop-hdfs-namenode</package>
-        <package>hadoop-0.20-mapreduce-tasktracker</package>
-        <package>hadoop-hdfs-datanode</package>
-        <package>hadoop-client</package>
-        <package>xmlstarlet</package>
-    </packages>
-    <ports>
-        <port>7180</port>
-        <port>8888</port>
-        <port>8080</port>
-        <port>8020</port>
-        <port>50010</port>
-        <port>50020</port>
-    </ports>
-    <repositories>
-        <repository id="cloudera-cdh4">
-            <entries>
-                <entry>deb [arch=amd64] http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib</entry>
-            </entries>
-            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.9 (GNU/Linux)
-
-mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
-GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
-dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
-EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
-/F9JBLAEuIuUndiOShoB043iDY+rrqCHqHQ/uI2D4piW9cDYMo7EJlsFtQ5g2SFg
-PcS4+DLhU464dTQsTGAhvcv+F0VQV4iu1HdD2/kKJkCS/MZL4rr4emqsh6VIBDdG
-ytPaA/9cyRJZe2BrBM2pECGncE5RUaM3g37Ka+VnmMVOXgZdzgCxwFZyVhyxzssD
-kB4jcm75UEZx8Bia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FA7W1RMyErejcvB6thAKCf3t0thSQvkoGi3AOJ4Haj/C3yUQ==
-=H6IR
------END PGP PUBLIC KEY BLOCK-----]]></key>
-        </repository>
-    </repositories>
-</template>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/com/axemblr/provisionr/core/templates/jenkins.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/com/axemblr/provisionr/core/templates/jenkins.xml b/core/src/main/resources/com/axemblr/provisionr/core/templates/jenkins.xml
deleted file mode 100644
index c7297f3..0000000
--- a/core/src/main/resources/com/axemblr/provisionr/core/templates/jenkins.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<template id="jenkins">
-    <description>A short template that installs the latest jenkins with git &amp; svn</description>
-    <packages>
-        <package>jenkins</package>
-        <package>git-core</package>
-        <package>subversion</package>
-    </packages>
-    <ports>
-        <port>8080</port>
-    </ports>
-    <repositories>
-        <repository id="jenkins">
-            <entries>
-                <entry>deb http://pkg.jenkins-ci.org/debian binary/</entry>
-            </entries>
-            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
-        Version: GnuPG v1.4.9 (GNU/Linux)
-
-        mQGiBEmFQG0RBACXScOxb6BTV6rQE/tcJopAEWsdvmE0jNIRWjDDzB7HovX6Anrq
-        n7+Vq4spAReSFbBVaYiiOx2cGDymj2dyx2i9NAI/9/cQXJOU+RPdDzHVlO1Edksp
-        5rKn0cGPWY5sLxRf8s/tO5oyKgwCVgTaB5a8gBHaoGms3nNC4YYf+lqlpwCgjbti
-        3u1iMIx6Rs+dG0+xw1oi5FUD/2tLJMx7vCUQHhPRupeYFPoD8vWpcbGb5nHfHi4U
-        8/x4qZspAIwvXtGw0UBHildGpqe9onp22Syadn/7JgMWhHoFw5Ke/rTMlxREL7pa
-        TiXuagD2G84tjJ66oJP1FigslJzrnG61y85V7THL61OFqDg6IOP4onbsdqHby4VD
-        zZj9A/9uQxIn5250AGLNpARStAcNPJNJbHOQuv0iF3vnG8uO7/oscB0TYb8/juxr
-        hs9GdSN0U0BxENR+8KWy5lttpqLMKlKRknQYy34UstQiyFgAQ9Epncu9uIbVDgWt
-        y7utnqXN033EyYkcWx5EhLAgHkC7wSzeSWABV3JSXN7CeeOif7QiS29oc3VrZSBL
-        YXdhZ3VjaGkgPGtrQGtvaHN1a2Uub3JnPohjBBMRAgAjAhsDBgsJCAcDAgQVAggD
-        BBYCAwECHgECF4AFAko/7vYCGQEACgkQm30y8tUFguabhgCgi54IQR4rpJZ/uUHe
-        ZB879zUWTQwAniQDBO+Zly7Fsvm0Mcvqvl02UzxCtC1Lb2hzdWtlIEthd2FndWNo
-        aSA8a29oc3VrZS5rYXdhZ3VjaGlAc3VuLmNvbT6IYAQTEQIAIAUCSj/qbQIbAwYL
-        CQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEJt9MvLVBYLm38gAoIGR2+TQeJaCeEa8
-        CQhZYzDoiJkQAJ0cpmD+0VA+leOAr5LEccNVd70Z/dHNy83JARAAAQEAAAAAAAAA
-        AAAAAAD/2P/gABBKRklGAAEBAQBgAGAAAP/hAGBFeGlmAABJSSoACAAAAAQAMQEC
-        ABkAAAA+AAAAEFEBAAEAAAABQ5AAEVEEAAEAAAASCwAAElEEAAEAAAASCwAAAAAA
-        AE1hY3JvbWVkaWEgRmlyZXdvcmtzIDQuMAAA/9sAQwAIBgYHBgUIBwcHCQkICgwU
-        DQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy
-        /9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
-        MjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgArgCWAwEiAAIRAQMRAf/EAB8AAAEF
-        AQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQEC
-        AwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkq
-        NDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqS
-        k5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk
-        5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkK
-        C//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGx
-        wQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFla
-        Y2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2
-        t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQAC
-        EQMRAD8A9wEj/wB9vzpfMf8Avt+dRinCpGSeY398/nS72/vH86YKBQBJvb+8fzpd
-        7f3j+dMFLQA/e394/nS7j6n86ZSimA7cfU07cfU1HnFOFADtx9aXJ9TTKUUxD8n1
-        pc+9Mp1AC5ozSUtAC0maKKADNFJ2ooAoCnCmilzWZQ6lFJSimAopaQUtAC54rOvN
-        dsLCTZPPGrdwXAry/wCKHxXfRppND0Mq16Bie5PIi9lHdv5V8/X+rXt/O8tzcyyy
-        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
-        =cjdq
-        -----END PGP PUBLIC KEY BLOCK-----
-    ]]></key>
-        </repository>
-    </repositories>
-</template>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/features.xml b/core/src/main/resources/features.xml
index 62ec269..cc9b586 100644
--- a/core/src/main/resources/features.xml
+++ b/core/src/main/resources/features.xml
@@ -16,7 +16,7 @@
   ~ limitations under the License.
   -->
 
-<features name="axemblr-provisionr-core-features-${project.version}"
+<features name="provisionr-core-features-${project.version}"
           xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
 
     <feature name="activiti-karaf" version="${activiti.version}">
@@ -36,7 +36,7 @@
         <bundle start="true">mvn:org.activiti/activiti-osgi/${activiti.version}</bundle>
     </feature>
 
-    <feature name="axemblr-provisionr-core" version="${project.version}">
+    <feature name="provisionr-core" version="${project.version}">
         <feature version="${activiti.version}">activiti-karaf</feature>
 
         <bundle dependency="true">mvn:com.google.code.gson/gson/${gson.version}</bundle>
@@ -46,29 +46,31 @@
         <bundle dependency="true">
             mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/${jzlib.bundle.version}
         </bundle>
-        <bundle dependency="true">wrap:mvn:com.github.spullara.mustache.java/compiler/${mustache.version}</bundle>
+        <bundle dependency="true">
+            wrap:mvn:com.github.spullara.mustache.java/compiler/${mustache.version}
+        </bundle>
 
-        <bundle start="true">mvn:com.axemblr.provisionr/provisionr-api/${project.version}</bundle>
-        <bundle start="true">mvn:com.axemblr.provisionr/provisionr-core/${project.version}</bundle>
+        <bundle start="true">mvn:org.apache.provisionr/provisionr-api/${project.version}</bundle>
+        <bundle start="true">mvn:org.apache.provisionr/provisionr-core/${project.version}</bundle>
 
-        <configfile finalname="/etc/com.axemblr.provisionr.cfg">
-            mvn:com.axemblr.provisionr/provisionr-core/${project.version}/cfg/defaults
+        <configfile finalname="/etc/org.apache.provisionr.cfg">
+            mvn:org.apache.provisionr/provisionr-core/${project.version}/cfg/defaults
         </configfile>
 
         <configfile finalname="/etc/org.apache.felix.fileinstall-templates.cfg">
-            mvn:com.axemblr.provisionr/provisionr-core/${project.version}/cfg/fileinstall
+            mvn:org.apache.provisionr/provisionr-core/${project.version}/cfg/fileinstall
         </configfile>
 
         <configfile finalname="/templates/cdh3.xml">
-            mvn:com.axemblr.provisionr/provisionr-core/${project.version}/template/cdh3
+            mvn:org.apache.provisionr/provisionr-core/${project.version}/template/cdh3
         </configfile>
 
         <configfile finalname="/templates/cdh4.xml">
-            mvn:com.axemblr.provisionr/provisionr-core/${project.version}/template/cdh4
+            mvn:org.apache.provisionr/provisionr-core/${project.version}/template/cdh4
         </configfile>
 
         <configfile finalname="/templates/jenkins.xml">
-            mvn:com.axemblr.provisionr/provisionr-core/${project.version}/template/jenkins
+            mvn:org.apache.provisionr/provisionr-core/${project.version}/template/jenkins
         </configfile>
     </feature>
 </features>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org.apache.provisionr.cfg
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org.apache.provisionr.cfg b/core/src/main/resources/org.apache.provisionr.cfg
new file mode 100644
index 0000000..cc2e4a4
--- /dev/null
+++ b/core/src/main/resources/org.apache.provisionr.cfg
@@ -0,0 +1,37 @@
+
+#
+# Database configuration
+#
+
+# We use MVCC to enable row-level locking on h2. This avoids transaction dead locks.
+activiti.db.url=jdbc:h2:data/state;MVCC=TRUE;DB_CLOSE_DELAY=-1
+
+activiti.db.user=sa
+# activiti.db.password=
+
+activiti.db.schemaUpdate=true
+
+#
+# Job Executor configuration
+#
+
+activiti.executor.queueSize=30
+
+activiti.executor.corePoolSize=15
+activiti.executor.maxPoolSize=100
+
+activiti.executor.maxJobsPerAcquisition=30
+
+# between two job acquisitions
+activiti.executor.waitTimeInMillis=1000
+activiti.executor.lockTimeInMillis=600000
+
+
+#
+# Job Retries
+#
+
+# Use -1 for infinity
+activiti.job.maxNumberOfRetries=13
+activiti.job.timeBetweenRetriesInSeconds=10
+

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/puppet/files.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/puppet/files.pp.mustache b/core/src/main/resources/org/apache/provisionr/core/puppet/files.pp.mustache
new file mode 100644
index 0000000..e13abb2
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/puppet/files.pp.mustache
@@ -0,0 +1,25 @@
+
+package { "wget":
+  ensure => "installed"
+}
+
+define download_file(
+  $uri,
+  $timeout = 300,
+  $user_agent = "Apache Provisionr (http://provisionr.incubator.apache.org/)"
+) {
+  exec { $name:
+    command => "/usr/bin/wget --no-check-certificate -nv -U '${user_agent}' ${uri} -O ${name}",
+    timeout => $timeout, # seconds
+    logoutput => true,
+    tries => 3,
+    try_sleep => 5, # seconds
+    require => Package["wget"]
+  }
+}
+
+{{#files}}
+download_file {"{{destination}}":
+  uri => "{{source}}"
+}
+{{/files}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/puppet/packages.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/puppet/packages.pp.mustache b/core/src/main/resources/org/apache/provisionr/core/puppet/packages.pp.mustache
new file mode 100644
index 0000000..0826e53
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/puppet/packages.pp.mustache
@@ -0,0 +1,7 @@
+
+# Ensure all packages listed bellow are installed
+Package { ensure => "installed" }
+
+{{#packages}}
+package { "{{package}}": }
+{{/packages}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/puppet/repositories.pp.mustache
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/puppet/repositories.pp.mustache b/core/src/main/resources/org/apache/provisionr/core/puppet/repositories.pp.mustache
new file mode 100644
index 0000000..67c4385
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/puppet/repositories.pp.mustache
@@ -0,0 +1,38 @@
+# Register repositories and refresh index
+
+define apt::repository (
+  $content,
+  $key,
+  $apt_sources_dir = "/etc/apt/sources.list.d"
+) {
+  file { "apt::repository ${name}":
+    path    => "${apt_sources_dir}/${name}.list",
+    content => "${content}\n",
+    owner   => root,
+    group   => root,
+    mode    => 0644,
+    ensure  => present
+  }
+  file { "/tmp/${name}.key":
+    content => "${key}"
+  }
+  exec { "apt-key add ${name}":
+    command => "/usr/bin/apt-key add /tmp/${name}.key",
+    unless  => "/usr/bin/apt-key list | /bin/grep -c ${name}",
+    require => File["/tmp/${name}.key"],
+  }
+  exec { "apt-get update ${name}":
+    command => "/usr/bin/apt-get update",
+    require => [Exec["apt-key add ${name}"], File["apt::repository ${name}"]]
+  }
+}
+
+{{#repositories}}
+apt::repository { "{{name}}":
+  content => "{{content}}\n",
+  key => "{{key}}"
+}
+{{/repositories}}
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/templates/cdh3.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/templates/cdh3.xml b/core/src/main/resources/org/apache/provisionr/core/templates/cdh3.xml
new file mode 100644
index 0000000..a289182
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/templates/cdh3.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template id="cdh3" os-version="10.04 LTS">
+    <description>
+        Cloudera CDH3 template for Ubuntu 10.04 LTS (lucid) including the Cloudera Manager installer
+    </description>
+    <packages>
+        <package>cloudera-manager-agent</package>
+        <package>cloudera-manager-daemons</package>
+        <package>oracle-j2sdk1.6</package>
+        <package>hadoop-0.20</package>
+        <package>hadoop-0.20-native</package>
+        <package>hadoop-hive</package>
+        <package>hadoop-pig</package>
+        <package>oozie-client</package>
+        <package>oozie</package>
+        <package>hue-plugins</package>
+        <package>hue-common</package>
+        <package>hue-proxy</package>
+        <package>hue-about</package>
+        <package>hue-help</package>
+        <package>hue-filebrowser</package>
+        <package>hue-jobsub</package>
+        <package>hue-beeswax</package>
+        <package>hue-useradmin</package>
+        <package>hue-shell</package>
+        <package>hue</package>
+    </packages>
+    <ports>
+        <port>7180</port>
+        <port>8888</port>
+        <port>8080</port>
+    </ports>
+    <files>
+        <file source="http://archive.cloudera.com/cm4/installer/latest/cloudera-manager-installer.bin"
+              destination="/opt/cloudera-manager-installer.bin"/>
+    </files>
+    <repositories>
+        <repository id="cloudera-cdh3">
+            <entries>
+                <entry>deb http://archive.cloudera.com/debian lucid-cdh3 contrib</entry>
+            </entries>
+            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
+GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
+dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
+EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
+/F9JBLAEuIuUndiOShoB043iDY+rrqCHqHQ/uI2D4piW9cDYMo7EJlsFtQ5g2S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rze
+ZCruXyXHaFyEJN2zlP2xNj2F2WisL+/HEnl/qzU4IpNI2LQV2aiY9Nt8MBXgSHAh
+gWKWkjiB+tswgzuNsBOTM4hJBBgRAgAJBQJJ74ItAhsMAAoJEDJ1dO4CqBjd988A
+oJ1WlEx2BcFA7W1RMyErejcvB6thAKCf3t0thSQvkoGi3AOJ4Haj/C3yUQ==
+=H6IR
+-----END PGP PUBLIC KEY BLOCK-----]]></key>
+        </repository>
+        <repository id="cloudera-cm4">
+            <entries>
+                <entry>deb http://archive.cloudera.com/cm4/ubuntu/lucid/amd64/cm lucid-cm4 contrib</entry>
+                <entry>deb-src http://archive.cloudera.com/cm4/ubuntu/lucid/amd64/cm lucid-cm4 contrib</entry>
+            </entries>
+            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
+GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
+dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
+EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
+/F9JBLAEuIuUndiOShoB043iDY+rrqCHqHQ/uI2D4piW9cDYMo7EJlsFtQ5g2SFg
+PcS4+DLhU464dTQsTGAhvcv+F0VQV4iu1HdD2/kKJkCS/MZL4rr4emqsh6VIBDdG
+ytPaA/9cyRJZe2BrBM2pECGncE5RUaM3g37Ka+VnmMVOXgZdzgCxwFZyVhyxzssD
+kB4jcm75UEZx8BiaoPQDQEsBongdx5M4Vwv5XnvUq7sK7eZLmUzW9hmkPjgLea0/
+znchvPsLeTNqSfIcH14TbFt6B2y1G3Vbi5/6UiAaIqLrqjZlCrQXQ2xvdWRlcmE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end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/templates/cdh4.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/templates/cdh4.xml b/core/src/main/resources/org/apache/provisionr/core/templates/cdh4.xml
new file mode 100644
index 0000000..bd9181b
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/templates/cdh4.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template id="cdh4" os-version="10.04 LTS">
+    <description>
+        Cloudera CDH4 template for Ubuntu 10.04 LTS (lucid)
+    </description>
+    <packages>
+        <package>openjdk-6-jdk</package>
+        <package>hadoop-0.20-mapreduce-jobtracker</package>
+        <package>hadoop-hdfs-namenode</package>
+        <package>hadoop-0.20-mapreduce-tasktracker</package>
+        <package>hadoop-hdfs-datanode</package>
+        <package>hadoop-client</package>
+        <package>xmlstarlet</package>
+    </packages>
+    <ports>
+        <port>7180</port>
+        <port>8888</port>
+        <port>8080</port>
+        <port>8020</port>
+        <port>50010</port>
+        <port>50020</port>
+    </ports>
+    <repositories>
+        <repository id="cloudera-cdh4">
+            <entries>
+                <entry>deb [arch=amd64] http://archive.cloudera.com/cdh4/ubuntu/lucid/amd64/cdh lucid-cdh4 contrib</entry>
+            </entries>
+            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+mQGiBEnvgi0RBADLx1qQlXlrvHOo13dUvoWL97Ny/0s0S/GcMEgAqYvZzUPVcq8H
+GUsOb4PLTfcL1H7Ptq9fqr02uIb5Bc/ltdwE9GFaT2nvdfBx9T8jr8LrW9JE2xJq
+dCyFO5yP9YbZeFAxNO3yBxeP85lQ9CdWWLvyYdtQ+T84EYerqkcVbSvYRwCg6zyx
+EE3jWYvyVv/3HTrVTYpgHgMD/2kMR1Z2vEYOSM7h4cnRnxiadhefqJ2WCm4L30Rx
+/F9JBLAE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5pXt8ajlI4TUrlMVg9Iy/tB9ZzVHnpk21o4vLHwZkgXe1WlK/Rze
+ZCruXyXHaFyEJN2zlP2xNj2F2WisL+/HEnl/qzU4IpNI2LQV2aiY9Nt8MBXgSHAh
+gWKWkjiB+tswgzuNsBOTM4hJBBgRAgAJBQJJ74ItAhsMAAoJEDJ1dO4CqBjd988A
+oJ1WlEx2BcFA7W1RMyErejcvB6thAKCf3t0thSQvkoGi3AOJ4Haj/C3yUQ==
+=H6IR
+-----END PGP PUBLIC KEY BLOCK-----]]></key>
+        </repository>
+    </repositories>
+</template>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/main/resources/org/apache/provisionr/core/templates/jenkins.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/provisionr/core/templates/jenkins.xml b/core/src/main/resources/org/apache/provisionr/core/templates/jenkins.xml
new file mode 100644
index 0000000..c7297f3
--- /dev/null
+++ b/core/src/main/resources/org/apache/provisionr/core/templates/jenkins.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template id="jenkins">
+    <description>A short template that installs the latest jenkins with git &amp; svn</description>
+    <packages>
+        <package>jenkins</package>
+        <package>git-core</package>
+        <package>subversion</package>
+    </packages>
+    <ports>
+        <port>8080</port>
+    </ports>
+    <repositories>
+        <repository id="jenkins">
+            <entries>
+                <entry>deb http://pkg.jenkins-ci.org/debian binary/</entry>
+            </entries>
+            <key><![CDATA[-----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1.4.9 (GNU/Linux)
+
+        mQGiBEmFQG0RBACXScOxb6BTV6rQE/tcJopAEWsdvmE0jNIRWjDDzB7HovX6Anrq
+        n7+Vq4spAReSFbBVaYiiOx2cGDymj2dyx2i9NAI/9/cQXJOU+RPdDzHVlO1Edksp
+        5rKn0cGPWY5sLxRf8s/tO5oyKgwCVgTaB5a8gBHaoGms3nNC4YYf+lqlpwCgjbti
+        3u1iMIx6Rs+dG0+xw1oi5FUD/2tLJMx7vCUQHhPRupeYFPoD8vWpcbGb5nHfHi4U
+        8/x4qZspAIwvXtGw0UBHildGpqe9onp22Syadn/7JgMWhHoFw5Ke/rTMlxREL7pa
+        TiXuagD2G84tjJ66oJP1FigslJzrnG61y85V7THL61OFqDg6IOP4onbsdqHby4VD
+        zZj9A/9uQxIn5250AGLNpARStAcNPJNJbHOQuv0iF3vnG8uO7/oscB0TYb8/juxr
+        hs9GdSN0U0BxENR+8KWy5lttpqLMKlKRknQYy34UstQiyFgAQ9Epncu9uIbVDgWt
+        y7utnqXN033EyYkcWx5EhLAgHkC7wSzeSWABV3JSXN7CeeOif7QiS29oc3VrZSBL
+        YXdhZ3VjaGkgPGtrQGtvaHN1a2Uub3JnPohjBBMRAgAjAhsDBgsJCAcDAgQVAggD
+        BBYCAwECHgECF4AFAko/7vYCGQEACgkQm30y8tUFguabhgCgi54IQR4rpJZ/uUHe
+        ZB879zUWTQwAniQDBO+Zly7Fsvm0Mcvqvl02UzxCtC1Lb2hzdWtlIEthd2FndWNo
+        aSA8a29oc3VrZS5rYXdhZ3VjaGlAc3VuLmNvbT6IYAQTEQIAIAUCSj/qbQIbAwYL
+        CQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEJt9MvLVBYLm38gAoIGR2+TQeJaCeEa8
+        CQhZYzDoiJkQAJ0cpmD+0VA+leOAr5LEccNVd70Z/dHNy83JARAAAQEAAAAAAAAA
+        AAAAAAD/2P/gABBKRklGAAEBAQBgAGAAAP/hAGBFeGlmAABJSSoACAAAAAQAMQEC
+        ABkAAAA+AAAAEFEBAAEAAAABQ5AAEVEEAAEAAAASCwAAElEEAAEAAAASCwAAAAAA
+        AE1hY3JvbWVkaWEgRmlyZXdvcmtzIDQuMAAA/9sAQwAIBgYHBgUIBwcHCQkICgwU
+        DQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy
+        /9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
+        MjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgArgCWAwEiAAIRAQMRAf/EAB8AAAEF
+        AQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQEC
+        AwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkq
+        NDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqS
+        k5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk
+        5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkK
+        C//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGx
+        wQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFla
+        Y2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2
+        t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQAC
+        EQMRAD8A9wEj/wB9vzpfMf8Avt+dRinCpGSeY398/nS72/vH86YKBQBJvb+8fzpd
+        7f3j+dMFLQA/e394/nS7j6n86ZSimA7cfU07cfU1HnFOFADtx9aXJ9TTKUUxD8n1
+        pc+9Mp1AC5ozSUtAC0maKKADNFJ2ooAoCnCmilzWZQ6lFJSimAopaQUtAC54rOvN
+        dsLCTZPPGrdwXAry/wCKHxXfRppND0Mq16Bie5PIi9lHdv5V8/X+rXt/O8tzcyyy
+        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
+        =cjdq
+        -----END PGP PUBLIC KEY BLOCK-----
+    ]]></key>
+        </repository>
+    </repositories>
+</template>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/BaseJaxbTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/BaseJaxbTest.java b/core/src/test/java/com/axemblr/provisionr/core/BaseJaxbTest.java
deleted file mode 100644
index c37ccb3..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/BaseJaxbTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2013 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.junit.Before;
-
-public abstract class BaseJaxbTest {
-
-    protected JAXBContext jaxb;
-
-    static {
-        XMLUnit.setIgnoreWhitespace(true);
-        XMLUnit.setIgnoreComments(true);
-        XMLUnit.setIgnoreAttributeOrder(true);
-    }
-
-    @Before
-    public void setUp() throws JAXBException {
-        jaxb = JAXBContext.newInstance(getContextClasses());
-    }
-
-    public abstract Class[] getContextClasses();
-
-    /**
-     * Marshal an object as XML using a standard JAXB Context
-     */
-    protected String asXml(Object obj) throws Exception {
-        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
-        PrintStream out = new PrintStream(outBytes);
-
-        Marshaller marshaller = jaxb.createMarshaller();
-        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-
-        marshaller.marshal(obj, out);
-        return outBytes.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/ProvisionrSupportTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/ProvisionrSupportTest.java b/core/src/test/java/com/axemblr/provisionr/core/ProvisionrSupportTest.java
deleted file mode 100644
index e8b0d96..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/ProvisionrSupportTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.axemblr.provisionr.core;
-
-import static org.fest.assertions.api.Assertions.assertThat;
-
-import com.axemblr.provisionr.api.pool.Pool;
-
-import org.junit.Test;
-
-public class ProvisionrSupportTest {
-
-    @Test
-    public void testConvertTimeout() {
-        ProvisionrSupport provisionr = new ProvisionrSupportTestable();
-        assertThat(provisionr.convertTimeoutToISO8601TimeDuration(600)).isEqualTo("PT10M");
-        assertThat(provisionr.convertTimeoutToISO8601TimeDuration(601)).isEqualTo("PT601S");
-        assertThat(provisionr.convertTimeoutToISO8601TimeDuration(300)).isEqualTo("PT5M");
-        assertThat(provisionr.convertTimeoutToISO8601TimeDuration(42)).isEqualTo("PT42S");
-    }
-}
-
-class ProvisionrSupportTestable extends ProvisionrSupport {
-    @Override
-    public String getId() {
-        return null;
-    }
-    @Override
-    public String startPoolManagementProcess(String businessKey, Pool pool) {
-        return null;
-    }
-    @Override
-    public void destroyPool(String businessKey) {}
-};

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/SshLiveTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/SshLiveTest.java b/core/src/test/java/com/axemblr/provisionr/core/SshLiveTest.java
deleted file mode 100644
index 9798e8a..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/SshLiveTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core;
-
-import com.axemblr.provisionr.api.access.AdminAccess;
-import com.axemblr.provisionr.api.pool.Machine;
-import com.axemblr.provisionr.core.logging.StreamLogger;
-import com.google.common.collect.Lists;
-import com.google.common.io.CharStreams;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.List;
-import java.util.UUID;
-import net.schmizz.sshj.SSHClient;
-import net.schmizz.sshj.connection.channel.direct.Session;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Marker;
-import org.slf4j.MarkerFactory;
-
-public class SshLiveTest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SshLiveTest.class);
-
-    private final Machine localhost = Machine.builder().localhost().createMachine();
-
-    private final AdminAccess adminAccess = AdminAccess.builder()
-        .asCurrentUser().createAdminAccess();
-
-    @Test
-    public void testConnectToLocalhostAndCollectOutput() throws IOException {
-        SSHClient client = Ssh.newClient(localhost, adminAccess, 1000);
-        try {
-            Session session = client.startSession();
-            try {
-                final Session.Command command = session.exec("echo 'stdout' && echo 'stderr' 1>&2");
-
-                String stdout = CharStreams.toString(new InputStreamReader(command.getInputStream()));
-                String stderr = CharStreams.toString(new InputStreamReader(command.getErrorStream()));
-
-                command.join();
-                assertThat(command.getExitStatus()).isEqualTo(0);
-                assertThat(command.getExitErrorMessage()).isNull();
-
-                assertThat(stdout).contains("stdout");
-                assertThat(stderr).contains("stderr");
-
-            } finally {
-                session.close();
-            }
-        } finally {
-            client.close();
-        }
-    }
-
-    @Test
-    public void testConnectStreamLoggerToCommand() throws IOException, InterruptedException {
-        SSHClient client = Ssh.newClient(localhost, adminAccess, 1000);
-        try {
-            Session session = client.startSession();
-            try {
-                final Session.Command command = session.exec("echo 'line1' && echo && echo 'line2'");
-                final List<String> lines = Lists.newCopyOnWriteArrayList();
-
-                StreamLogger logger = new StreamLogger(command.getInputStream(), LOG, MarkerFactory.getMarker("live")) {
-                    @Override
-                    protected void log(Logger logger, Marker marker, String line) {
-                        logger.info(marker, line);  /* just for visual inspection */
-                        lines.add(line);
-                    }
-                };
-                logger.start();
-
-                command.join();
-                logger.join();
-
-                assertThat(lines).hasSize(2).contains("line1", "line2");
-
-            } finally {
-                session.close();
-            }
-        } finally {
-            client.close();
-        }
-    }
-
-    @Test
-    public void testCreateFileOverSsh() throws IOException {
-        SSHClient client = Ssh.newClient(localhost, adminAccess, 1000);
-        try {
-            String destination = "/tmp/" + UUID.randomUUID().toString();
-            String content = UUID.randomUUID().toString();
-
-            Ssh.createFile(client, content, 0600, destination);
-
-            /* Check the file exists and has the expected content */
-            Session session = client.startSession();
-            try {
-                final Session.Command command = session.exec("set +x +e && cat " + destination);
-
-                String output = CharStreams.toString(new InputStreamReader(command.getInputStream()));
-                command.join();
-
-                assertThat(command.getExitStatus()).isEqualTo(0);
-                assertThat(output).contains(content);
-
-            } finally {
-                session.close();
-            }
-        } finally {
-            client.close();
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activiti/AlwaysFailTask.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activiti/AlwaysFailTask.java b/core/src/test/java/com/axemblr/provisionr/core/activiti/AlwaysFailTask.java
deleted file mode 100644
index 049b644..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activiti/AlwaysFailTask.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activiti;
-
-import java.util.Date;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.activiti.engine.delegate.DelegateExecution;
-import org.activiti.engine.delegate.JavaDelegate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AlwaysFailTask implements JavaDelegate {
-
-    private static final Logger LOG = LoggerFactory.getLogger(AlwaysFailTask.class);
-
-    public static final AtomicInteger COUNTER = new AtomicInteger(0);
-
-    @Override
-    public void execute(DelegateExecution execution) throws Exception {
-        COUNTER.incrementAndGet();
-        throw new RuntimeException("Failing. Time is " + new Date());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activiti/ConfigurableFailedJobCommandFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activiti/ConfigurableFailedJobCommandFactoryTest.java b/core/src/test/java/com/axemblr/provisionr/core/activiti/ConfigurableFailedJobCommandFactoryTest.java
deleted file mode 100644
index eadc848..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activiti/ConfigurableFailedJobCommandFactoryTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activiti;
-
-import com.google.common.base.Stopwatch;
-import java.util.concurrent.TimeUnit;
-import org.activiti.engine.ProcessEngine;
-import org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration;
-import org.activiti.engine.impl.jobexecutor.DefaultJobExecutor;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-
-public class ConfigurableFailedJobCommandFactoryTest {
-
-    @Test
-    public void testConfigurableNumberOfRetries() throws InterruptedException {
-        DefaultJobExecutor jobExecutor = new DefaultJobExecutor();
-
-        jobExecutor.setCorePoolSize(2);
-        jobExecutor.setQueueSize(2);
-        jobExecutor.setMaxJobsPerAcquisition(5);
-        jobExecutor.setWaitTimeInMillis(50);
-        jobExecutor.setLockTimeInMillis(180000);
-
-        ProcessEngine processEngine = new StandaloneInMemProcessEngineConfiguration()
-            .setJobExecutorActivate(true)
-            .setJobExecutor(jobExecutor)
-            .setFailedJobCommandFactory(new ConfigurableFailedJobCommandFactory(2, 1))
-            .buildProcessEngine();
-
-        processEngine.getRepositoryService().createDeployment()
-            .addClasspathResource("diagrams/alwaysFail.bpmn20.xml").deploy();
-
-        Stopwatch stopwatch = new Stopwatch().start();
-        processEngine.getRuntimeService().startProcessInstanceByKey("alwaysFail");
-
-        while (AlwaysFailTask.COUNTER.get() != 3 /* = 1 normal execution + 2 retries */) {
-            TimeUnit.MILLISECONDS.sleep(100);
-        }
-
-        stopwatch.stop();
-        assertThat(stopwatch.elapsedTime(TimeUnit.SECONDS)).isGreaterThanOrEqualTo(2);
-
-        processEngine.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesEndedTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesEndedTest.java b/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesEndedTest.java
deleted file mode 100644
index f466d0f..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesEndedTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activities;
-
-import com.axemblr.provisionr.test.ProcessVariablesCollector;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import java.util.Map;
-import org.activiti.engine.RuntimeService;
-import org.activiti.engine.delegate.DelegateExecution;
-import org.activiti.engine.delegate.JavaDelegate;
-import org.activiti.engine.runtime.ProcessInstance;
-import org.activiti.engine.runtime.ProcessInstanceQuery;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class CheckProcessesEndedTest extends CheckProcessesTest {
-
-    private static final String PROCESS_IDS = "process_ids";
-
-    private static final String RESULT = "result";
-
-    @Test
-    public void testWithAListOfEndedProcesses() throws Exception {
-        DelegateExecution execution = mock(DelegateExecution.class);
-        when(execution.getVariable(eq(PROCESS_IDS))).thenReturn(Lists.newArrayList("1", "2"));
-
-        ProcessVariablesCollector collector = new ProcessVariablesCollector();
-        collector.install(execution);
-
-        RuntimeService runtimeService = mockRuntimeService(ImmutableMap.of(
-            "1", mockProcessInstance(/* ended= */ true),
-            "2", mockProcessInstance(/* ended= */ true)
-        ));
-
-        JavaDelegate delegate = new CheckProcessesEnded(runtimeService, PROCESS_IDS, RESULT);
-        delegate.execute(execution);
-
-        assertThat((Boolean) collector.getVariable(RESULT)).isTrue();
-    }
-
-    @Test
-    public void testWithOneEndedAndOneStillRunning() throws Exception {
-        DelegateExecution execution = mock(DelegateExecution.class);
-        when(execution.getVariable(eq(PROCESS_IDS))).thenReturn(Lists.newArrayList("1", "2"));
-
-        ProcessVariablesCollector collector = new ProcessVariablesCollector();
-        collector.install(execution);
-
-        RuntimeService runtimeService = mockRuntimeService(ImmutableMap.of(
-            "1", mockProcessInstance(/* ended= */ true),
-            "2", mockProcessInstance(/* ended= */ false)
-        ));
-
-        JavaDelegate delegate = new CheckProcessesEnded(runtimeService, PROCESS_IDS, RESULT);
-        delegate.execute(execution);
-
-        assertThat((Boolean) collector.getVariable(RESULT)).isFalse();
-    }
-
-    /**
-     * We consider an invalid process instance ID as ended by default
-     */
-    @Test
-    public void testWithOneInvalidProcessId() throws Exception {
-        DelegateExecution execution = mock(DelegateExecution.class);
-        when(execution.getVariable(eq(PROCESS_IDS))).thenReturn(Lists.newArrayList("1", "invalid"));
-
-        ProcessVariablesCollector collector = new ProcessVariablesCollector();
-        collector.install(execution);
-
-        RuntimeService runtimeService = mockRuntimeService(ImmutableMap.of(
-            "1", mockProcessInstance(/* ended= */ true)), "invalid");
-
-        JavaDelegate delegate = new CheckProcessesEnded(runtimeService, PROCESS_IDS, RESULT);
-        delegate.execute(execution);
-
-        assertThat((Boolean) collector.getVariable(RESULT)).isTrue();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesTest.java b/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesTest.java
deleted file mode 100644
index d5448be..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activities/CheckProcessesTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activities;
-
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.Map;
-
-import org.activiti.engine.RuntimeService;
-import org.activiti.engine.runtime.ProcessInstance;
-import org.activiti.engine.runtime.ProcessInstanceQuery;
-
-public abstract class CheckProcessesTest {
-
-    protected RuntimeService mockRuntimeService(Map<String, ProcessInstance> instances, 
-                                              String... notFoundProcessInstanceIds) {
-        RuntimeService runtimeService = mock(RuntimeService.class);
-
-        ProcessInstanceQuery generalQuery = mock(ProcessInstanceQuery.class);
-        for (Map.Entry<String, ProcessInstance> entry : instances.entrySet()) {
-            ProcessInstanceQuery specificQuery = mock(ProcessInstanceQuery.class);
-            when(specificQuery.singleResult()).thenReturn(entry.getValue());
-
-            when(generalQuery.processInstanceId(eq(entry.getKey()))).thenReturn(specificQuery);
-        }
-        for (String notFound : notFoundProcessInstanceIds) {
-            /* create a mock that returns null for all method calls (default) */
-            when(generalQuery.processInstanceId(eq(notFound))).thenReturn(mock(ProcessInstanceQuery.class));
-        }
-        when(runtimeService.createProcessInstanceQuery()).thenReturn(generalQuery);
-
-        return runtimeService;
-    }
-
-    protected ProcessInstance mockProcessInstance(boolean ended) {
-        ProcessInstance processInstance = mock(ProcessInstance.class);
-        when(processInstance.isEnded()).thenReturn(ended);
-        return processInstance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activities/DownloadFilesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activities/DownloadFilesTest.java b/core/src/test/java/com/axemblr/provisionr/core/activities/DownloadFilesTest.java
deleted file mode 100644
index e3bd125..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activities/DownloadFilesTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activities;
-
-import com.axemblr.provisionr.api.pool.Pool;
-import com.axemblr.provisionr.api.software.Software;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class DownloadFilesTest {
-
-    @Test
-    public void testCreatePuppetScript() throws Exception {
-        Software software = Software.builder()
-            .file("http://bin.axemblr.com/test.tar.gz", "/opt/test.tar.gz")
-            .file("http://google.com", "/opt/google.html")
-            .createSoftware();
-
-        Pool pool = mock(Pool.class);
-        when(pool.getSoftware()).thenReturn(software);
-
-        PuppetActivity activity = new DownloadFiles();
-        String content = activity.createPuppetScript(pool, null);
-
-        assertThat(content)
-            .contains("download_file {\"/opt/test.tar.gz\":\n" +
-                "  uri => \"http://bin.axemblr.com/test.tar.gz\"\n" +
-                "}")
-            .contains("download_file {\"/opt/google.html\":\n" +
-                "  uri => \"http://google.com\"\n" +
-                "}");
-
-        assertThat(activity.createAdditionalFiles(pool, null)).isEmpty();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/core/src/test/java/com/axemblr/provisionr/core/activities/InstallPackagesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/com/axemblr/provisionr/core/activities/InstallPackagesTest.java b/core/src/test/java/com/axemblr/provisionr/core/activities/InstallPackagesTest.java
deleted file mode 100644
index 3d840bc..0000000
--- a/core/src/test/java/com/axemblr/provisionr/core/activities/InstallPackagesTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed 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 com.axemblr.provisionr.core.activities;
-
-import com.axemblr.provisionr.api.pool.Pool;
-import com.axemblr.provisionr.api.software.Software;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class InstallPackagesTest {
-
-    @Test
-    public void testCreatePuppetScript() throws Exception {
-        Pool pool = mock(Pool.class);
-        when(pool.getSoftware()).thenReturn(Software.builder()
-            .packages("git-core", "vim").createSoftware());
-
-        PuppetActivity activity = new InstallPackages();
-        String content = activity.createPuppetScript(pool, null);
-
-        assertThat(content).contains(
-            "Package { ensure => \"installed\" }\n" +
-                "\n" +
-                "package { \"git-core\": }\n" +
-                "package { \"vim\": }\n"
-        );
-    }
-}


Mime
View raw message