Introduction
============

To install Karaf try...

    shell:source mvn:org.fusesource.fabric/fuse-fabric/1.1-SNAPSHOT/karaf/installer

These scripts are now filtered as part of the build of the fuse-fabric project.  To build the
scripts cd into "fuse-fabric" and run "mvn clean install".  Then you can either source the
script directly via :

    shell:source (your fabric source)/fuse-fabric/target/classes/script.karaf

or better still just do it via maven, for example:

    shell:source mvn:org.fusesource.fabric/fuse-fabric/1.1/karaf/activemq


Example to run a Fabric ActiveMQ Broker
=======================================

1) Before you run Karaf you might like to set these environment variables...

    export JAVA_PERM_MEM=64m
    export JAVA_MAX_PERM_MEM=512m


2) Download and install a fresh version of Karaf 2.2.x from Fuse repo http://repo.fusesource.com/nexus/content/repositories/releases/org/apache/karaf/apache-karaf/

3) Check FuseSource maven repo

Make sure you have

    http://repo.fusesource.com/nexus/content/groups/public/

added to org.ops4j.pax.url.mvn.repositories property in etc/org.ops4j.pax.url.mvn.cfg file.

4) Start Karaf

To create a profile with default configuration, run:

    shell:source mvn:org.fusesource.fabric/fuse-fabric/1.1-SNAPSHOT/karaf/installer

Next you can create, agents with this profile like:

    fabric:agent-create --profile activemq --parent $APPLICATION broker

Wait for a few seconds for the agent to start. Check the status of the agent with:

    fabric:agent-list

You can (optionally) connect to the agent, with

    fabric:agent-connect broker

If you want to start a demo that produces/consumes messages using 'fabric' transport run

    features:addurl mvn:org.fusesource.fabric.fabric-examples/fabric-activemq-demo/1.1-SNAPSHOT/xml/features
    features:install fabric-activemq-demo
