karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anierb...@apache.org
Subject [1/5] karaf git commit: show alternative documentation solution with asciidoc
Date Sun, 25 Jan 2015 11:57:08 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 63f201b79 -> 677c6d460


http://git-wip-us.apache.org/repos/asf/karaf/blob/677c6d46/manual/src/main/asciidoc/users-guide/urls.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/urls.adoc b/manual/src/main/asciidoc/users-guide/urls.adoc
new file mode 100644
index 0000000..6bb72cb
--- /dev/null
+++ b/manual/src/main/asciidoc/users-guide/urls.adoc
@@ -0,0 +1,44 @@
+=  Artifacts repositories and URLs
+
+// TODO temp
+The main information provided by a feature is the set of OSGi bundles that defines the application.
 Such bundles are URLs pointing to the actual bundle jars.  For example, one would write the
following definition:
+{code:lang=xml}
+<bundle>http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
+----
+Doing this will make sure the above bundle is installed while installing the feature.
+
+However, Karaf provides several URL handlers, in addition to the usual ones (file, http,
etc...). One of these is the Maven URL handler, which allow reusing maven repositories to
point to the bundles.
+
+You can deploy bundles from file system without using Maven
+
+As we can use file: as protocol handler to deploy bundles, you can use the following syntax
to deploy bundles when they are
+located in a directory which is not available using Maven
+
+{code:lang=xml}
+<bundle>file:base/bundles/org.apache.servicemix.nmr.api-1.0.0-m2.jar</bundle>
+----
+
+Note: The path is relative to the Apache Karaf installation directory
+
+h4. Maven URL Handler
+
+The equivalent of the above bundle would be:
+{code:lang=xml}
+<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
+----
+
+In addition to being less verbose, the Maven url handlers can also resolve snapshots and
can use a local copy of the jar if one is available in your Maven local repository.
+
+The `org.ops4j.pax.url.mvn` bundle resolves `mvn` URLs. It can be configured using the file
`etc/org.ops4j.pax.url.cfg`
+
+The most important property is :
+
+* `org.ops4j.pax.url.mvn.repositories` : Comma separated list of repository remote repository
URLs that are checked in order of occurence when resolving maven artifacts
+
+By default, snapshots are disabled. To enable an URL for snapshots append @snapshots to a
repository entry. For example
+
+----
+http://www.example.org/repo@snapshots
+----
+
+Repositories on the local machine are supported through `file:/` URLs.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf/blob/677c6d46/manual/src/main/asciidoc/users-guide/webconsole.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/webconsole.adoc b/manual/src/main/asciidoc/users-guide/webconsole.adoc
new file mode 100644
index 0000000..38d4b7e
--- /dev/null
+++ b/manual/src/main/asciidoc/users-guide/webconsole.adoc
@@ -0,0 +1,48 @@
+=  WebConsole
+
+Apache Karaf provides an optional WebConsole.
+
+This WebConsole provides a graphical web GUI to see and manage your Apache Karaf container.
+
+You can use the WebConsole to:
+
+* manage Apache Karaf features
+* manage OSGi bundles
+* manage the instances
+* manage the confgurations
+* manage the log service
+
+The WebConsole is extensible via a plugins system. Some applications can add new pages to
the WebConsole.
+For instance, Apache Karaf Cellar provides additional pages to administrate cluster groups,
nodes, etc.
+
+==  Installation
+
+To enable the Apache Karaf WebConsole, you just have to install the `webconsole` feature:
+
+----
+karaf@root()> feature:install webconsole
+----
+
+The `webconsole` feature automatically installs the `http` feature (see the [WebContainer
section|webcontainer] for details).
+
+==  Access
+
+The Apache Karaf WebConsole uses the WebContainer port number (see the [WebContainer section|webcontainer]
for details)
+with the `/system/console` context.
+
+By default, the Apache Karaf WebContainer port number is `8181`.
+
+It means that the Apache Karaf WebConsole is accessible on the following URL:
+
+[http://localhost:8181/system/console]
+
+As the Apache Karaf WebConsole uses the security framework, an username and password will
be prompted.
+
+You have to enter an username/password from the `karaf` realm. By default, you can use `karaf`/`karaf`.
+
+See the [Security section|security] for details.
+
+{warning}
+Only users with the `admin` role are allowed to logon on the Apache Karaf WebConsole.
+Right now, the WebConsole doesn't use RBAC system as we have for console commands, or MBeans.
+{warning}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf/blob/677c6d46/manual/src/main/asciidoc/users-guide/webcontainer.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/webcontainer.adoc b/manual/src/main/asciidoc/users-guide/webcontainer.adoc
new file mode 100644
index 0000000..acede29
--- /dev/null
+++ b/manual/src/main/asciidoc/users-guide/webcontainer.adoc
@@ -0,0 +1,275 @@
+=  WebContainer (JSP/Servlet)
+
+Apache Karaf can act a complete WebContainer, fully supporting JSP/Servlet specification.
+
+Apache Karaf WebContainer supports both:
+
+* WAB (WebApplication Bundles) which are OSGi native web applications
+* WAR (WebApplication aRchives) which are non-OSGi web applications (the same as you can
deploy in any web container like Apache Tomcat)
+
+To enable the Apache Karaf WebContainer, you just have to install the `war` feature:
+
+----
+karaf@root()> feature:install war
+----
+
+NB: the installation of the `webconsole` feature automatically installs the `war` feature.
+
+The `war` feature provides:
+
+* an embedded web container (powered by Jetty), with its configuration
+* a set of console commands
+* a new war deployer
+
+==  Configuration
+
+The default port used by the WebContainer is 8181.
+
+The WebContainer configuration is in the `etc/jetty.xml` configuration file.
+
+The `etc/jetty.xml` is a standard Eclipse Jetty configuration file.
+
+The default Apache Karaf WebContainer `etc/jetty.xml` contains:
+
+{code:lang=xml}
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
+DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<Configure class="org.eclipse.jetty.server.Server">
+
+    <!-- =========================================================== -->
+    <!-- Set connectors -->
+    <!-- =========================================================== -->
+    <!-- One of each type! -->
+    <!-- =========================================================== -->
+
+    <!-- Use this connector for many frequently idle connections and for
+        threadless continuations. -->
+    <Call name="addConnector">
+        <Arg>
+            <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+                <Set name="host">
+                    <Property name="jetty.host" />
+                </Set>
+                <Set name="port">
+                    <Property name="jetty.port" default="8181" />
+                </Set>
+                <Set name="maxIdleTime">300000</Set>
+                <Set name="Acceptors">2</Set>
+                <Set name="statsOn">false</Set>
+                <Set name="confidentialPort">8443</Set>
+                <Set name="lowResourcesConnections">20000</Set>
+                <Set name="lowResourcesMaxIdleTime">5000</Set>
+            </New>
+        </Arg>
+    </Call>
+
+    <!-- =========================================================== -->
+    <!-- Configure Authentication Realms -->
+    <!-- Realms may be configured for the entire server here, or -->
+    <!-- they can be configured for a specific web app in a context -->
+    <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
+    <!-- example). -->
+    <!-- =========================================================== -->
+    <Call name="addBean">
+        <Arg>
+            <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+                <Set name="name">karaf</Set>
+                <Set name="loginModuleName">karaf</Set>
+                <Set name="roleClassNames">
+                    <Array type="java.lang.String">
+                        <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+                        </Item>
+                    </Array>
+                </Set>
+            </New>
+        </Arg>
+    </Call>
+    <Call name="addBean">
+        <Arg>
+            <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+                <Set name="name">default</Set>
+                <Set name="loginModuleName">karaf</Set>
+                <Set name="roleClassNames">
+                    <Array type="java.lang.String">
+                        <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+                        </Item>
+                    </Array>
+                </Set>
+            </New>
+        </Arg>
+    </Call>
+
+</Configure>
+----
+
+The `SelectChannelConnector` defines the default connector of the WebContainer.
+
+This connector defines the 8181 port number for the HTTP protocol (`port` property), and
the 8443 port number for the
+HTTPS protocol (`confidentialPort` property).
+
+By default, Apache Karaf bind these ports on all network interfaces (`0.0.0.0`). You can
config the `host` property
+to bind on a specific network interface (with a given IP address).
+
+The following resources give you details about advanced `etc/jetty.xml` configurations:
+
+* [Standard configuration|http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty]
+* [Enable SSL|http://wiki.eclipse.org/Jetty/Howto/Configure_SSL]
+* [Reference|http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax]
+
+==  Deploy
+
+Apache Karaf WebContainer is able to deploy:
+
+* pure OSGi WebApplication Bundle (WAB)
+* "classical" standard WebApplication aRchive (WAR)
+
+===  WAB (WebApplication Bundle)
+
+A WAB is a standard WAR or JAR archive containing at least the following properties in the
MANIFEST:
+
+* `Bundle-ManifestVersion: 2` defines that the bundle follows the rules of R4 specification.
+* `Bundle-SymbolicName` specifies a unique, non-localizable name for the bundle. This name
should be based on the
+ reverse domain name convention.
+* `Web-ContextPath` specifies the location of the web application.
+
+WAB can be deployed directly in Apache Karaf, for instance, by dropping the archive in the
`deploy` folder, or using the
+`bundle:install` command.
+
+For instance, the Apache Karaf manual (documentation) is available as a WAB that you can
deploy directly in a running instance:
+
+----
+karaf@root()> bundle:install -s mvn:org.apache.karaf/manual/3.0.0/war
+----
+
+===  WAR (WebApplication aRchive)
+
+Apache Karaf allows you to deploy directly WAR files without repackaging as WAB.
+
+Using the `webbundle` prefix and providing headers directly on the URL, Apache Karaf creates
a WAB "on the fly".
+
+For instance, you can deploy the Apache Tomcat sample non-OSGi "classical" WAR with the following
command:
+
+----
+karaf@root()> bundle:install -s "webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample"
+----
+
+You can note the `webbundle` prefix, and the `Bundle-SymbolicName` and `Web-ContextPath`
headers on the URL.
+
+==  Commands
+
+===  `http:list`
+
+The `http:list` lists the available Servlets deployed in the WebContainer.
+
+For instance, if you have installed the Apache Karaf WebConsole, you can see the WebConsole
Servlets:
+
+----
+karaf@root()> http:list
+ID  | Servlet          | Servlet-Name   | State       | Alias               | Url
+-----------------------------------------------------------------------------------------------------
+113 | ResourceServlet  | /res           | Deployed    | /system/console/res | [/system/console/res/*]
+113 | KarafOsgiManager | ServletModel-2 | Undeployed  | /system/console     | [/system/console/*]
+113 | KarafOsgiManager | ServletModel-5 | Deployed    | /system/console     | [/system/console/*]
+----
+
+The `ID` is the ID of the bundle which provides the servlet (`113` here).
+
+The `State` is the current state of the Servlet (`Deployed` or `Undeployed`).
+
+The `Url` is the URL where the Servlet is available.
+
+===  `web:list`
+
+The `web:list` command lists the WebApplication Bundles ("native" WAB or "wrapped WAR") deployed
in the WebContainer.
+
+For instance, if you installed the Apache Karaf manual WAR file as described previously,
you can see it with `web:list`:
+
+----
+karaf@root()> web:list
+ID  | State       | Web-State   | Level | Web-ContextPath | Name
+---------------------------------------------------------------------------------------------------
+111 | Active      | Deployed    | 80    | /karaf-doc      | Apache Karaf :: Manual (3.0.0)
+----
+
+===  `web:stop`
+
+The `web:stop` command stops a web application in the WebContainer. The `web:stop` command
expects a `id` argument
+corresponding to the bundle ID (as displayed by the `web:list` command).
+
+For instance, to stop the Apache Karaf manual web application:
+
+----
+karaf@root()> web:stop 111
+----
+
+===  `web:start`
+
+The `web:start` command starts a web application in the WebContainer. The `web:start` command
expects a `id` argument
+corresponding to the bundle ID (as displayed by the `web:list` command).
+
+For instance, to start the Apache Karaf manual web application:
+
+----
+karaf@root()> web:start 111
+----
+
+==  JMX HttpMBean
+
+On the JMX layer, you have a MBean dedicated to the manipulation of the Servlets: the HttpMBean.
+
+The ObjectName to use is `org.apache.karaf:type=http,name=*`.
+
+===  Attributes
+
+The `Servlets` attribute provides a tabular data providing the list of deployed Servlets
including:
+
+* `Alias` is the Servlet URL alias.
+* `Bundle-ID` is the ID of the bundle which provides this Servlet.
+* `Servlet` is the class name of the Servlet.
+* `State` is the current Servlet state (`Deployed` or `Undeployed`).
+* `URL` is the URL of the Servlet (the Servlet context path).
+
+==  JMX WebMBean
+
+On the JMX layer, you have a MBean dedicated to the manipulation of the Web Applications:
the WebMBean.
+
+The ObjectName to use is `org.apache.karaf:type=web,name=*`.
+
+===  Attributes
+
+The `WebBundles` attribute provides a tabular data providing the list of deployed Web Applications
including:
+
+* `ID` is the ID of the bundle providing the Web Application.
+* `Level` is the bundle start level.
+* `Name` is the bundle symbolic name providing the Web Application.
+* `State` is the current state of the bundle.
+* `Web-ContextPath` is the context path of the Web Application.
+* `Web-State` is the current status of the Web Application (`Deployed` or `Undeployed`).
+
+===  Operations
+
+* `start(id)` starts the web context of the bundle with `id`.
+* `start(list)` starts the web context of the bundles with ID in the provided `list`.
+* `stop(id)` stops the web context of the bundle with `id`.
+* `stop(list)` stops the web context of the bundles with ID in the provided `list`.
+

http://git-wip-us.apache.org/repos/asf/karaf/blob/677c6d46/manual/src/main/asciidoc/users-guide/wrapper.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/users-guide/wrapper.adoc b/manual/src/main/asciidoc/users-guide/wrapper.adoc
new file mode 100644
index 0000000..2765259
--- /dev/null
+++ b/manual/src/main/asciidoc/users-guide/wrapper.adoc
@@ -0,0 +1,376 @@
+=  Integration in the operating system: the Service Wrapper
+
+In the previous chapter, we saw the different scripts and commands to start, stop, restart
Apache Karaf.
+
+Instead of using these commands and scripts, you can integrate Apache Karaf directly in your
operating system service control.
+
+Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate
Apache Karaf:
+
+* like a native Windows Service
+* like a Unix daemon process
+
+The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies,
and the ability to run services which interact with the desktop.
+
+It also includes advanced fault detection software which monitors an application.
+The "Service Wrapper" is able to detect crashes, freezes, out of memory and other exception
events, then automatically react by restarting Apache Karaf with a minimum of delay.
+It guarantees the maximum possible uptime of Apache Karaf.
+
+==  Supported platforms
+
+* Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)
+* Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)
+* FreeBSD 9.x, 8.x
+* AIX 5.x, 6.x, 7.x (Power architecture)
+* Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)
+* HP-UX 10.x, 11.x (32 and 64 bits architecture)
+* SGI Irix
+* MacOS X
+
+==  Installation
+
+Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper"
installer first.
+
+In the console:
+
+----
+karaf@root()> feature:install service-wrapper
+----
+
+Now, you have the `wrapper:install` command, to "register" Apache Karaf as service/daemon
on your system:
+
+----
+karaf@root()> wrapper:install --help
+DESCRIPTION
+        wrapper:install
+
+        Install the container as a system service in the OS.
+
+SYNTAX
+        wrapper:install [options]
+
+OPTIONS
+        -d, --display
+                The display name of the service.
+                (defaults to karaf)
+        --help
+                Display this help message
+        -s, --start-type
+                Mode in which the service is installed. AUTO_START or DEMAND_START (Default:
AUTO_START)
+                (defaults to AUTO_START)
+        -n, --name
+                The service name that will be used when installing the service. (Default:
karaf)
+                (defaults to karaf)
+        -D, --description
+                The description of the service.
+                (defaults to )
+----
+
+==  Installation
+
+Karaf Wrapper is an optional feature. To install it, simply type:
+
+----
+karaf@root> feature:install wrapper
+----
+
+Once installed, wrapper feature will provide `wrapper:install` new command in the Karaf shell:
+
+----
+karaf@root> wrapper:install --help
+DESCRIPTION
+        wrapper:install
+
+        Install the container as a system service in the OS.
+
+SYNTAX
+        wrapper:install [options]
+
+OPTIONS
+        -s, --start-type
+                Mode in which the service is installed. AUTO_START or DEMAND_START (Default:
AUTO_START)
+                (defaults to AUTO_START)
+        --help
+                Display this help message
+        -n, --name
+                The service name that will be used when installing the service. (Default:
karaf)
+                (defaults to karaf)
+        -d, --display
+                The display name of the service.
+        -D, --description
+                The description of the service.
+                (defaults to )
+----
+
+The `wrapper:install` command detects the running Operating Service and provide the service/daemon
ready to be integrated in your system.
+
+For instance, on a Ubuntu/Debian Linux system:
+
+----
+karaf@root()> wrapper:install
+Creating file: /opt/apache-karaf-3.0.0/bin/karaf-wrapper
+Creating file: /opt/apache-karaf-3.0.0/bin/karaf-service
+Creating file: /opt/apache-karaf-3.0.0/etc/karaf-wrapper.conf
+Creating file: /opt/apache-karaf-3.0.0/lib/libwrapper.so
+Creating file: /opt/apache-karaf-3.0.0/lib/karaf-wrapper.jar
+Creating file: /opt/apache-karaf-3.0.0/lib/karaf-wrapper-main.jar
+
+Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
+        /opt/apache-karaf-3.0.0/etc/karaf-wrapper.conf
+before installing and starting the service.
+
+
+Ubuntu/Debian Linux system detected:
+  To install the service:
+    $ ln -s /opt/apache-karaf-3.0.0/bin/karaf-service /etc/init.d/
+
+  To start the service when the machine is rebooted:
+    $ update-rc.d karaf-service defaults
+
+  To disable starting the service when the machine is rebooted:
+    $ update-rc.d -f karaf-service remove
+
+  To start the service:
+    $ /etc/init.d/karaf-service start
+
+  To stop the service:
+    $ /etc/init.d/karaf-service stop
+
+  To uninstall the service :
+    $ rm /etc/init.d/karaf-service
+
+----
+
+You can note that `wrapper:install` command detected the running operating system ("Ubuntu/Debian
Linux system detected").
+
+You have a complete explanation and list of system commands to perform to integrate Apache
Karaf in your system:
+
+----
+ln -s /opt/apache-karaf-3.0.0/bin/karaf-service /etc/init.d/
+update-rc.d karaf-service defaults
+----
+
+==  Uninstall
+
+The `wrapper:install` provides the system commands to perform to uninstall the service/daemon).
+
+For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove
the `karaf-service` script from the runlevel scripts:
+
+----
+rm /etc/init.d/karaf-service
+----
+
+You can remove the "Wrapper Service" installer after that:
+
+----
+karaf@root()> feature:uninstall service-wrapper
+----
+
+==  Note for MacOS users
+
+On MacOS you can install the service for an user or for the system.
+
+If you want to add bin/org.apache.karaf.KARAF as user service move this file into ~/Library/LaunchAgents/:
+
+----
+mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
+----
+
+If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:
+
+----
+sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
+----
+
+Change owner and rights:
+
+----
+sudo chown root:wheel /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+sudo chmod u=rw,g=r,o=r /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+----
+
+You can test your service:
+
+----
+launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
+launchctl start org.apache.karaf.KARAF
+launchctl stop org.apache.karaf.KARAF
+----
+
+Finally, after restart your session or system you can use launchctl command to start and
stop your service.
+
+If you want to remove the service call:
+
+----
+launchctl remove org.apache.karaf.KARAF
+----
+
+==  Configuration
+
+When using scripts in the Apache Karaf `bin` folder, you can using `bin/setenv` Unix script
(`bin\setenv.bat` on Windows) as described in the [Start, stop, restart, connect|start-stop]
section of the documentation.
+
+{warning:title=Warning}
+The `bin/setenv` Unix script (`bin\setenv.bat` on Windows) is not used by the Apache Karaf
Service Wrapper.
+{warning}
+
+To configure Apache Karaf started by the Service Wrapper, you have to tune the `etc/karaf-wrapper.conf`
file. If you provided the `name` option to the `wrapper:install` command, the file is `etc/karaf-yourname.conf`.
+
+In this file, you can configure the different environment variables used by Apache Karaf.
The Service Wrapper installer automatically populate these variables for you during the installation
(using `wrapper:install` command).
+For instance:
+
+* `set.default.JAVA_HOME` is the `JAVA_HOME` used to start Apache Karaf (populated during
Service Wrapper installation).
+* `set.default.KARAF_HOME` is the location of your Apache Karaf installation (populated during
Service Wrapper installation).
+* `set.default.KARAF_BASE` is the location of your Apache Karaf installation (populated during
Service Wrapper installation).
+* `set.default.KARAF_DATA` is the location of the Apache Karaf data folder (populated during
Service Wrapper installation).
+* `set.default.KARAF_ETC` is the location of the Apache Karaf etc folder (populated during
Service Wrapper installation).
+* `wrapper.java.additional` is used to pass additional arguments to the Java command, indexed
by the argument number. The next index to use is 11.
+* `wrapper.java.initmemory` is the initial JVM memory size (the `-Xms`). It's not set by
default (JVM default).
+* `wrapper.java.maxmemory` is the maximum JVM memory size (the `-Xmx`). It's set to 512M
by default.
+* `wrapper.logfile` is the location of the Service Wrapper log file. It's set to `%KARAF_DATA%/log/wrapper.log`
by default.
+* `wrapper.logfile.loglevel` is the Service Wrapper log level. It's set to `INFO` by default.
+* `wrapper.logfile.maxsize` is the Service Wrapper log file maximum size (before rotation).
It's set to `10m` (10MB) by default.
+* `wrapper.logfile.maxfiles` is the number of Service Wrapper log files created (and rotated).
It's set to `5` by default.
+* `wrapper.syslog.loglevel` is the integration with Unix syslog daemon. By default, it's
set to `none` meaning disabled.
+* `wrapper.ntservice.name` is Windows service specific and defines the Windows service name.
It's set to the `name` option of the `wrapper:install` command, or `karaf` by default.
+* `wrapper.ntservice.displayname` is Windows service specific and defines the Windows service
display name. It's set to the `display` option of the `wrapper:install` command, or `karaf`
by default.
+* `wrapper.ntservice.description` is Windows service specific and defines the Windows service
description. It's set to the `description` option of the `wrapper:install` command, or empty
by default.
+* `wrapper.ntservice.starttype` is Windows service specific and defines if the Windows service
is started automatically with the service, or just on demand. It's set to `AUTO_START` by
default, and could be switch to `DEMAND_START`.
+
+This is a example of generated `etc/karaf-wrapper.conf` file:
+
+----
+# ------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ------------------------------------------------------------------------
+
+#********************************************************************
+# Wrapper Properties
+#********************************************************************
+set.default.JAVA_HOME=/opt/jdk/1.7.0_21
+set.default.KARAF_HOME=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT
+set.default.KARAF_BASE=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT
+set.default.KARAF_DATA=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT/data
+set.default.KARAF_ETC=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT/etc
+
+# Java Application
+wrapper.working.dir=%KARAF_BASE%
+wrapper.java.command=%JAVA_HOME%/bin/java
+wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
+wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
+wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
+wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jmx-boot.jar
+wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-jaas-boot.jar
+wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-wrapper-main.jar
+wrapper.java.classpath.6=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
+wrapper.java.library.path.1=%KARAF_HOME%/lib/
+
+# Application Parameters.  Add parameters as needed starting from 1
+#wrapper.app.parameter.1=
+
+# JVM Parameters
+# note that n is the parameter number starting from 1.
+wrapper.java.additional.1=-Dkaraf.home=%KARAF_HOME%
+wrapper.java.additional.2=-Dkaraf.base=%KARAF_BASE%
+wrapper.java.additional.3=-Dkaraf.data=%KARAF_DATA%
+wrapper.java.additional.4=-Dkaraf.etc=%KARAF_ETC%
+wrapper.java.additional.5=-Dcom.sun.management.jmxremote
+wrapper.java.additional.6=-Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder
+wrapper.java.additional.7=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.8=-Dkaraf.startRemoteShell=true
+wrapper.java.additional.9=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
+wrapper.java.additional.10=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
+
+# Uncomment to enable jmx
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
+
+# Uncomment to enable YourKit profiling
+#wrapper.java.additional.n=-Xrunyjpagent
+
+# Uncomment to enable remote debugging
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=3
+
+# Maximum Java Heap Size (in MB)
+wrapper.java.maxmemory=512
+
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console.  (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output.  (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=%KARAF_DATA%/log/wrapper.log
+
+# Format of output for the log file.  (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output.  (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+#  the log is rolled. Size is specified in bytes.  The default value
+#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
+#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=10m
+
+# Maximum number of rolled log files which will be allowed before old
+#  files are deleted.  The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=5
+
+# Log Level for sys/event log output.  (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=karaf
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+#  using this configuration file has been installed as a service.
+#  Please uninstall the service before modifying this section.  The
+#  service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=karaf
+
+# Display name of the service
+wrapper.ntservice.displayname=karaf
+
+# Description of the service
+wrapper.ntservice.description=
+
+# Service dependencies.  Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed.  AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+----


Mime
View raw message