Author: cschneider
Date: Fri Sep 14 14:49:49 2012
New Revision: 1384800
URL: http://svn.apache.org/viewvc?rev=1384800&view=rev
Log:
KARAF-1818 Updating quick start guide and fixing problem with camel example
Modified:
karaf/trunk/manual/src/main/webapp/quick-start.conf
Modified: karaf/trunk/manual/src/main/webapp/quick-start.conf
URL:
http://svn.apache.org/viewvc/karaf/trunk/manual/src/main/webapp/quick-start.conf?rev=1384800&r1=1384799&r2=1384800&view=diff
==============================================================================
--- karaf/trunk/manual/src/main/webapp/quick-start.conf (original)
+++ karaf/trunk/manual/src/main/webapp/quick-start.conf Fri Sep 14 14:49:49 2012
@@ -1,45 +1,22 @@
-
-
h1. 1. Quick Start
-If you are in a hurry to have Apache Karaf up and running right away, this
section will provide you with some basic steps for downloading, building (when
needed) and running the server in no time. This is clearly not a complete guide
so you may want to check other sections of this guide for further information.
-
-All you need is 5 to 10 minutes and to follow these basic steps.
-* [#Background]
-* [#Getting the software]
-* [#Start the server]
-* [#Deploy a sample application]
-
-h2. Background
-
-Apache Karaf is a small and lightweight OSGi based runtime. This provides a
small lightweight container onto which various bundles can be deployed.
-
-Apache Karaf started life as the [Apache
ServiceMix|http://servicemix.apache.org] kernel and then moved as a [Apache
Felix|http://felix.apache.org] subproject before becoming a top level project.
-
-h2. Getting the software
-
-At this time you have one option to get the software. The fastest and easiest
way is to get the binary directly from the Apache site. Since this article is
intended to help you to have Apache Karaf up and running in the fastest way
only the binary download will be covered at this time.
-
-h3. Prerequisites
+This instructions should help you get Apache Karaf up and running in 5 to 15
minutes.
-Although this installation path is the fastest one, you will still need to
install some software before installing Karaf.
+h2. Prerequisites
Karaf requires a Java SE 6 environment to run. Refer to
[http://www.oracle.com/technetwork/java/javase/] for details on how to download
and install Java SE 1.6 or greater.
-h3. Download binaries
-
-You will need to select the appropriate installation image for the platform
you're using to run Karaf. Open a Web browser and access the following URL,
there you will find the available packages for download (binaries and source
code).
-
-[http://karaf.apache.org/index/community/download.html]
-
-Select the file compression format compatible with your system (zip for
windows, tar.gz for unixes) by clicking directly on the link, download it and
expand the binary to your hard drive in a new directory; for example in
z:\karaf - from now on this directory will be referenced as <KARAF_HOME>.
Please remember the restrictions concerning illegal characters in Java paths,
e.g. \!, % etc.
-
-The installation of Karaf is as simple as uncompressing the .zip or .tar.gz
files. The next step is to start the server.
+h2. Download binaries
+* Open a Web browser and access the following URL:
[http://karaf.apache.org/index/community/download.html]
+* Download the binary distribution that matches your system (zip for windows,
tar.gz for unixes)
+* Extract the archive a new folder on your hard drive; for example in c:\karaf
- from now on this directory will be referenced as <KARAF_HOME>.
h2. Start the server
-With Karaf already installed, open a command line console and change directory
to <KARAF_HOME>. To start the server, run the following command in Windows:
+Open a command line console and change the directory to <KARAF_HOME>.
+
+To start the server, run the following command in Windows:
{code}
bin\karaf.bat
{code}
@@ -48,72 +25,46 @@ respectively on Unix:
bin/karaf
{code}
You should see the following information on the command line console:
-{include:Karaf welcome screen}
+
+{code}
+ __ __ ____
+ / //_/____ __________ _/ __/
+ / ,< / __ `/ ___/ __ `/ /_
+ / /| |/ /_/ / / / /_/ / __/
+ /_/ |_|\__,_/_/ \__,_/_/
+
+ Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '<tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '<ctrl-d>' or 'system:shutdown' to shutdown Karaf.
+
+karaf@root()>
+{code}
+
+h2. Some shell Basics
+
You can now run your first command. Simply type the {{<tab>}} key in the
console.
{code:borderStyle=solid}
karaf@root>
instance:change-port instance:connect instance:create
instance:destroy
instance:list instance:start instance:stop
config:cancel
-config:edit config:list config:propappend
config:propdel
-config:proplist config:propset config:update
dev:dynamic-import
-dev:framework dev:print-stack-traces dev:show-tree
features:addUrl
-features:info features:install features:list
features:listUrl
-features:refreshUrl features:removeUrl features:uninstall
log:display
-log:display-exception log:get log:set
osgi:bundle-level
-osgi:headers osgi:install osgi:list
services:list
-osgi:refresh osgi:resolve osgi:restart
system:shutdown
-osgi:start osgi:start-level osgi:stop
osgi:uninstall
-osgi:update packages:exports packages:imports
shell:cat
-shell:clear shell:each shell:echo
shell:exec
-shell:grep shell:history shell:if
shell:info
-shell:java shell:logout shell:new
shell:printf
-shell:sleep shell:sort shell:tac
ssh:ssh
-ssh:sshd cat clear
each
-echo exec grep
history
-if info java
logout
-new printf sleep
sort
-tac bundle-level headers
install
-list ls refresh
resolve
-restart shutdown start
start-level
-stop uninstall update
-karaf@root>
+...
{code}
You can then grab more specific help for a given command using the {{--help}}
option for this command:
{code:borderStyle=solid}
-karaf@root> instance:create --help
+karaf@root()> bundle:list --help
DESCRIPTION
- instance:create
-
- Create a new instance.
-
-SYNTAX
- instance:create [options] name
+ bundle:list
-ARGUMENTS
- name
- The name of the new container instance
-
-OPTIONS
- --help
- Display this help message
- -f, --feature
- Initial features. This option can be specified multiple times
to enable multiple initial
- features
- -p, --port
- Port number for remote shell connection
- -l, --location
- Location of the new container instance in the file system
- -furl, --featureURL
- Additional feature descriptor URLs. This option can be
specified multiple times to add
- multiple URLs
-
-karaf@root>
+ Lists all installed bundles.
+...
{code}
-Note that the console supports tab completion, so you just need to enter {{ad
<tab> cr <tab>}} instead of {{instance:create}}.
+Note that the console supports tab completion so if your start typing a
command it will show possible completions and also auto complete if there is
only one completion.
h2. Deploy a sample application
@@ -121,8 +72,9 @@ While you will learn in the Karaf user's
In the console, run the following commands:
{code}
-features:addurl mvn:org.apache.camel/camel-example-osgi/2.7.0/xml/features
-features:install camel-example-osgi
+feature:repo-add camel 2.10.0
+feature:install camel-spring
+install -s mvn:org.apache.camel/camel-example-osgi/2.10.1
{code}
The example installed is using Camel to start a timer every 2 seconds and
output a message on the console.
@@ -138,17 +90,7 @@ h3. Stopping and uninstalling the sample
To stop this demo, run the following command:
{code}
-features:uninstall camel-example-osgi
-{code}
-
-h3. Common Problems
-
-# Launching Karaf can result in a deadlock in Felix during module dependency
resolution. This is often a result of sending a SIGINT (control-C) to the
process when it will not cleanly exit. This can corrupt the caches and cause
startup problems in the very next launch. It is fixed by emptying the component
cache:
-# Launching Karaf can result in a deadlock in Felix during module dependency
resolution. This is often a result
-of sending a SIGINT (control-C) to the process when it will not cleanly exit.
This can corrupt the caches
-and cause startup problems in the very next launch. This problem can be fixed
by emptying the component cache:
-{code}
-rm -rf data/cache/*
+bundle:stop org.apache.camel.camel-example-osgi
{code}
h2. Stopping Karaf
@@ -162,7 +104,10 @@ Alternatively, you can also run the foll
system:shutdown
{code}
+h3. Cleaning the Karaf state
+
+Normally Karaf remembers the features and bundles you installed and started.
The reset Karaf into a clean state just delete the data directory when karaf is
not running.
+
h2. Summary
-This document showed how simple it is to have Apache Karaf up and running. The
overall time for getting the server running should be less than five minutes
-if you have the prerequisite (Java 1.6) already installed. Additionally, this
article also showed you how to deploy and test a simple Apache Camel
application.
+This document showed how simple it is to have Apache Karaf up and running and
install a simple Apache Camel application.