No description
Find a file
Raman Gupta 0b7b9ed093 Maven optimization and Karf Feature
Simplify maven deps by using inheritance

Define dependency versions once in dependencyManagement and inherit in
child modules, to avoid defining the version and scope of modules more
than once.

Use version properties to make things even clearer.

Move the maven-bundle-plugin to the root of the project to avoid
repeating the same config.

Move the src/main/scala source configuration into the root by using the
build-helper-plugin.

Add a note in uncommons-maths OSGi build POM about v1.2.3

Resolve maven warnings about deprecations and missing versions

Use maven-accessible sigar dependency

Provision Karaf via maven and features

Created assembly-features to define the project features for Karaf
provisioning.

Created assembly-dist containing the build instructions necessary to
build an archive of a pre-configured Karaf instance.

Update the Netty version.

Use the pre-bundled Protobuf from the servicemix project -- see
the features.xml created for Karaf -- and remove the manual protobuf
bundling.
2013-03-01 20:04:44 +01:00
akka-actor/src/main Merge pull request #1210 from akka/wip-dsl-import-∂π 2013-02-28 23:03:39 -08:00
akka-actor-tests/src/test Merge pull request #1210 from akka/wip-dsl-import-∂π 2013-02-28 23:03:39 -08:00
akka-agent/src #2934 - explaining send a bit better in the docs 2013-01-27 23:01:29 +01:00
akka-camel/src Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-channels/src/main/scala/akka/channels avoid wrapping messages when ask returns single type 2013-02-04 11:02:58 -05:00
akka-channels-tests/src avoid wrapping messages when ask returns single type 2013-02-04 11:02:58 -05:00
akka-cluster/src Merge pull request #1205 from akka/wip-3050-akka-cluseter-stressspec-failed-ban 2013-02-28 03:25:19 -08:00
akka-contrib Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-dataflow/src #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
akka-docs Merge pull request #1210 from akka/wip-dsl-import-∂π 2013-02-28 23:03:39 -08:00
akka-durable-mailboxes Java docs and sample of durable mailbox, see #2761 2013-02-20 12:52:28 +01:00
akka-kernel/src/main Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-multi-node-testkit/src/main Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-osgi/src Rename event-handlers to loggers, see #2979 2013-02-05 11:19:02 +01:00
akka-osgi-aries/src Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-remote/src Merge pull request #1212 from drewhk/wip-3111-init-race-transportadapter-drewhk 2013-03-01 07:02:08 -08:00
akka-remote-tests/src Make RandomRoutedRemoteActorSpec lucky, see #3061 2013-02-22 15:23:19 +01:00
akka-samples #2991 - Switching to org.fusesource instead of org.hyperic 2013-02-25 15:08:58 +01:00
akka-sbt-plugin Akka SBT plugin now uses project IDs instead of names. See #2695 2013-02-22 09:17:16 +01:00
akka-slf4j/src Rename event-handlers to loggers, see #2979 2013-02-05 11:19:02 +01:00
akka-testkit/src Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
akka-transactor/src #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
akka-zeromq/src zeromq socket pinned to the thread that created it, see #2863 2013-02-04 12:54:17 +01:00
api Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
assembly-dist Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
assembly-features Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
command Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
core Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
project DinningHakkers with automatic Karaf runners\n current error: No configuration setting found for key 'akka.cluster' 2013-03-01 20:04:42 +01:00
scripts Script that generates statistics for release notes 2013-02-18 10:43:36 +01:00
src/main/ls Update ls.implicit.ly sbt settings 2012-03-10 10:30:38 +13:00
uncommons Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
.gitignore ignore automatically assembled files in akka-osgi resources dir 2013-01-29 12:34:33 +01:00
CONTRIBUTING.md round up ticket workflow in CONTRIBUTING 2012-12-19 17:30:36 +01:00
karaf.sh Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
LICENSE Change more copyright to 2009-2013, see #2879 2013-02-20 21:26:52 +01:00
osgi-run.sh DinningHakkers with automatic Karaf runners\n current error: No configuration setting found for key 'akka.cluster' 2013-03-01 20:04:42 +01:00
pom.xml Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
README.md Maven optimization and Karf Feature 2013-03-01 20:04:44 +01:00
README.textile Update README.textile 2012-07-23 19:36:26 -03:00

akka-osgi-sample : Clustered DiningHakker

This project may be used to test akka bundles in OSGi Frameworks. The build tool (sbt for the moment) provide scripts to run in an OSGi Framework (Karaf only for the moment) a version of the DiningHakkers that runs on several nodes unsing the akka-cluster module.

Bundle overview

This project provides three Osgi Bundles

  • api providing an API for the Service exposed by the core and used by the command
  • core implementing the whole logic: clustered connections, Hakkers, ChopSticks. It finally provide an ActorRef of one created Hakker
  • command use a service to get a Hakker (ActorRef) with its position around the table

Two modules that provision the project into the Karaf OSGi container for experimentation and integration testing:

  • assembly-features defines the karaf "feature" that allows Karaf to provision the bundles
  • assembly-dist creates a distribution tar.gz and zip file containing the configured Karaf runtime

How to use it

Setup with sbt -- TODO update this for latest Karaf provisioning changes and other Maven build changes

just run:

sbt clean
sbt package
sbt osgi-bundle
sbt osgi-prepare

Setup with Maven

mvn clean install

The assembly-dist/target/ directory will now contain a tar.gz file that contains a pre-configured Karaf runtime. This can be extracted to any location, and bin/karaf executed. The provided karaf.sh script automates this.

Run

Extract the OSGi Framework from the tar.gz described above into any location, or run: ./karaf.sh

Execute the framework by running bin /karaf from inside the extracted directory.

Then try to restart some bundles, to test the stability of the bundles:

list to get the list of the bundles restart #bundle_number to restart the bundle using its ID exit or CTRL-D to exit the Karaf console

Depending on the akka version you're using, you may need to modify the core bundle when deploying on a second machine, to set it's akka.remote.netty.hostname in the application.conf.

TODO: The VM ips below are specific to one environment, make this more general

The configuration is set to start the fist node on localhost, and to start other nodes on vm running on the same machine for tests (localhost and first vm ip would be 192.168.229.128, but it may differ according to your configuration.