You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by bostko <gi...@git.apache.org> on 2016/12/12 16:13:14 UTC
[GitHub] brooklyn-docs pull request #132: Using Bundle-SymbolicName in Catalog
GitHub user bostko opened a pull request:
https://github.com/apache/brooklyn-docs/pull/132
Using Bundle-SymbolicName in Catalog
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bostko/brooklyn-docs add-catalog-details
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-docs/pull/132.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #132
----
commit b8e6256cbdbcf285ee6c8a8500bb3e330215ad6b
Author: Valentin Aitken <bo...@gmail.com>
Date: 2016-12-12T16:10:25Z
Using Bundle-SymbolicName in Catalog
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-docs pull request #132: Using Bundle-SymbolicName in Catalog
Posted by bostko <gi...@git.apache.org>.
Github user bostko closed the pull request at:
https://github.com/apache/brooklyn-docs/pull/132
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-docs issue #132: Using Bundle-SymbolicName in Catalog
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:
https://github.com/apache/brooklyn-docs/pull/132
Would prefer to include usage of the prefix in a troubleshooting section or similar, not as the go to way of using types/resources.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-docs pull request #132: Using Bundle-SymbolicName in Catalog
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/132#discussion_r91980503
--- Diff: guide/ops/catalog/index.md ---
@@ -161,6 +167,30 @@ The following optional catalog metadata is supported:
whenever a bundle is reloaded in a Brooklyn server,
and if entities have been deployed against that version, their behavior may change in subtle or potentially incompatible ways.
To avoid this situation, it is highly recommended to use OSGi version stamps as part of the URL.
+- To refer a resource from a JAR file added by brooklyn.libraries
+ you should include OSGi Bundle-SymbolicName in the classpath.
+ Example:
+
+~~~ yaml
+brooklyn.catalog:
+ brooklyn.libraries:
+ - url: http://some.server.or.other/path/my.jar
+ name: myJar-BundleSymbolicName
+ version: 1.0
+ items:
+ - classpath://myJar-BundleSymbolicName:my-catalog-entries-inside-jar.bom
+ - id: use-from-my-catalog
+ version: "1.0.0"
+ itemType: entity
+ iconUrl: classpath://myJar-BundleSymbolicName:org/apache/brooklyn/MyEntity/icon.png
+ item:
+ type: myJar-BundleSymbolicName:org.apache.brooklyn.MyEntity
+ brooklyn.config:
+ some.config: "some value"
+ templates.install:
+ classpath://myJar-BundleSymbolicName:org/apache/brooklyn/MyEntity/config.xml: config.xml
--- End diff --
We should try to fix cases where the prefix is needed. Does the example work without the prefixes? If not can you file a bug against Brooklyn.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-docs issue #132: Using Bundle-SymbolicName in Catalog
Posted by bostko <gi...@git.apache.org>.
Github user bostko commented on the issue:
https://github.com/apache/brooklyn-docs/pull/132
Bundle-Symbolic name should be discouraged. PR is irrelevant.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-docs pull request #132: Using Bundle-SymbolicName in Catalog
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/132#discussion_r91992440
--- Diff: guide/ops/catalog/index.md ---
@@ -161,6 +167,30 @@ The following optional catalog metadata is supported:
whenever a bundle is reloaded in a Brooklyn server,
and if entities have been deployed against that version, their behavior may change in subtle or potentially incompatible ways.
To avoid this situation, it is highly recommended to use OSGi version stamps as part of the URL.
+- To refer a resource from a JAR file added by brooklyn.libraries
+ you should include OSGi Bundle-SymbolicName in the classpath.
+ Example:
+
+~~~ yaml
+brooklyn.catalog:
+ brooklyn.libraries:
+ - url: http://some.server.or.other/path/my.jar
+ name: myJar-BundleSymbolicName
+ version: 1.0
+ items:
+ - classpath://myJar-BundleSymbolicName:my-catalog-entries-inside-jar.bom
+ - id: use-from-my-catalog
+ version: "1.0.0"
+ itemType: entity
+ iconUrl: classpath://myJar-BundleSymbolicName:org/apache/brooklyn/MyEntity/icon.png
+ item:
+ type: myJar-BundleSymbolicName:org.apache.brooklyn.MyEntity
+ brooklyn.config:
+ some.config: "some value"
+ templates.install:
+ classpath://myJar-BundleSymbolicName:org/apache/brooklyn/MyEntity/config.xml: config.xml
--- End diff --
i've just put together a wee test in https://github.com/apache/brooklyn-server/pull/485 ... classpath resolution seems good for the most part
so tidy this line, and lines 181 and 185
(though we may need a fix to make 185 work, using the right `ResourceUtils` to load the `iconUrl`)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---