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: Make the brooklyn server config discoverable by OSGi and downstream projects
Date Wed, 11 Jan 2017 18:01:54 GMT
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master c982e795d -> 378f6c6ef


Make the brooklyn server config discoverable by OSGi and downstream projects

Signed-off-by: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>


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

Branch: refs/heads/master
Commit: 4b800c30cc503ad14c94a488a7a8dff05f55863e
Parents: c982e79
Author: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>
Authored: Thu Jan 5 15:54:32 2017 +0000
Committer: Thomas Bouron <thomas.bouron@cloudsoftcorp.com>
Committed: Wed Jan 11 17:49:55 2017 +0000

----------------------------------------------------------------------
 karaf/apache-brooklyn/pom.xml                   | 44 +++++++++++++
 .../etc/org.apache.brooklyn.classrename.cfg     | 21 ------
 ....apache.brooklyn.core.catalog.bomscanner.cfg | 27 --------
 .../etc/org.apache.brooklyn.osgilauncher.cfg    | 68 --------------------
 karaf/config/pom.xml                            | 62 ++++++++++++++++++
 .../org.apache.brooklyn.classrename.cfg         | 21 ++++++
 ....apache.brooklyn.core.catalog.bomscanner.cfg | 27 ++++++++
 .../org.apache.brooklyn.osgilauncher.cfg        | 67 +++++++++++++++++++
 karaf/features/src/main/feature/feature.xml     | 13 ++++
 karaf/pom.xml                                   |  1 +
 10 files changed, 235 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/apache-brooklyn/pom.xml
----------------------------------------------------------------------
diff --git a/karaf/apache-brooklyn/pom.xml b/karaf/apache-brooklyn/pom.xml
index 2068704..4cdaa30 100755
--- a/karaf/apache-brooklyn/pom.xml
+++ b/karaf/apache-brooklyn/pom.xml
@@ -143,6 +143,50 @@
           <skip>true</skip>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack</id>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>brooklyn-dist-config</artifactId>
+                  <version>${project.version}</version>
+                  <classifier>classrename</classifier>
+                  <type>cfg</type>
+                  <outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
+                  <destFileName>${project.groupId}.classrename.cfg</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>brooklyn-dist-config</artifactId>
+                  <version>${project.version}</version>
+                  <classifier>core.catalog.bomscanner</classifier>
+                  <type>cfg</type>
+                  <outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
+                  <destFileName>${project.groupId}.core.catalog.bomscanner.cfg</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>brooklyn-dist-config</artifactId>
+                  <version>${project.version}</version>
+                  <classifier>osgilauncher</classifier>
+                  <type>cfg</type>
+                  <outputDirectory>${project.build.directory}/assembly/etc</outputDirectory>
+                  <destFileName>${project.groupId}.osgilauncher.cfg</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.classrename.cfg
----------------------------------------------------------------------
diff --git a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.classrename.cfg
b/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.classrename.cfg
deleted file mode 100644
index 839eead..0000000
--- a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.classrename.cfg
+++ /dev/null
@@ -1,21 +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.
-#
-################################################################################
-
-# This file can contains custom deserialization class mappings for the persistence state
-# Syntax should be <old-class>=<new-class>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.core.catalog.bomscanner.cfg
----------------------------------------------------------------------
diff --git a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.core.catalog.bomscanner.cfg
b/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.core.catalog.bomscanner.cfg
deleted file mode 100644
index 242dfd6..0000000
--- a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.core.catalog.bomscanner.cfg
+++ /dev/null
@@ -1,27 +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.
-#
-################################################################################
-
-# CSV Whitelist of regular expressions to match bundle symbolic id if bundle is to be permitted
to add
-# applications (templates) to the catalog
-whiteList=.*
-
-# CSV Blacklist of regular expressions to match bundle symbolic id to prevent selected whitelisted
bundles
-# adding applications (templates) to the catalog
-blackList=
-

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.osgilauncher.cfg
----------------------------------------------------------------------
diff --git a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.osgilauncher.cfg
b/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.osgilauncher.cfg
deleted file mode 100644
index dfc2adb..0000000
--- a/karaf/apache-brooklyn/src/main/resources/etc/org.apache.brooklyn.osgilauncher.cfg
+++ /dev/null
@@ -1,68 +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.
-#
-################################################################################
-
-# This file temporarily contains boot settings for brooklyn karaf launcher,
-# matching some of the command-line options of the previous brooklyn-cli launcher
-# (those used during the initialization sequence)
-#
-# Most of these will migrate to a permanent cfg file, once the components themselves get
refactored
-# and the configuration options are agreed upon
-
-# Location of the global brooklyn.properties file
-#globalBrooklynPropertiesFile=~/.brooklyn/brooklyn.properties
-
-# Location of the default catalog.bom
-default.catalog.location=${karaf.etc}/default.catalog.bom
-
-# Location of the local brooklyn.properties file, normally specified at the cli. Overrides
properties from the global set.
-#localBrooklynPropertiesFile=
-
-
-# Ignore catalog subsystem failures during startup (default is to continue, so errors can
be viewed via the API)
-#ignoreCatalogErrors=true
-
-# Ignore persistence/HA subsystem failures during startup (default is to continue, so errors
can be viewed via the API)
-#ignorePersistenceErrors=true
-
-# The high availability mode. Possible values are:
-# - DISABLED: management node works in isolation - will not cooperate with any other standby/master
nodes in management plane;
-# - AUTO: will look for other management nodes, and will allocate itself as standby or master
based on other nodes' states;
-# - MASTER: will startup as master - if there is already a master then fails immediately;
-# - STANDBY: will start up as lukewarm standby with no state - if there is not already a
master then fails immediately,
-#   and if there is a master which subsequently fails, this node can promote itself;
-# - HOT_STANDBY: will start up as hot standby in read-only mode - if there is not already
a master then fails immediately,
-#   and if there is a master which subseuqently fails, this node can promote itself;
-# - HOT_BACKUP: will start up as hot backup in read-only mode - no master is required, and
this node will not become a master
-#highAvailabilityMode=DISABLED
-
-# The persistence mode. Possible values are:
-# - AUTO: will rebind to any existing state, or start up fresh if no state;
-# - DISABLED: will not read or persist any state;
-# - REBIND: will rebind to the existing state, or fail if no state available;
-# - CLEAN: will start up fresh (removing any existing state)
-#persistMode=AUTO
-
-# The directory to read/write persisted state (or container name if using an object store)
-#persistenceDir=
-
-# The location spec for an object store to read/write persisted state
-#persistenceLocation=
-
-# Periodic read-only rebind
-#persistPeriod=1s

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/config/pom.xml
----------------------------------------------------------------------
diff --git a/karaf/config/pom.xml b/karaf/config/pom.xml
new file mode 100644
index 0000000..841afa5
--- /dev/null
+++ b/karaf/config/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>brooklyn-dist-karaf</artifactId>
+        <groupId>org.apache.brooklyn</groupId>
+        <version>0.11.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>brooklyn-dist-config</artifactId>
+
+    <name>Brooklyn Karaf Server Configuration</name>
+    <description>
+        Brooklyn Karaf Server Configuration
+    </description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifact</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>
+                                        ${project.basedir}/src/main/resources/org.apache.brooklyn.classrename.cfg
+                                    </file>
+                                    <type>cfg</type>
+                                    <classifier>classrename</classifier>
+                                </artifact>
+                                <artifact>
+                                    <file>
+                                        ${project.basedir}/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
+                                    </file>
+                                    <type>cfg</type>
+                                    <classifier>core.catalog.bomscanner</classifier>
+                                </artifact>
+                                <artifact>
+                                    <file>
+                                        ${project.basedir}/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
+                                    </file>
+                                    <type>cfg</type>
+                                    <classifier>osgilauncher</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg
----------------------------------------------------------------------
diff --git a/karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg b/karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg
new file mode 100644
index 0000000..839eead
--- /dev/null
+++ b/karaf/config/src/main/resources/org.apache.brooklyn.classrename.cfg
@@ -0,0 +1,21 @@
+################################################################################
+#
+#    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.
+#
+################################################################################
+
+# This file can contains custom deserialization class mappings for the persistence state
+# Syntax should be <old-class>=<new-class>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/config/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
----------------------------------------------------------------------
diff --git a/karaf/config/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
b/karaf/config/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
new file mode 100644
index 0000000..242dfd6
--- /dev/null
+++ b/karaf/config/src/main/resources/org.apache.brooklyn.core.catalog.bomscanner.cfg
@@ -0,0 +1,27 @@
+################################################################################
+#
+#    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.
+#
+################################################################################
+
+# CSV Whitelist of regular expressions to match bundle symbolic id if bundle is to be permitted
to add
+# applications (templates) to the catalog
+whiteList=.*
+
+# CSV Blacklist of regular expressions to match bundle symbolic id to prevent selected whitelisted
bundles
+# adding applications (templates) to the catalog
+blackList=
+

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
----------------------------------------------------------------------
diff --git a/karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg b/karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
new file mode 100644
index 0000000..84b750c
--- /dev/null
+++ b/karaf/config/src/main/resources/org.apache.brooklyn.osgilauncher.cfg
@@ -0,0 +1,67 @@
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+
+# This file temporarily contains boot settings for brooklyn karaf launcher,
+# matching some of the command-line options of the previous brooklyn-cli launcher
+# (those used during the initialization sequence)
+#
+# Most of these will migrate to a permanent cfg file, once the components themselves get
refactored
+# and the configuration options are agreed upon
+
+# Location of the global brooklyn.properties file
+#globalBrooklynPropertiesFile=~/.brooklyn/brooklyn.properties
+
+# Location of the default catalog.bom
+default.catalog.location=${karaf.etc}/default.catalog.bom
+
+# Location of the local brooklyn.properties file, normally specified at the cli. Overrides
properties from the global set.
+#localBrooklynPropertiesFile=
+
+# Ignore catalog subsystem failures during startup (default is to continue, so errors can
be viewed via the API)
+#ignoreCatalogErrors=true
+
+# Ignore persistence/HA subsystem failures during startup (default is to continue, so errors
can be viewed via the API)
+#ignorePersistenceErrors=true
+
+# The high availability mode. Possible values are:
+# - DISABLED: management node works in isolation - will not cooperate with any other standby/master
nodes in management plane;
+# - AUTO: will look for other management nodes, and will allocate itself as standby or master
based on other nodes' states;
+# - MASTER: will startup as master - if there is already a master then fails immediately;
+# - STANDBY: will start up as lukewarm standby with no state - if there is not already a
master then fails immediately,
+#   and if there is a master which subsequently fails, this node can promote itself;
+# - HOT_STANDBY: will start up as hot standby in read-only mode - if there is not already
a master then fails immediately,
+#   and if there is a master which subseuqently fails, this node can promote itself;
+# - HOT_BACKUP: will start up as hot backup in read-only mode - no master is required, and
this node will not become a master
+#highAvailabilityMode=DISABLED
+
+# The persistence mode. Possible values are:
+# - AUTO: will rebind to any existing state, or start up fresh if no state;
+# - DISABLED: will not read or persist any state;
+# - REBIND: will rebind to the existing state, or fail if no state available;
+# - CLEAN: will start up fresh (removing any existing state)
+#persistMode=AUTO
+
+# The directory to read/write persisted state (or container name if using an object store)
+#persistenceDir=
+
+# The location spec for an object store to read/write persisted state
+#persistenceLocation=
+
+# Periodic read-only rebind
+#persistPeriod=1s

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/features/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/karaf/features/src/main/feature/feature.xml b/karaf/features/src/main/feature/feature.xml
index 7547d0d..1946ba6 100644
--- a/karaf/features/src/main/feature/feature.xml
+++ b/karaf/features/src/main/feature/feature.xml
@@ -55,7 +55,20 @@
         <bundle>mvn:javax.annotation/javax.annotation-api/${cxf.javax.annotation-api.version}</bundle>
     </feature>
 
+    <feature name="brooklyn-config" version="${project.version}">
+        <configfile finalname="${karaf.etc}/${groupId}.classrename.cfg" override="false">
+            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/classrename
+        </configfile>
+        <configfile finalname="${karaf.etc}/${groupId}.core.catalog.bomscanner.cfg" override="false">
+            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/core.catalog.bomscanner
+        </configfile>
+        <configfile finalname="${karaf.etc}/${groupId}.osgilauncher.cfg" override="false">
+            mvn:${project.groupId}/brooklyn-dist-config/${project.version}/cfg/osgilauncher
+        </configfile>
+    </feature>
+
     <feature name="brooklyn-headless" version="${project.version}" description="All Brooklyn
bundles witht the exception of the launcher">
+        <feature prerequisite="true">brooklyn-config</feature>
         <feature prerequisite="true">brooklyn-standard-karaf</feature>
         <feature prerequisite="true">brooklyn-guava-optional-deps</feature>
         <feature>brooklyn-core</feature>

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4b800c30/karaf/pom.xml
----------------------------------------------------------------------
diff --git a/karaf/pom.xml b/karaf/pom.xml
index 42f342d..e34efa8 100644
--- a/karaf/pom.xml
+++ b/karaf/pom.xml
@@ -56,6 +56,7 @@
     </properties>
 
     <modules>
+        <module>config</module>
         <module>features</module>
         <module>apache-brooklyn</module>
         <module>itest</module>


Mime
View raw message