Repository: karaf-cellar Updated Branches: refs/heads/master f5ba42053 -> ab2aa4cc6
Update the manual with the new commands syntax and output Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/1be0b2d0 Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/1be0b2d0 Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/1be0b2d0 Branch: refs/heads/master Commit: 1be0b2d0e494ade4db5739b4321384bee1ef6d0c Parents: f5ba420 Author: Jean-Baptiste Onofré <[email protected]> Authored: Mon Jun 23 18:33:53 2014 +0200 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Mon Jun 23 18:33:53 2014 +0200 ---------------------------------------------------------------------- .../architecture-guide/supported_events.conf | 4 + manual/src/main/webapp/user-guide/cloud.conf | 4 +- manual/src/main/webapp/user-guide/deploy.conf | 47 ++-- manual/src/main/webapp/user-guide/event.conf | 15 +- manual/src/main/webapp/user-guide/groups.conf | 221 +++++++++---------- .../main/webapp/user-guide/installation.conf | 4 +- manual/src/main/webapp/user-guide/nodes.conf | 35 +-- manual/src/main/webapp/user-guide/obr.conf | 55 ++--- .../src/main/webapp/user-guide/transport.conf | 4 +- 9 files changed, 200 insertions(+), 189 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/architecture-guide/supported_events.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/architecture-guide/supported_events.conf b/manual/src/main/webapp/architecture-guide/supported_events.conf index b2bd4a5..03ead71 100644 --- a/manual/src/main/webapp/architecture-guide/supported_events.conf +++ b/manual/src/main/webapp/architecture-guide/supported_events.conf @@ -6,6 +6,10 @@ There are 3 types of events: * Features repository added/removed event. * Features installed/uninstalled event. +Optionally (by installing the corresponding features), Cellar supports the following additional events: +* EventAdmin +* OBR + For each of the event types above a group may be configured to enabled synchronization, and to provide a whitelist/blacklist of specific event IDs. http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/cloud.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/cloud.conf b/manual/src/main/webapp/user-guide/cloud.conf index f0a95f7..95539ac 100644 --- a/manual/src/main/webapp/user-guide/cloud.conf +++ b/manual/src/main/webapp/user-guide/cloud.conf @@ -17,8 +17,8 @@ To install the cloud discovery service simply install the appropriate jclouds pr Amazon S3 is being used here for this example, but the below applies to any provider supported by jclouds. {code} -features:install jclouds-aws-s3 -features:install cellar-cloud +karaf@root()> feature:install jclouds-aws-s3 +karaf@root()> feature:install cellar-cloud {code} Once the feature is installed, you're required to create a configuration that contains credentials and the type of the cloud storage (aka blobstore). http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/deploy.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/deploy.conf b/manual/src/main/webapp/user-guide/deploy.conf index 3e91e8e..a0764df 100644 --- a/manual/src/main/webapp/user-guide/deploy.conf +++ b/manual/src/main/webapp/user-guide/deploy.conf @@ -10,15 +10,27 @@ Karaf Cellar is provided as a Karaf features XML descriptor. Simply register the Cellar feature URL in your Karaf instance: {code} -karaf@root> features:addurl mvn:org.apache.karaf.cellar/apache-karaf-cellar/3.0.0-SNAPSHOT/xml/features +karaf@root()> feature:repo-add mvn:org.apache.karaf.cellar/apache-karaf-cellar/3.0.0-SNAPSHOT/xml/features +Adding feature url mvn:org.apache.karaf.cellar/apache-karaf-cellar/3.0.0-SNAPSHOT/xml/features {code} Now you have Cellar features available in your Karaf instance: {code} -karaf@root> features:list|grep -i cellar -[uninstalled] [3.0.0-SNAPSHOT ] cellar Karaf clustering -[uninstalled] [3.0.0-SNAPSHOT ] cellar-webconsole Karaf Cellar Webconsole Plugin +karaf@root()> feature:list |grep -i cellar +cellar-core | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Karaf clustering core +hazelcast | 3.2.3 | | karaf-cellar-3.0.0-SNAPSHOT | In memory data grid +cellar-hazelcast | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Cellar implementation based on Hazelcast +cellar-config | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | ConfigAdmin cluster support +cellar-features | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Karaf features cluster support +cellar-bundle | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Bundle cluster support +cellar-shell | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Cellar shell support +cellar | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Karaf clustering +cellar-dosgi | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | DOSGi support +cellar-obr | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | OBR cluster support +cellar-eventadmin | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | OSGi events broadcasting in clusters +cellar-cloud | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Cloud blobstore support in clusters +cellar-webconsole | 3.0.0 | | karaf-cellar-3.0.0-SNAPSHOT | Cellar plugin for Karaf WebConsole {code} h2. Starting Cellar @@ -26,27 +38,28 @@ h2. Starting Cellar To start Cellar in your Karaf instance, you only need to install the Cellar feature: {code} -karaf@root> features:install cellar +karaf@root()> feature:install cellar {code} You can now see the Cellar components (bundles) installed: {code} -karaf@root> la|grep -i cellar -[ 56] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Core (3.0.0.SNAPSHOT) -[ 57] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Config (3.0.0.SNAPSHOT) -[ 58] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Features (3.0.0.SNAPSHOT) -[ 59] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Bundle (3.0.0.SNAPSHOT) -[ 60] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Utils (3.0.0.SNAPSHOT) -[ 61] [Active ] [Created ] [ ] [ 60] Apache Karaf :: Cellar :: Shell (3.0.0.SNAPSHOT) -[ 62] [Active ] [ ] [ ] [ 60] Apache Karaf :: Cellar :: Hazelcast (3.0.0.SNAPSHOT) +karaf@root()> la|grep -i cellar +80 | Active | 30 | 3.0.0 | Apache Karaf :: Cellar :: Core +81 | Active | 31 | 3.0.0 | Apache Karaf :: Cellar :: Utils +82 | Active | 33 | 3.0.0 | Apache Karaf :: Cellar :: Hazelcast +83 | Active | 40 | 3.0.0 | Apache Karaf :: Cellar :: Shell +84 | Active | 40 | 3.0.0 | Apache Karaf :: Cellar :: Config +85 | Active | 40 | 3.0.0 | Apache Karaf :: Cellar :: Bundle +86 | Active | 40 | 3.0.0 | Apache Karaf :: Cellar :: Features {code} And Cellar cluster commands are now available: {code} -karaf@root> cluster:<TAB> -cluster:config-list cluster:config-proplist cluster:config-propset cluster:consumer-start cluster:consumer-status cluster:consumer-stop cluster:feature-install cluster:feature-list -cluster:feature-uninstall cluster:group-create cluster:group-delete cluster:group-join cluster:group-list cluster:group-quit cluster:group-set cluster:handler-start -cluster:handler-status cluster:handler-stop cluster:list-nodes cluster:ping cluster:producer-start cluster:producer-status cluster:producer-stop +karaf@root()> cluster:<TAB> +cluster:bundle-install cluster:bundle-list cluster:bundle-start cluster:bundle-stop cluster:bundle-uninstall cluster:config-list cluster:config-propappend cluster:config-propdel cluster:config-proplist cluster:config-propset +cluster:consumer-start cluster:consumer-status cluster:consumer-stop cluster:feature-install cluster:feature-list cluster:feature-uninstall cluster:feature-url-add cluster:feature-url-list cluster:feature-url-remove cluster:group-create +cluster:group-delete cluster:group-join cluster:group-list cluster:group-pick cluster:group-quit cluster:group-set cluster:handler-start cluster:handler-status cluster:handler-stop cluster:node-list +cluster:node-ping cluster:producer-start cluster:producer-status cluster:producer-stop cluster:sync {code} http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/event.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/event.conf b/manual/src/main/webapp/user-guide/event.conf index 359e28d..c2c7a50 100644 --- a/manual/src/main/webapp/user-guide/event.conf +++ b/manual/src/main/webapp/user-guide/event.conf @@ -1,21 +1,16 @@ -h1. OSGi Event Broadcasting support +h1. OSGi Event Broadcasting support (eventadmin) Apache Karaf Cellar is able to listen all OSGi events on the cluster nodes, and broadcast each events to other nodes. h2. Enable OSGi Event Broadcasting support -OSGi Event Broadcasting is an optional feature. To enable it, you have to install the cellar-event feature: +OSGi Event Broadcasting is an optional feature. To enable it, you have to install the cellar-eventadmin feature: {code} -karaf@root> feature:install cellar-event -{code} - -Of course, it Cellar is already installed, you can use Cellar itself to install cellar-event feature on all nodes: - -{code} -karaf@root> cluster:feature-install group cellar-event +karaf@root()> feature:install cellar-eventadmin {code} h2. OSGi Event Broadcast in action -As soon as the cellar-event feature is installed, Cellar listens all OSGi events, and broadcast these events to all nodes of the same cluster group. \ No newline at end of file +As soon as the cellar-eventadmin feature is installed (on all nodes that should use the clustered eventadmin), +Cellar listens all OSGi events, and broadcast these events to all nodes of the same cluster group. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/groups.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/groups.conf b/manual/src/main/webapp/user-guide/groups.conf index 47afb52..9f7d881 100644 --- a/manual/src/main/webapp/user-guide/groups.conf +++ b/manual/src/main/webapp/user-guide/groups.conf @@ -7,34 +7,30 @@ a node within a group. By default, the Cellar nodes go into the default group: {code} -karaf@root> cluster:group-list - Node Group -* node1.local:5701 default - node2.local:5702 default +karaf@root()> cluster:group-list + | Group | Members +----------------------------------------------- +x | default | node2:5702 node1:5701(x) {code} -As for node, the starting * shows the local node/group. +The 'x' indicates a local group. A local group is a group containing the local node (where we are connected). h2. New group You can create a new group using the group-create command: {code} -karaf@root> cluster:group-create test -Name test -Members [] - +karaf@root()> cluster:group-create test {code} For now, the test group hasn't any nodes: {code} -kaaf@root> cluster:group-list - Node Group - node1.local:5701 default -* node2.local:5702 default - test - +karaf@node1()> cluster:group-list + | Group | Members +----------------------------------------------- +x | default | node2:5702 node1:5701(x) + | test | {code} h2. Group configuration @@ -42,47 +38,50 @@ h2. Group configuration You can see the configuration PID associated with a given group, for instance the default group: {code} -karaf@root> cluster:config-list default -PIDs for group:default -PID -org.apache.felix.fileinstall.3e4e22ea-8495-4612-9839-a537c8a7a503 -org.apache.felix.fileinstall.1afcd688-b051-4b12-a50e-97e40359b24e -org.apache.karaf.features -org.apache.karaf.log -org.apache.karaf.features.obr -org.ops4j.pax.logging -org.apache.karaf.cellar.groups -org.ops4j.pax.url.mvn -org.apache.karaf.jaas -org.apache.karaf.shell -{code} - -You can use the cluster:config-proplist and config-propset commands to list, add and edit the configuration. +karaf@root()> cluster:config-list default |more +---------------------------------------------------------------- +Pid: org.apache.karaf.command.acl.jaas +Properties: + update = admin + service.pid = org.apache.karaf.command.acl.jaas +---------------------------------------------------------------- +Pid: org.apache.karaf.service.acl.command.system.start-level +Properties: + execute = admin # admin can set any start level, including < 100 + start-level[/[^0-9]*/] = viewer # viewer can obtain the current start level + execute[/.*/,/[^0-9]*/] = viewer # viewer can obtain the current start level + * = * + start-level = admin # admin can set any start level, including < 100 + service.guard = (&(osgi.command.scope=system)(osgi.command.function=start-level)) + execute[/.*/,/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100 + service.pid = org.apache.karaf.service.acl.command.system.start-level + start-level[/.*[0-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100 +---------------------------------------------------------------- +... +{code} + +You can use the cluster:config-property-list and config-property-set commands to list, add and edit the configuration. For instance, in the test group, we don't have any configuration: {code} -karaf@root> cluster:config-list test +karaf@root()> cluster:config-list test No PIDs found for group:test {code} We can create a tstcfg config in the test group, containing name=value property: {code} -karaf@root> cluster:config-propset test tstcfg name value +karaf@root()> cluster:config-property-set test tstcfg name value {code} Now, we have this property in the test group: {code} -karaf@root> cluster:config-list test -PIDs for group:test -PID -tstcfg -karaf@root> cluster:config-proplist test tstcfg -Property list for PID:tstcfg for group:test -Key Value -name value +karaf@root()> cluster:config-property-list test testcfg +Property list for configuration PID testcfg for cluster group test + name = value + service.pid = testcfg {code} h2. Group nodes @@ -90,11 +89,11 @@ h2. Group nodes You can declare a node member of one of more groups: {code} -karaf@root> cluster:group-join test node1.local:5701 - Node Group - node1:5701 default -* node2:5702 default - node1:5701 test +karaf@node2()> cluster:group-join test node1:5701 + | Group | Members +----------------------------------------------- +x | default | node2:5702(x) node1:5701 + | test | node1:5701 {code} The node can be local or remote. @@ -103,10 +102,10 @@ Now, the nodes of a given group will inherit of all configuration defined in the node1 now knows the tstcfg configuration because it's a member of the test group: {code} -karaf@root> config:edit tstcfg -karaf@root> proplist - service.pid = tstcfg - name = value +karaf@root()> config:edit tstcfg +karaf@root()> property-list + service.pid = testcfg + name = value {code} h2. Group features @@ -114,78 +113,72 @@ h2. Group features Configuration and features can be assigned to a given group. {code} -karaf@root> cluster:feature-list default -Features for group:default -Name Version Status -spring-dm 1.2.1 true -kar 3.0.0-SNAPSHOT false -config 3.0.0-SNAPSHOT true -http-whiteboard 3.0.0-SNAPSHOT false -application-without-isolation 0.3 false -war 3.0.0-SNAPSHOT false -standard 3.0.0-SNAPSHOT false -management 3.0.0-SNAPSHOT true -http 3.0.0-SNAPSHOT false -transaction 0.3 false -jetty 7.4.2.v20110526 false -wrapper 3.0.0-SNAPSHOT false -jndi 0.3 false -obr 3.0.0-SNAPSHOT false -jpa 0.3 false -webconsole-base 3.0.0-SNAPSHOT false -hazelcast 1.9.3 true -eventadmin 3.0.0-SNAPSHOT false -spring-dm-web 1.2.1 false -ssh 3.0.0-SNAPSHOT true -spring-web 3.0.5.RELEASE false -hazelcast-monitor 1.9.3 false -jasypt-encryption 3.0.0-SNAPSHOT false -webconsole 3.0.0-SNAPSHOT false -spring 3.0.5.RELEASE true -{code} - -{code} -karaf@root> cluster:feature-list test -Features for group:test -Name Version Status -webconsole 3.0.0-SNAPSHOT false -spring-dm 1.2.1 true -eventadmin 3.0.0-SNAPSHOT false -http 3.0.0-SNAPSHOT false -war 3.0.0-SNAPSHOT false -http-whiteboard 3.0.0-SNAPSHOT false -obr 3.0.0-SNAPSHOT false -spring 3.0.5.RELEASE true -hazelcast-monitor 1.9.3 false -webconsole-base 3.0.0-SNAPSHOT false -management 3.0.0-SNAPSHOT true -hazelcast 1.9.3 true -jpa 0.3 false -jndi 0.3 false -standard 3.0.0-SNAPSHOT false -jetty 7.4.2.v20110526 false -application-without-isolation 0.3 false -config 3.0.0-SNAPSHOT true -spring-web 3.0.5.RELEASE false -wrapper 3.0.0-SNAPSHOT false -transaction 0.3 false -spring-dm-web 1.2.1 false -ssh 3.0.0-SNAPSHOT true -jasypt-encryption 3.0.0-SNAPSHOT false -kar 3.0.0-SNAPSHOT false +karaf@root()> cluster:feature-list default |more +Name | Version | Installed +-------------------------------------------------------------------- +pax-cdi-1.1-weld | 0.7.0 | +cellar-config | 3.0.0-SNAPSHOT | +pax-cdi-deltaspike-jpa | 0.5 | +jclouds-savvis-symphonyvpdc | 1.4.0 | +jclouds | 1.4.0 | +aries-annotation | 3.0.1 | +eventadmin | 3.0.1 | +jclouds-api-filesystem | 1.4.0 | +scheduler | 3.0.1 | +jclouds-api-elasticstack | 1.4.0 | +hazelcast | 3.2.3 | +cellar-core | 3.0.0-SNAPSHOT | +jclouds-services | 1.4.0 | +hibernate-envers | 4.2.7.Final | +hibernate-envers | 4.3.1.Final | +jclouds-api-byon | 1.4.0 | +jclouds-go2cloud-jhb1 | 1.4.0 | +openjpa | 2.3.0 | +spring-instrument | 3.2.4.RELEASE | +spring-orm | 3.1.4.RELEASE | +jclouds-commands | 1.4.0 | +jclouds-softlayer | 1.4.0 | +jclouds-openhosting-east1 | 1.4.0 | +http | 3.0.1 | +... +{code} + +{code} +karaf@root()> cluster:feature-list test|more +Name | Version | Installed +-------------------------------------------------------------------- +pax-cdi-1.1-weld | 0.7.0 | +pax-cdi-deltaspike-jpa | 0.5 | +jclouds-savvis-symphonyvpdc | 1.4.0 | +aries-annotation | 3.0.1 | +jclouds | 1.4.0 | +eventadmin | 3.0.1 | +jclouds-api-filesystem | 1.4.0 | +scheduler | 3.0.1 | +jclouds-api-elasticstack | 1.4.0 | +jclouds-services | 1.4.0 | +hibernate-envers | 4.2.7.Final | +hibernate-envers | 4.3.1.Final | +jclouds-api-byon | 1.4.0 | +jclouds-go2cloud-jhb1 | 1.4.0 | +openjpa | 2.3.0 | +spring-instrument | 3.2.4.RELEASE | +spring-orm | 3.1.4.RELEASE | +jclouds-commands | 1.4.0 | +... {code} Now we can "install" a feature for a given cluster group: {code} -karaf@root> cluster:feature-install test eventadmin -karaf@root> cluster:feature-list test|grep -i event -eventadmin 3.0.0-SNAPSHOT true +karaf@root()> cluster:feature-install test eventadmin +karaf@root()> cluster:feature-list test|grep -i event +eventadmin | 3.0.1 | x {code} Below, we see that the eventadmin feature has been installed on this member of the test group: {code} -karaf@root> feature:list|grep -i event -[installed ] [3.0.0-SNAPSHOT ] eventadmin karaf-3.0.0-SNAPSHOT +karaf@root()> feature:list |grep -i eventadmin +eventadmin | 3.0.1 | x | standard-3.0.1 | OSGi Event Admin service specification for event-b {code} http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/installation.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/installation.conf b/manual/src/main/webapp/user-guide/installation.conf index cf21f69..4b8dddc 100644 --- a/manual/src/main/webapp/user-guide/installation.conf +++ b/manual/src/main/webapp/user-guide/installation.conf @@ -17,10 +17,10 @@ If you intend to build Karaf Cellar from the sources, the requirements are: * 100MB of free disk space for the Apache Karaf Cellar x.y source distributions or SVN checkout, the Maven build and the dependencies that Maven downloads. *Environment:* -* Java SE Development Kit 1.6.x or greater ([http://www.oracle.com/technetwork/java/javase/]). +* Java SE Development Kit 1.7.x or greater ([http://www.oracle.com/technetwork/java/javase/]). * Apache Maven 3.0.3 ([http://maven.apache.org/download.html]). -*Note:* Karaf Cellar requires Java 6 to compile, build and run. +*Note:* Karaf Cellar requires Java 7 to compile, build and run. h3. Building on Windows http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/nodes.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/nodes.conf b/manual/src/main/webapp/user-guide/nodes.conf index e8c85d3..10a71f6 100644 --- a/manual/src/main/webapp/user-guide/nodes.conf +++ b/manual/src/main/webapp/user-guide/nodes.conf @@ -10,24 +10,28 @@ and hence tries to discover the others Cellar nodes. You can list the known Cellar nodes using the list-nodes command: {code} -karaf@root> cluster:list-nodes - No. Host Name Port ID -* 1 node1.local 5701 node1.local:5701 - 2 node2.local 5702 node2.local:5702 +karaf@root()> cluster:node-list + | Id | Host Name | Port +------------------------------------- +x | node2:5702 | node2 | 5702 + | node1:5701 | node1 | 5701 {code} -The starting * indicates that it's the Karaf instance on which you are logged on (the local node). +The starting 'x' indicates that it's the Karaf instance on which you are logged on (the local node). h2. Testing nodes You can ping a node to test it: {code} -karaf@root> cluster:ping node2.local:5702 -Pinging node :node2.local:5702 -PING 1 node2.local:5702 82ms -PING 2 node2.local:5702 11ms -PING 3 node2.local:5702 14ms +karaf@root()> cluster:node-ping node1:5701 +PING node1:5701 +from 1: req=node1:5701 time=11 ms +from 2: req=node1:5701 time=12 ms +from 3: req=node1:5701 time=13 ms +from 4: req=node1:5701 time=7 ms +from 5: req=node1:5701 time=12 ms + {code} h2. Nodes sync @@ -37,16 +41,17 @@ Cellar allows nodes to 'sync' state. It currently covers features, configs, and For instance, if you install a feature (eventadmin for example) on node1: {code} -karaf@node1> features:install eventadmin -karaf@node1> features:list|grep -i eventadmin -[installed ] [3.0.0-SNAPSHOT ] eventadmin karaf-3.0.0-SNAPSHOT +karaf@root> feature:install eventadmin +karaf@root()> feature:list |grep -i eventadmin +eventadmin | 3.0.1 | x | standard-3.0.1 | OSGi Event Admin service specification for event-b {code} You can see that the eventadmin feature has been installed on node2: {code} -karaf@node2> features:list|grep -i eventadmin -[installed ] [3.0.0-SNAPSHOT ] eventadmin karaf-3.0.0-SNAPSHOT +karaf@root()> feature:list |grep -i eventadmin +eventadmin | 3.0.1 | x | standard-3.0.1 | OSGi Event Admin service specification for event-b + {code} Features uninstall works in the same way. Basically, Cellar synchronisation is completely transparent. http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/obr.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/obr.conf b/manual/src/main/webapp/user-guide/obr.conf index a4f6603..b2a1e88 100644 --- a/manual/src/main/webapp/user-guide/obr.conf +++ b/manual/src/main/webapp/user-guide/obr.conf @@ -7,15 +7,9 @@ h2. Enable OBR support To enable Cellar OBR support, the cellar-obr feature must first be installed: {code} -karaf@root> features:install cellar-obr +karaf@root()> feature:install cellar-obr {code} -Of course, if the Cellar core feature is already installed, you can use it to install the cellar-core features on all -nodes of the same group: - -{code} -karaf@root> cluster:feature-install group cellar-obr -{code} The Cellar OBR feature will install the Karaf OBR feature which provides the OBR service (RepositoryAdmin). @@ -24,14 +18,14 @@ h2. Register repository URL in a cluster The cluster:obr-add-url command registers an OBR repository URL (repository.xml) in a cluster group: {code} -karaf@root> cluster:obr-add-url group file://path/to/repository.xml -karaf@root> cluster:obr-add-url group http://karaf.cave.host:9090/cave/repo-repository.xml +karaf@root()> cluster:obr-add-url group file:///path/to/repository.xml +karaf@root()> cluster:obr-add-url group http://karaf.cave.host:9090/cave/repo-repository.xml {code} The OBR repository URLs are stored in a cluster distributed set. It allows new nodes to register the distributed URLs: {code} -karaf@root> cluster:obr-list-url group +karaf@root()> cluster:obr-list-url group file://path/to/repository.xml http://karaf.cave.host:9090/cave/repo-repository.xml {code} @@ -40,24 +34,31 @@ When a repository is registered in the distributed OBR, Cave maintains a distrib OBR of a cluster group: {code} -karaf@root> cluster:obr-list group - NAME SYMBOLIC NAME VERSION -[Apache ServiceMix :: Specs :: Java Persistence API 1.4 ] [org.apache.servicemix.specs.java-persistence-api-1.1.1 ] [1.9.0.SNAPSHOT ] -[camel-jms ] [org.apache.camel.camel-jms ] [2.9.0.SNAPSHOT ] -[camel-example-spring-javaconfig ] [org.apache.camel.camel-example-spring-javaconfig ] [2.8.1.SNAPSHOT ] -[Apache ServiceMix :: Features :: Examples :: WSDL First OSGi Package :: CXF BC Bundle] [wsdl-first-cxfbc-bundle ] [4.4.0.SNAPSHOT ] -[camel-dozer ] [org.apache.camel.camel-dozer ] [2.9.0.SNAPSHOT ] -[OPS4J Pax Web - Extender - Whiteboard ] [org.ops4j.pax.web.pax-web-extender-whiteboard ] [1.0.6 ] -[OPS4J Pax Web - Runtime ] [org.ops4j.pax.web.pax-web-runtime ] [1.0.6.SNAPSHOT ] -[camel-mina ] [org.apache.camel.camel-mina ] [2.9.0.SNAPSHOT ] -[camel-jackson ] [org.apache.camel.camel-jackson ] [2.9.0.SNAPSHOT ] -[camel-example-route-throttling ] [org.apache.camel.camel-example-route-throttling ] [2.9.0.SNAPSHOT ] +karaf@root()> cluster:obr-list group +Name | Symbolic Name | Version +------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +Apache Aries JMX Blueprint Core | org.apache.aries.jmx.blueprint.core | 1.1.1.SNAPSHOT +Apache Karaf :: JAAS :: Command | org.apache.karaf.jaas.command | 2.3.6.SNAPSHOT +Apache Aries Proxy Service | org.apache.aries.proxy.impl | 1.0.3.SNAPSHOT +Apache Karaf :: System :: Shell Commands | org.apache.karaf.system.command | 3.0.2.SNAPSHOT +Apache Karaf :: JDBC :: Core | org.apache.karaf.jdbc.core | 3.0.2.SNAPSHOT +Apache Aries Example SPI Provider Bundle 1 | org.apache.aries.spifly.examples.provider1.bundle | 1.0.1.SNAPSHOT +Apache Aries Transaction Manager | org.apache.aries.transaction.manager | 1.1.1.SNAPSHOT +Apache Karaf :: Features :: Management | org.apache.karaf.features.management | 2.3.6.SNAPSHOT +Apache Aries Blueprint Sample Fragment for Testing Annotation | org.apache.aries.blueprint.sample-fragment | 1.0.1.SNAPSHOT +Apache Karaf :: Management :: MBeans :: OBR | org.apache.karaf.management.mbeans.obr | 2.3.6.SNAPSHOT +Apache Karaf :: JNDI :: Core | org.apache.karaf.jndi.core | 2.3.6.SNAPSHOT +Apache Karaf :: Shell :: SSH | org.apache.karaf.shell.ssh | 3.0.2.SNAPSHOT +Apache Aries Blueprint Web OSGI | org.apache.aries.blueprint.webosgi | 1.0.2.SNAPSHOT +Apache Aries Blueprint JEXL evaluator | org.apache.aries.blueprint.jexl.evaluator | 1.0.1.SNAPSHOT +Apache Karaf :: JDBC :: Command | org.apache.karaf.jdbc.command | 3.0.2.SNAPSHOT +... {code} When you remove a repository URL from the distributed OBR, the bundles' distributed set is updated: {code} -karaf@root> cluster:obr-remove-url group http://karaf.cave.host:9090/cave/repo-repository.xml +karaf@root()> cluster:obr-remove-url group http://karaf.cave.host:9090/cave/repo-repository.xml {code} h2. Deploying bundles using the cluster OBR @@ -65,15 +66,15 @@ h2. Deploying bundles using the cluster OBR You can deploy a bundle (and that bundle's dependent bundles) using the OBR on a given cluster group: {code} -karaf@root> cluster:obr-deploy group bundleId +karaf@root()> cluster:obr-deploy group bundleId {code} The bundle ID is the symbolic name, viewable using the cluster:obr-list command. If you don't provide the version, the OBR deploys the latest version available. To provide the version, use a comma after the symbolic name: {code} -karaf@root> cluster:obr-deploy group org.apache.servicemix.specs.java-persistence-api-1.1.1 -karaf@root> cluster:obr-deploy group org.apache.camel.camel-jms,2.9.0.SNAPSHOT +karaf@root()> cluster:obr-deploy group org.apache.servicemix.specs.java-persistence-api-1.1.1 +karaf@root()> cluster:obr-deploy group org.apache.camel.camel-jms,2.9.0.SNAPSHOT {code} The OBR will automatically install the bundles required to satisfy the bundle dependencies. @@ -81,5 +82,5 @@ The OBR will automatically install the bundles required to satisfy the bundle de The deploy command doesn't start bundles by default. To start the bundles just after deployment, you can use the -s option: {code} -karaf@root> cluster:obr-deploy -s group org.ops4j.pax.web.pax-web-runtime +karaf@root()> cluster:obr-deploy -s group org.ops4j.pax.web.pax-web-runtime {code} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/1be0b2d0/manual/src/main/webapp/user-guide/transport.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/user-guide/transport.conf b/manual/src/main/webapp/user-guide/transport.conf index dfebec3..fef4b5a 100644 --- a/manual/src/main/webapp/user-guide/transport.conf +++ b/manual/src/main/webapp/user-guide/transport.conf @@ -5,7 +5,7 @@ DOSGi (Distributed OSGi) enables the distribution of OSGi services across the Ce The purpose of the Cellar DOSGi is to leverage the Cellar resources (Hazelcast instances, distributed map, etc), and to be very easy to use. -DOSGi is part of the core Cellar feature. +DOSGi is provided by installing the optional feature cellar-dosgi. To be available and visible for the others nodes, the OSGi service should only have the service.exported.interfaces property: @@ -21,7 +21,7 @@ property: You can see all OSGi services "flagged" as distributed (available for the nodes) using the cluster:list-service command: {code} -karaf@root> cluster:list-service +karaf@root()> cluster:service-list {code} A "client" bundle could use this service. If the service is not available locally, Cellar will "route" the service call
