brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [1/2] brooklyn-dist git commit: Fix installed files permissions, add packaging tests
Date Mon, 30 May 2016 15:05:29 GMT
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master 7241a61bb -> b1b6ced2c


Fix installed files permissions, add packaging tests

Also use maven dependency mechanism for using cross-module files.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/9141616f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/9141616f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/9141616f

Branch: refs/heads/master
Commit: 9141616fe65820a6c19b0f5a71003f0e59d75e59
Parents: adca2d1
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue May 10 13:20:27 2016 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Tue May 10 13:20:27 2016 +0300

----------------------------------------------------------------------
 deb-packaging/pom.xml                           |  69 ++++-
 pom.xml                                         |   1 +
 rpm-packaging/pom.xml                           |  73 +++--
 shared-packaging/pom.xml                        |  44 +++
 .../src/main/resources/conf/brooklyn.conf       |  26 ++
 .../src/main/resources/conf/logback.xml         |  24 ++
 .../resources/service/systemd/brooklyn.service  |  33 +++
 .../resources/service/upstart/deb/brooklyn.conf |  45 +++
 .../resources/service/upstart/rpm/brooklyn.conf |  44 +++
 .../src/test/yaml/package-apps.yaml             | 103 +++++++
 shared-packaging/src/test/yaml/package.bom      | 273 +++++++++++++++++++
 src/conf/brooklyn.conf                          |  26 --
 src/conf/logback.xml                            |  24 --
 src/service/systemd/brooklyn.service            |  33 ---
 src/service/upstart/deb/brooklyn.conf           |  45 ---
 src/service/upstart/rpm/brooklyn.conf           |  43 ---
 16 files changed, 704 insertions(+), 202 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/deb-packaging/pom.xml
----------------------------------------------------------------------
diff --git a/deb-packaging/pom.xml b/deb-packaging/pom.xml
index fea43b6..c96a8fd 100644
--- a/deb-packaging/pom.xml
+++ b/deb-packaging/pom.xml
@@ -20,6 +20,7 @@
 <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">
     <modelVersion>4.0.0</modelVersion>
     <artifactId>deb-packaging</artifactId>
+    <packaging>pom</packaging>
     <name>Brooklyn DEB Package</name>
     <description>
         Brooklyn DEB Package for Debian and Ubuntu operating systems
@@ -38,10 +39,47 @@
             <artifactId>brooklyn-dist</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.brooklyn</groupId>
+            <artifactId>shared-packaging</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                          <artifactItems>
+                            <artifactItem>
+                              <groupId>org.apache.brooklyn</groupId>
+                              <artifactId>brooklyn-dist</artifactId>
+                              <version>${project.version}</version>
+                              <classifier>dist</classifier>
+                              <type>tar.gz</type>
+                              <outputDirectory>${project.build.directory}/deps</outputDirectory>
+                            </artifactItem>
+                            <artifactItem>
+                              <groupId>org.apache.brooklyn</groupId>
+                              <artifactId>shared-packaging</artifactId>
+                              <version>${project.version}</version>
+                              <type>jar</type>
+                              <outputDirectory>${project.build.directory}/deps/shared-packaging</outputDirectory>
+                            </artifactItem>
+                          </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <artifactId>jdeb</artifactId>
                 <groupId>org.vafer</groupId>
                 <version>1.5</version>
@@ -52,36 +90,38 @@
                             <goal>jdeb</goal>
                         </goals>
                         <configuration>
-                            <verbose>true</verbose>
+                            <verbose>false</verbose>
+                            <skipPOMs>false</skipPOMs>
                             <deb>${project.build.directory}/apache-brooklyn_${project.version}_all.deb</deb>
                             <controlDir>${basedir}/deb/control</controlDir>
                             <dataSet>
                                 <data>
-                                    <src>../dist/target/brooklyn-dist</src>
+                                    <src>${project.build.directory}/deps/brooklyn-dist-${project.version}</src>
                                     <type>directory</type>
                                     <mapper>
                                         <type>perm</type>
-                                        <prefix>/opt</prefix>
+                                        <prefix>/opt/brooklyn</prefix>
                                         <user>brooklyn</user>
                                         <group>brooklyn</group>
                                     </mapper>
                                 </data>
                                 <data>
-                                    <src>../src/service/upstart/deb/brooklyn.conf</src>
+                                    <src>${project.build.directory}/deps/shared-packaging/service/upstart/deb/brooklyn.conf</src>
                                     <type>file</type>
                                     <mapper>
                                         <type>perm</type>
                                         <prefix>/etc/init</prefix>
-                                        <filemode>755</filemode>
+                                        <filemode>644</filemode>
                                     </mapper>
                                 </data>
                                 <data>
-                                    <src>../src/service/systemd/brooklyn.service</src>
+                                    <!-- TODO Probably should live in /usr/lib/systemd/system with a symlink in the following folder -->
+                                    <src>${project.build.directory}/deps/shared-packaging/service/systemd/brooklyn.service</src>
                                     <type>file</type>
                                     <mapper>
                                         <type>perm</type>
                                         <prefix>/etc/systemd/system/multi-user.target.wants</prefix>
-                                        <filemode>755</filemode>
+                                        <filemode>644</filemode>
                                     </mapper>
                                 </data>
                                 <data>
@@ -89,16 +129,27 @@
                                     <paths>
                                         <path>etc/brooklyn</path>
                                         <path>var/lib/brooklyn</path>
+                                    </paths>
+                                    <mapper>
+                                        <type>perm</type>
+                                        <user>brooklyn</user>
+                                        <group>brooklyn</group>
+                                    </mapper>
+                                </data>
+                                <data>
+                                    <type>template</type>
+                                    <paths>
                                         <path>var/log/brooklyn</path>
                                     </paths>
                                     <mapper>
                                         <type>perm</type>
                                         <user>brooklyn</user>
                                         <group>brooklyn</group>
+                                        <filemode>700</filemode>
                                     </mapper>
                                 </data>
                                 <data>
-                                    <src>../src/conf/brooklyn.conf</src>
+                                    <src>${project.build.directory}/deps/shared-packaging/conf/brooklyn.conf</src>
                                     <type>file</type>
                                     <conffile>true</conffile>
                                     <mapper>
@@ -110,7 +161,7 @@
                                     </mapper>
                                 </data>
                                 <data>
-                                    <src>../src/conf/logback.xml</src>
+                                    <src>${project.build.directory}/deps/shared-packaging/conf/logback.xml</src>
                                     <type>file</type>
                                     <conffile>true</conffile>
                                     <mapper>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bd8bc94..74b5564 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,7 @@
         <module>dist</module>
         <module>vagrant</module>
         <module>archetypes/quickstart</module>
+        <module>shared-packaging</module>
     </modules>
 
     <build>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/rpm-packaging/pom.xml
----------------------------------------------------------------------
diff --git a/rpm-packaging/pom.xml b/rpm-packaging/pom.xml
index 02d2cf6..eba5163 100644
--- a/rpm-packaging/pom.xml
+++ b/rpm-packaging/pom.xml
@@ -39,10 +39,47 @@
             <artifactId>brooklyn-dist</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.brooklyn</groupId>
+            <artifactId>shared-packaging</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                          <artifactItems>
+                            <artifactItem>
+                              <groupId>org.apache.brooklyn</groupId>
+                              <artifactId>brooklyn-dist</artifactId>
+                              <version>${project.version}</version>
+                              <classifier>dist</classifier>
+                              <type>tar.gz</type>
+                              <outputDirectory>${project.build.directory}/deps</outputDirectory>
+                            </artifactItem>
+                            <artifactItem>
+                              <groupId>org.apache.brooklyn</groupId>
+                              <artifactId>shared-packaging</artifactId>
+                              <version>${project.version}</version>
+                              <type>jar</type>
+                              <outputDirectory>${project.build.directory}/deps/shared-packaging</outputDirectory>
+                            </artifactItem>
+                          </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>rpm-maven-plugin</artifactId>
                 <version>2.1.5</version>
@@ -67,15 +104,14 @@
                     <defineStatements>
                         <defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement>
                     </defineStatements>
+                    <defaultDirmode>755</defaultDirmode>
+                    <defaultFilemode>644</defaultFilemode>
+                    <defaultGroupname>brooklyn</defaultGroupname>
+                    <defaultUsername>brooklyn</defaultUsername>
                     <mappings>
                         <mapping>
                             <directory>/etc/brooklyn</directory>
                             <configuration>true</configuration>
-                            <sources>
-                                <source>
-                                    <location>../src/conf</location>
-                                </source>
-                            </sources>
                         </mapping>
                         <mapping>
                             <directory>/etc/brooklyn</directory>
@@ -85,39 +121,30 @@
                             <groupname>brooklyn</groupname>
                             <sources>
                                 <source>
-                                    <location>../src/conf/brooklyn.conf</location>
+                                    <location>${project.build.directory}/deps/shared-packaging/conf/brooklyn.conf</location>
                                 </source>
                             </sources>
                         </mapping>
                         <mapping>
                             <directory>/etc/brooklyn</directory>
                             <configuration>true</configuration>
-                            <filemode>644</filemode>
-                            <username>brooklyn</username>
-                            <groupname>brooklyn</groupname>
                             <sources>
                                 <source>
-                                    <location>../src/conf/logback.xml</location>
+                                    <location>${project.build.directory}/deps/shared-packaging/conf/logback.xml</location>
                                 </source>
                             </sources>
                         </mapping>
                         <mapping>
                             <directory>/opt/brooklyn</directory>
-                            <filemode>755</filemode>
-                            <username>brooklyn</username>
-                            <groupname>brooklyn</groupname>
                             <sources>
                                 <source>
-                                    <location>../dist/target/brooklyn-dist/brooklyn</location>
+                                    <location>${project.build.directory}/deps/brooklyn-dist-${project.version}</location>
                                 </source>
                             </sources>
                         </mapping>
                         <mapping>
                             <directory>/var/lib/brooklyn</directory>
                             <configuration>true</configuration>
-                            <filemode>755</filemode>
-                            <username>brooklyn</username>
-                            <groupname>brooklyn</groupname>
                         </mapping>
                         <mapping>
                             <directory>/var/log/brooklyn</directory>
@@ -128,23 +155,25 @@
                         </mapping>
                         <mapping>
                             <directory>/etc/systemd/system/multi-user.target.wants</directory>
-                            <filemode>755</filemode>
+                            <directoryIncluded>false</directoryIncluded>
+                            <filemode>644</filemode>
                             <username>root</username>
                             <groupname>root</groupname>
                             <sources>
                                 <source>
-                                    <location>../src/service/systemd</location>
+                                    <location>${project.build.directory}/deps/shared-packaging/service/systemd</location>
                                 </source>
                             </sources>
                         </mapping>
                         <mapping>
-                            <directory>/etc/init/</directory>
-                            <filemode>755</filemode>
+                            <directory>/etc/init</directory>
+                            <directoryIncluded>false</directoryIncluded>
+                            <filemode>644</filemode>
                             <username>root</username>
                             <groupname>root</groupname>
                             <sources>
                                 <source>
-                                    <location>../src/service/upstart/rpm/</location>
+                                    <location>${project.build.directory}/deps/shared-packaging/service/upstart/rpm/</location>
                                 </source>
                             </sources>
                         </mapping>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/pom.xml
----------------------------------------------------------------------
diff --git a/shared-packaging/pom.xml b/shared-packaging/pom.xml
new file mode 100644
index 0000000..8e00f6e
--- /dev/null
+++ b/shared-packaging/pom.xml
@@ -0,0 +1,44 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>shared-packaging</artifactId>
+    <packaging>jar</packaging>
+    <name>Brooklyn Shared Package Files</name>
+    <description>
+        Brooklyn shared files for creating RPM and DEB packages
+    </description>
+
+    <parent>
+        <groupId>org.apache.brooklyn</groupId>
+        <artifactId>brooklyn-dist-root</artifactId>
+        <version>0.10.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+   <dependencies>
+     <!-- Not really used, but because of the src/test folder the testing profile is activated and requires the testng as a dependency -->
+     <dependency>
+       <groupId>org.testng</groupId>
+       <artifactId>testng</artifactId>
+       <scope>test</scope>
+     </dependency>
+   </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/main/resources/conf/brooklyn.conf
----------------------------------------------------------------------
diff --git a/shared-packaging/src/main/resources/conf/brooklyn.conf b/shared-packaging/src/main/resources/conf/brooklyn.conf
new file mode 100644
index 0000000..3fe950c
--- /dev/null
+++ b/shared-packaging/src/main/resources/conf/brooklyn.conf
@@ -0,0 +1,26 @@
+# 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.
+
+##################################  Welcome!  ############################################
+
+# It's great to have you here.
+# Documentation is available at https://brooklyn.apache.org/documentation/index.html
+##########################################################################################
+
+brooklyn.base.dir=/var/lib/brooklyn/
+brooklyn.persistence.dir=data
+brooklyn.persistence.backups.dir=backups

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/main/resources/conf/logback.xml
----------------------------------------------------------------------
diff --git a/shared-packaging/src/main/resources/conf/logback.xml b/shared-packaging/src/main/resources/conf/logback.xml
new file mode 100644
index 0000000..00e8001
--- /dev/null
+++ b/shared-packaging/src/main/resources/conf/logback.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+<configuration>
+    <property name="logging.basename" scope="context" value="brooklyn" />
+    <property name="logging.dir" scope="context" value="/var/log/brooklyn/" />
+    <include resource="logback-main.xml"/>
+</configuration>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/main/resources/service/systemd/brooklyn.service
----------------------------------------------------------------------
diff --git a/shared-packaging/src/main/resources/service/systemd/brooklyn.service b/shared-packaging/src/main/resources/service/systemd/brooklyn.service
new file mode 100644
index 0000000..5986555
--- /dev/null
+++ b/shared-packaging/src/main/resources/service/systemd/brooklyn.service
@@ -0,0 +1,33 @@
+# 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.
+
+[Unit]
+Description=Apache Brooklyn Service
+Documentation=https://brooklyn.apache.org/documentation/index.html
+
+[Service]
+Type=simple
+WorkingDirectory=/opt/brooklyn/
+Environment="JAVA_OPTS=-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
+Environment="CLASSPATH=/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
+ExecStart=/usr/bin/java $JAVA_OPTS -cp "$CLASSPATH" org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
+Restart=always
+User=brooklyn
+Group=brooklyn
+
+[Install]
+WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/main/resources/service/upstart/deb/brooklyn.conf
----------------------------------------------------------------------
diff --git a/shared-packaging/src/main/resources/service/upstart/deb/brooklyn.conf b/shared-packaging/src/main/resources/service/upstart/deb/brooklyn.conf
new file mode 100644
index 0000000..63c454e
--- /dev/null
+++ b/shared-packaging/src/main/resources/service/upstart/deb/brooklyn.conf
@@ -0,0 +1,45 @@
+# 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.
+
+description "Apache Brooklyn upstart script"
+author "Aleksandr Vasilev aleksandr.vasilev@cloudsoftcorp.com"
+
+start on started networking
+stop on runlevel [016]
+respawn
+respawn limit 5 10
+
+setuid brooklyn
+setgid brooklyn
+
+console log
+
+pre-start script
+    logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
+end script
+
+script
+    BROOKLYN_HOME="/opt/brooklyn/"
+    JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
+    CLASSPATH="/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
+    export BROOKLYN_HOME
+    exec java ${JAVA_OPTS} -cp "${CLASSPATH}" org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
+end script
+
+pre-stop script
+  logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
+end script

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/main/resources/service/upstart/rpm/brooklyn.conf
----------------------------------------------------------------------
diff --git a/shared-packaging/src/main/resources/service/upstart/rpm/brooklyn.conf b/shared-packaging/src/main/resources/service/upstart/rpm/brooklyn.conf
new file mode 100644
index 0000000..77beb54
--- /dev/null
+++ b/shared-packaging/src/main/resources/service/upstart/rpm/brooklyn.conf
@@ -0,0 +1,44 @@
+# 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.
+
+description "Apache Brooklyn upstart script"
+author "Aleksandr Vasilev aleksandr.vasilev@cloudsoftcorp.com"
+
+start on runlevel [23]
+stop on runlevel [016]
+respawn
+respawn limit 5 10
+
+console output
+
+pre-start script
+    logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
+end script
+
+script
+    BROOKLYN_HOME="/opt/brooklyn/"
+    JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
+    CLASSPATH="/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
+    export BROOKLYN_HOME
+    # Upstart is too old on CentOS 6, at least v1.4 required to use setuid, setgid.
+    chsh -s /bin/bash brooklyn
+    exec su -c "java ${JAVA_OPTS} -cp $CLASSPATH org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto" brooklyn
+end script
+
+pre-stop script
+  logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
+end script

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/test/yaml/package-apps.yaml
----------------------------------------------------------------------
diff --git a/shared-packaging/src/test/yaml/package-apps.yaml b/shared-packaging/src/test/yaml/package-apps.yaml
new file mode 100644
index 0000000..5009e56
--- /dev/null
+++ b/shared-packaging/src/test/yaml/package-apps.yaml
@@ -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.
+#
+services:
+- type: test-apt-systemd-brooklyn
+  name: 1. apt-systemd
+  location:
+    byon:
+      hosts: ["172.28.128.3"]
+      # privateKeyFile: ~/.ssh/<private key>
+      user: vagrant
+  brooklyn.config:
+    files.preinstall:
+      ~/.m2/repository/org/apache/brooklyn/deb-packaging/0.10.0-SNAPSHOT/deb-packaging-0.10.0-SNAPSHOT.deb: brooklyn-package.deb # BROOKLYN_VERSION
+
+---
+
+services:
+- type: test-apt-upstart-brooklyn
+  name: 2. apt-upstart
+  location:
+    byon:
+      hosts: ["172.28.128.4"]
+      # privateKeyFile: ~/.ssh/<private key>
+      user: vagrant
+  brooklyn.config:
+    files.preinstall:
+      ~/.m2/repository/org/apache/brooklyn/deb-packaging/0.10.0-SNAPSHOT/deb-packaging-0.10.0-SNAPSHOT.deb: brooklyn-package.deb # BROOKLYN_VERSION
+
+---
+
+services:
+- type: test-yum-systemd-brooklyn
+  name: 3. yum-systemd
+  location:
+    byon:
+      hosts: ["172.28.128.5"]
+      # privateKeyFile: ~/.ssh/<private key>
+      user: vagrant
+  brooklyn.config:
+    files.preinstall:
+      ~/.m2/repository/org/apache/brooklyn/rpm-packaging/0.10.0-SNAPSHOT/rpm-packaging-0.10.0-SNAPSHOT.rpm: brooklyn-package.rpm # BROOKLYN_VERSION
+
+---
+
+services:
+- type: test-yum-upstart-brooklyn
+  name: 4. yum-upstart
+  location:
+    byon:
+      hosts: ["172.28.128.6"]
+      # privateKeyFile: ~/.ssh/<private key>
+      user: vagrant
+  brooklyn.config:
+    files.preinstall:
+      ~/.m2/repository/org/apache/brooklyn/rpm-packaging/0.10.0-SNAPSHOT/rpm-packaging-0.10.0-SNAPSHOT.rpm: brooklyn-package.rpm # BROOKLYN_VERSION
+
+
+---
+
+# Vagrantfile
+Vagrant.configure(2) do |config|
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "1024"
+    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
+    vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
+  end
+  config.vm.provision "shell", privileged: false, inline: <<-SHELL
+    echo "<REPLACE public key fingerprint>" >> ~/.ssh/authorized_keys
+  SHELL
+
+  config.vm.define "apt-systemd" do |config|
+    config.vm.box = "ubuntu/wily64"
+    config.vm.network "private_network", ip: "172.28.128.3"
+  end
+  config.vm.define "apt-upstart" do |config|
+    config.vm.box = "ubuntu/trusty64"
+    config.vm.network "private_network", ip: "172.28.128.4"
+  end
+  config.vm.define "yum-systemd" do |config|
+    config.vm.box = "centos/7"
+    config.vm.network "private_network", ip: "172.28.128.5"
+  end
+  config.vm.define "yum-upstart" do |config|
+    config.vm.box = "nrel/CentOS-6.5-x86_64"
+    config.vm.network "private_network", ip: "172.28.128.6"
+  end
+end

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/shared-packaging/src/test/yaml/package.bom
----------------------------------------------------------------------
diff --git a/shared-packaging/src/test/yaml/package.bom b/shared-packaging/src/test/yaml/package.bom
new file mode 100644
index 0000000..7c951cf
--- /dev/null
+++ b/shared-packaging/src/test/yaml/package.bom
@@ -0,0 +1,273 @@
+#
+# 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.
+#
+brooklyn.catalog:
+  version: 0.10.0-SNAPSHOT  # BROOKLYN_VERSION
+### brooklyn install entities ###
+  apt-config: &apt-config
+    install.command: |
+      sudo apt-get update
+      sudo apt-get install -y default-jre-headless
+      sudo dpkg -i brooklyn-package.deb
+  yum-config: &yum-config
+    install.command: |
+      if sudo iptables -L | grep REJECT; then
+        # Only for CentOS 6
+        sudo iptables -I INPUT -p tcp -m tcp --dport 8081 -j ACCEPT
+        sudo service iptables save
+      fi
+      sudo yum -y install java-1.7.0-openjdk.x86_64
+      sudo yum -y install brooklyn-package.rpm
+  items:
+  - id: systemd-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
+      brooklyn.config:
+        launch.command: |
+          sudo systemctl start brooklyn
+        checkRunning.command: |
+          sudo systemctl status brooklyn
+        stop.command: |
+          sudo systemctl stop brooklyn
+  - id: upstart-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
+      brooklyn.config:
+        launch.command: |
+          sudo status brooklyn | grep running || sudo start brooklyn
+        checkRunning.command: |
+          sudo status brooklyn | grep running
+        stop.command: |
+          sudo stop brooklyn
+  - id: apt-systemd-brooklyn
+    item:
+      type: systemd-brooklyn
+      id: brooklyn
+      brooklyn.config: *apt-config
+  - id: apt-upstart-brooklyn
+    item:
+      type: upstart-brooklyn
+      id: brooklyn
+      brooklyn.config: *apt-config
+  - id: yum-systemd-brooklyn
+    item:
+      type: systemd-brooklyn
+      id: brooklyn
+      brooklyn.config: *yum-config
+  - id: yum-upstart-brooklyn
+    item:
+      type: upstart-brooklyn
+      id: brooklyn
+      brooklyn.config: *yum-config
+### Tests ###
+  - id: test-is-up
+    item:
+      type: org.apache.brooklyn.test.framework.TestSensor
+      name: Check server is up
+      sensor: service.isUp
+      assert:
+      - equals: true
+  - id: test-is-not-up
+    item:
+      type: org.apache.brooklyn.test.framework.TestSensor
+      name: Check server is up
+      sensor: service.isUp
+      assert:
+      - equals: false
+  - id: test-process-running
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Check process has started
+      # The brackets prevent grep from matching its own process
+      command: ps ax | grep "[o]rg.apache.brooklyn.cli.Main"
+      assertStatus:
+        equals: 0
+      assertOut:
+        isEmpty: false
+      assertErr:
+        isEmpty: true
+  - id: test-process-not-running
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Check process is not started
+      # The brackets prevent grep from matching its own process
+      command: ps ax | grep "[o]rg.apache.brooklyn.cli.Main"
+      assertStatus:
+        equals: 1
+      assertOut:
+        isEmpty: true
+      assertErr:
+        isEmpty: true
+  - id: test-process-user
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Check user the process is running under
+      # The brackets prevent grep from matching its own process
+      command: ps -fu brooklyn | grep "[o]rg.apache.brooklyn.cli.Main"
+      assertStatus:
+        equals: 0
+      assertOut:
+        isEmpty: false
+      assertErr:
+        isEmpty: true
+  - id: test-port-reachable
+    item:
+      type: org.apache.brooklyn.test.framework.TestHttpCall
+      name: Check HTTP Response Status Code
+      url:
+        $brooklyn:formatString:
+        - "http://%s:8081/"
+        - $brooklyn:entity("brooklyn").attributeWhenReady("host.address")
+      applyAssertionTo: status
+      assert:
+      - isEqualTo: 401
+  - id: test-path-permissions
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Check paths permissions
+      command: |
+        [ "$(stat -c "%A %U %G" /opt/brooklyn)" = "drwxr-xr-x brooklyn brooklyn" ] && \
+        [ "$(stat -c "%A %U %G" /var/lib/brooklyn)" = "drwxr-xr-x brooklyn brooklyn" ] && \
+        [ "$(stat -c "%A %U %G" /var/log/brooklyn)" = "drwx------ brooklyn brooklyn" ] && \
+        [ "$(stat -c "%A %U %G" /etc/systemd/system/multi-user.target.wants)" = "drwxr-xr-x root root" ] && \
+        [ "$(sudo stat -c "%A %U %G" /etc/systemd/system/multi-user.target.wants/brooklyn.service)" = "-rw-r--r-- root root" ] && \
+        [ "$(stat -c "%A %U %G" /etc/init)" = "drwxr-xr-x root root" ] && \
+        [ "$(stat -c "%A %U %G" /etc/init/brooklyn.conf)" = "-rw-r--r-- root root" ] && \
+        [ "$(stat -c "%A %U %G" /etc/brooklyn)" = "drwxr-xr-x brooklyn brooklyn" ] && \
+        [ "$(sudo stat -c "%A %U %G" /etc/brooklyn/brooklyn.conf)" = "-rw------- brooklyn brooklyn" ] && \
+        [ "$(stat -c "%A %U %G" /etc/brooklyn/logback.xml)" = "-rw-r--r-- brooklyn brooklyn" ] && \
+        ! find /opt/brooklyn | xargs stat -c "%A %U %G" | grep -v "drwxr-xr-x brooklyn brooklyn\|-rw-r--r-- brooklyn brooklyn"
+      assertStatus:
+        equals: 0
+  - id: test-log-files-exist
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Check log files created at expected location
+      command: sudo ls /var/log/brooklyn/brooklyn.{debug,info}.log | wc -l
+      assertOut:
+        equals: "2"
+  - id: test-healthy
+    item:
+      type: org.apache.brooklyn.test.framework.TestCase
+      name: Check entity is healthy
+      brooklyn.children:
+      - type: test-is-up
+        name: 001. Test isUp
+      - type: test-process-running
+        name: 002. Test process is running
+      - type: test-port-reachable
+        name: 003. Test port is reachable
+  - id: test-start
+    item:
+      type: org.apache.brooklyn.test.framework.TestEffector
+      name: Invoke start Effector
+      effector: start
+  - id: test-stop
+    item:
+      type: org.apache.brooklyn.test.framework.TestEffector
+      name: Invoke stop Effector
+      effector: stop
+      params:
+        stopMachineMode: NEVER
+  - id: test-restart
+    item:
+      type: org.apache.brooklyn.test.framework.TestEffector
+      name: Invoke restart Effector
+      effector: restart
+      params:
+        restartMachine: false
+  - id: test-restart-machine
+    item:
+      type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
+      name: Restart the machine
+      command: sudo shutdown -r now
+      assertStatus:
+        # Replacement for anything accepted
+        # Could be 0 or -1, depending on whether the socket closes before restart takes place
+        notNull: true
+  - id: packaging-asserts
+    item:
+      type: org.apache.brooklyn.test.framework.TestCase
+      targetId: brooklyn
+      brooklyn.config:
+        timeout: 1m
+      brooklyn.children:
+      - type: test-is-up
+        name: 01. Block until started
+        brooklyn.config:
+          timeout: 10m
+      - type: test-healthy
+        name: 02. Check healthy
+      - type: test-process-user
+        name: 03. Test process user
+      - type: test-path-permissions
+        name: 04. Test paths permissions
+      - type: test-log-files-exist
+        name: 05. Check log files created
+      - type: test-stop
+        name: 06. Test stop effector
+      - type: test-is-not-up
+        name: 07. Check not running
+      - type: test-process-not-running
+        name: 08. Check process not running
+      - type: test-start
+        name: 09. Test start effector
+      - type: test-healthy
+        name: 10. Check healthy
+      - type: test-restart
+        name: 11. Test restart effector
+      - type: test-healthy
+        name: 12. Check healthy
+      - type: test-restart-machine
+        name: 13. Restart machine
+      - type: test-is-not-up
+        name: 14. Check not running while restarting
+      - type: test-healthy
+        name: 15. Check healthy
+### Combined tests with target entity - system specific ###
+  - id: test-yum-upstart-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.stock.BasicApplication
+      brooklyn.children:
+      - type: yum-upstart-brooklyn
+      - type: packaging-asserts
+  - id: test-yum-systemd-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.stock.BasicApplication
+      brooklyn.children:
+      - type: yum-systemd-brooklyn
+      - type: packaging-asserts
+  - id: test-apt-upstart-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.stock.BasicApplication
+      brooklyn.children:
+      - type: apt-upstart-brooklyn
+      - type: packaging-asserts
+  - id: test-apt-systemd-brooklyn
+    item:
+      type: org.apache.brooklyn.entity.stock.BasicApplication
+      brooklyn.children:
+      - type: apt-systemd-brooklyn
+      - type: packaging-asserts
+### How to use in a blueprint:
+### location: xxx
+### services:
+### - type: test-apt-systemd-brooklyn
+###   brooklyn.config:
+###     files.preinstall:
+###       <path to package>: brooklyn-package.{deb, rpm}

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/src/conf/brooklyn.conf
----------------------------------------------------------------------
diff --git a/src/conf/brooklyn.conf b/src/conf/brooklyn.conf
deleted file mode 100644
index 3fe950c..0000000
--- a/src/conf/brooklyn.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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.
-
-##################################  Welcome!  ############################################
-
-# It's great to have you here.
-# Documentation is available at https://brooklyn.apache.org/documentation/index.html
-##########################################################################################
-
-brooklyn.base.dir=/var/lib/brooklyn/
-brooklyn.persistence.dir=data
-brooklyn.persistence.backups.dir=backups

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/src/conf/logback.xml
----------------------------------------------------------------------
diff --git a/src/conf/logback.xml b/src/conf/logback.xml
deleted file mode 100644
index 00e8001..0000000
--- a/src/conf/logback.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
--->
-<configuration>
-    <property name="logging.basename" scope="context" value="brooklyn" />
-    <property name="logging.dir" scope="context" value="/var/log/brooklyn/" />
-    <include resource="logback-main.xml"/>
-</configuration>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/src/service/systemd/brooklyn.service
----------------------------------------------------------------------
diff --git a/src/service/systemd/brooklyn.service b/src/service/systemd/brooklyn.service
deleted file mode 100644
index 5986555..0000000
--- a/src/service/systemd/brooklyn.service
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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.
-
-[Unit]
-Description=Apache Brooklyn Service
-Documentation=https://brooklyn.apache.org/documentation/index.html
-
-[Service]
-Type=simple
-WorkingDirectory=/opt/brooklyn/
-Environment="JAVA_OPTS=-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
-Environment="CLASSPATH=/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
-ExecStart=/usr/bin/java $JAVA_OPTS -cp "$CLASSPATH" org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
-Restart=always
-User=brooklyn
-Group=brooklyn
-
-[Install]
-WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/src/service/upstart/deb/brooklyn.conf
----------------------------------------------------------------------
diff --git a/src/service/upstart/deb/brooklyn.conf b/src/service/upstart/deb/brooklyn.conf
deleted file mode 100644
index fc7be9e..0000000
--- a/src/service/upstart/deb/brooklyn.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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.
-
-description "Apache Brooklyn upstart script"
-author "Aleksandr Vasilev aleksandr.vasilev@cloudsoftcorp.com"
-
-start on started networking
-stop on runlevel [016]
-respawn
-respawn limit 5 10
-
-setuid brooklyn
-setgid brooklyn
-
-console output
-
-pre-start script
-    logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
-end script
-
-script
-    BROOKLYN_HOME="/opt/brooklyn/"
-    JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
-    CLASSPATH="/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
-    export BROOKLYN_HOME
-    exec java ${JAVA_OPTS} -cp "${CLASSPATH}" org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
-end script
-
-pre-stop script
-  logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
-end script

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/9141616f/src/service/upstart/rpm/brooklyn.conf
----------------------------------------------------------------------
diff --git a/src/service/upstart/rpm/brooklyn.conf b/src/service/upstart/rpm/brooklyn.conf
deleted file mode 100644
index e9c5e20..0000000
--- a/src/service/upstart/rpm/brooklyn.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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.
-
-description "Apache Brooklyn upstart script"
-author "Aleksandr Vasilev aleksandr.vasilev@cloudsoftcorp.com"
-
-start on started networking
-stop on runlevel [016]
-respawn
-respawn limit 5 10
-
-console output
-
-pre-start script
-    logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
-end script
-
-script
-    BROOKLYN_HOME="/opt/brooklyn/"
-    JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g -XX:MaxPermSize=256m"
-    CLASSPATH="/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
-    export BROOKLYN_HOME
-    chsh -s /bin/bash brooklyn
-    exec su -c "java ${JAVA_OPTS} -cp $CLASSPATH org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto" brooklyn
-end script
-
-pre-stop script
-  logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
-end script


Mime
View raw message