You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/03/01 17:43:13 UTC
[1/3] brooklyn-dist git commit: Add RPM packaging
Repository: brooklyn-dist
Updated Branches:
refs/heads/master b14ee7912 -> 8975719dc
Add RPM packaging
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/5b1f9b6a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/5b1f9b6a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/5b1f9b6a
Branch: refs/heads/master
Commit: 5b1f9b6a7ca8ec17d0eda3bd416f3dde01eb84fa
Parents: 00248bc
Author: alrick87 <so...@gmail.com>
Authored: Mon Feb 22 18:07:08 2016 +0300
Committer: alrick87 <so...@gmail.com>
Committed: Mon Feb 29 17:46:47 2016 +0300
----------------------------------------------------------------------
packaging/pom.xml | 176 ++++++++++++++++++++++++++++
packaging/src/conf/brooklyn.conf | 26 ++++
packaging/src/conf/logback.xml | 24 ++++
packaging/src/service/brooklyn.service | 33 ++++++
4 files changed, 259 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/5b1f9b6a/packaging/pom.xml
----------------------------------------------------------------------
diff --git a/packaging/pom.xml b/packaging/pom.xml
new file mode 100644
index 0000000..c4c0a99
--- /dev/null
+++ b/packaging/pom.xml
@@ -0,0 +1,176 @@
+<?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>
+ <packaging>jar</packaging>
+ <artifactId>brooklyn-dist</artifactId>
+ <name>Brooklyn RPM Package</name>
+ <description>
+ Brooklyn RPM Package for Centos 7 and RHEL 7 operating systems
+ </description>
+
+ <parent>
+ <groupId>org.apache.brooklyn</groupId>
+ <artifactId>brooklyn-dist-root</artifactId>
+ <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.brooklyn</groupId>
+ <artifactId>brooklyn-all</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- TODO include examples -->
+ <!-- TODO include documentation -->
+ <dependency>
+ <groupId>org.apache.brooklyn</groupId>
+ <artifactId>brooklyn-test-support</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <version>2.1.5</version>
+ <executions>
+ <execution>
+ <id>generate-rpm</id>
+ <goals>
+ <goal>rpm</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <name>apache-brooklyn</name>
+ <license>ASL 2.0</license>
+ <group>Applications/Internet</group>
+ <changelogFile><!--TODO--></changelogFile>
+ <needarch>true</needarch>
+ <targetOS>Linux</targetOS>
+ <mappings>
+ <mapping>
+ <directory>/etc/brooklyn</directory>
+ <configuration>true</configuration>
+ <filemode>755</filemode>
+ <username>brooklyn</username>
+ <groupname>brooklyn</groupname>
+ <sources>
+ <source>
+ <location>src/conf</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/etc/brooklyn</directory>
+ <directoryIncluded>false</directoryIncluded>
+ <configuration>true</configuration>
+ <filemode>600</filemode>
+ <username>brooklyn</username>
+ <groupname>brooklyn</groupname>
+ <sources>
+ <source>
+ <location>src/conf/brooklyn.conf</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/etc/brooklyn</directory>
+ <directoryIncluded>false</directoryIncluded>
+ <configuration>true</configuration>
+ <filemode>644</filemode>
+ <username>brooklyn</username>
+ <groupname>brooklyn</groupname>
+ <sources>
+ <source>
+ <location>src/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>
+ </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>
+ <configuration>true</configuration>
+ <filemode>644</filemode>
+ <username>brooklyn</username>
+ <groupname>brooklyn</groupname>
+ </mapping>
+ <mapping>
+ <directory>/etc/systemd/system/multi-user.target.wants</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+ <sources>
+ <source>
+ <location>src/service</location>
+ </source>
+ </sources>
+ </mapping>
+ </mappings>
+ <preinstallScriptlet>
+ <script>
+ /bin/getent group brooklyn || /sbin/groupadd -r brooklyn
+ /bin/getent passwd brooklyn || /sbin/useradd -r -g brooklyn -d /opt/brooklyn -s /sbin/nologin brooklyn
+ </script>
+ </preinstallScriptlet>
+ <postinstallScriptlet>
+ <script>
+ /bin/systemctl enable brooklyn.service
+ /bin/systemctl daemon-reload
+ /bin/systemctl start brooklyn.service
+ </script>
+ </postinstallScriptlet>
+ <preremoveScriptlet>
+ <script>/bin/systemctl stop brooklyn</script>
+ </preremoveScriptlet>
+ <postremoveScriptlet>
+ <script>/sbin/userdel brooklyn</script>
+ </postremoveScriptlet>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/5b1f9b6a/packaging/src/conf/brooklyn.conf
----------------------------------------------------------------------
diff --git a/packaging/src/conf/brooklyn.conf b/packaging/src/conf/brooklyn.conf
new file mode 100644
index 0000000..3fe950c
--- /dev/null
+++ b/packaging/src/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/5b1f9b6a/packaging/src/conf/logback.xml
----------------------------------------------------------------------
diff --git a/packaging/src/conf/logback.xml b/packaging/src/conf/logback.xml
new file mode 100644
index 0000000..00e8001
--- /dev/null
+++ b/packaging/src/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/5b1f9b6a/packaging/src/service/brooklyn.service
----------------------------------------------------------------------
diff --git a/packaging/src/service/brooklyn.service b/packaging/src/service/brooklyn.service
new file mode 100644
index 0000000..11352c6
--- /dev/null
+++ b/packaging/src/service/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 org.apache.brooklyn.cli.Main launch --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
+Restart=always
+User=brooklyn
+Group=brooklyn
+
+[Install]
+WantedBy=multi-user.target
[2/3] brooklyn-dist git commit: Avoid using global properties
Posted by al...@apache.org.
Avoid using global properties
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/7ec87825
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/7ec87825
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/7ec87825
Branch: refs/heads/master
Commit: 7ec87825c840e5bd92a61046655b5cd3fbcffd1b
Parents: 5b1f9b6
Author: alrick87 <so...@gmail.com>
Authored: Tue Mar 1 18:24:30 2016 +0300
Committer: alrick87 <so...@gmail.com>
Committed: Tue Mar 1 18:24:30 2016 +0300
----------------------------------------------------------------------
packaging/src/service/brooklyn.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/7ec87825/packaging/src/service/brooklyn.service
----------------------------------------------------------------------
diff --git a/packaging/src/service/brooklyn.service b/packaging/src/service/brooklyn.service
index 11352c6..825d22d 100644
--- a/packaging/src/service/brooklyn.service
+++ b/packaging/src/service/brooklyn.service
@@ -24,7 +24,7 @@ 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 org.apache.brooklyn.cli.Main launch --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
+ExecStart=/usr/bin/java org.apache.brooklyn.cli.Main launch --noGlobalBrooklynProperties --localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
Restart=always
User=brooklyn
Group=brooklyn
[3/3] brooklyn-dist git commit: This closes #9
Posted by al...@apache.org.
This closes #9
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/8975719d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/8975719d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/8975719d
Branch: refs/heads/master
Commit: 8975719dc0c5a32ef44d6b6e594ec22e1db4bdb8
Parents: b14ee79 7ec8782
Author: Aled Sage <al...@gmail.com>
Authored: Tue Mar 1 16:42:56 2016 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Tue Mar 1 16:42:56 2016 +0000
----------------------------------------------------------------------
packaging/pom.xml | 176 ++++++++++++++++++++++++++++
packaging/src/conf/brooklyn.conf | 26 ++++
packaging/src/conf/logback.xml | 24 ++++
packaging/src/service/brooklyn.service | 33 ++++++
4 files changed, 259 insertions(+)
----------------------------------------------------------------------