Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EIG:Install into Apache Karaf"

Line 1: Line 1:
==Introduction==
 
 
ECFs Remote Services/Remote Service Admin implementation may be used on any OSGi R4.3+ compatible Framework Implementation.  ECF will provide the [http://karaf.apache.org/ Apache Karaf] features to allow ECF RS/RSA components to be easily installed into a Karaf-based server.
 
 
 
==Installing ECF Remote Services SDK==
 
==Installing ECF Remote Services SDK==
  
*[http://karaf.apache.org/index/community/download.html Download] and [http://karaf.apache.org/manual/latest/quick-start.html Install] Karaf v3.x or v4.x.  See [http://www.liquid-reality.de/display/liquid/2011/02/15/Karaf+Tutorial+Part+1+-+Installation+and+First+application here] for a Karaf install tutorial.
+
Requirements:  ECF 3.13+ requires [http://karaf.apache.org Karaf 4 running on Java 8].
 
+
===Karaf 3.x===
+
 
+
Requirements:  Karaf 3.x requires Java 7 (Java 8 is not supported in Karaf 3.x). 
+
 
+
In the instructions below, use the following for the <repo url>
+
 
+
'''<repo url>:  '''http://download.eclipse.org/rt/ecf/latest/site.p2/karaf-features.xml
+
 
+
===Karaf 4.x===
+
 
+
requirements:  Karaf 4.x can use either Java 7 or 8, Maven Repos or http url install.
+
 
+
To use maven repos for install, it's necessary to insert the following lines into the Karaf configuration file '''<karafhome>/etc/org.ops4j.pax.url.mvn.cfg''':
+
  
 +
Once Karaf is started, the Service Component Runtime (SCR) should be installed
 
<pre>
 
<pre>
    http://build.ecf-project.org/maven/equinox.deps@id=org.eclipse.equinox, \
+
karaf@root()>feature:install scr
    http://build.ecf-project.org/maven/equinox.deps@id=org.eclipse.core, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.eclipse.ecf, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.eclipse.osgi, \
+
    http://build.ecf-project.org/maven/3.13.2@id=ch.ethz.iks, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.hadoop, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.commons, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.httpcomponents, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.xbill.dns, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.json, \
+
    http://build.ecf-project.org/maven/3.13.2@id=com.mycorp.examples, \
+
 
</pre>
 
</pre>
  
between the line
+
===Install Via Karaf Console===
  
 
<pre>
 
<pre>
org.ops4j.pax.url.mvn.repositories= \
+
karaf@root()>feature:repo-add http://download.eclipse.org/rt/ecf/latest/site.p2/karaf-features.xml
 +
karaf@root()>feature:install -v ecf-remoteservices-sdk
 
</pre>
 
</pre>
  
and
+
The ECF Karaf Remote Services SDK is now installed.
  
<pre>
+
To export an example remote service, see [[EIG:Install_Timeline_Example_into_Apache_Karaf | tutorial here]].
    http://repo1.maven.org/maven2@id=central, \
+
</pre>
+
  
so that it appears like this
+
===Install Via Webconsole===
  
 
<pre>
 
<pre>
org.ops4j.pax.url.mvn.repositories= \
+
karaf@root()>feature:install webconsole
    http://build.ecf-project.org/maven/equinox.deps@id=org.eclipse.equinox, \
+
    http://build.ecf-project.org/maven/equinox.deps@id=org.eclipse.core, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.eclipse.ecf, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.eclipse.osgi, \
+
    http://build.ecf-project.org/maven/3.13.2@id=ch.ethz.iks, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.hadoop, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.commons, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.apache.httpcomponents, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.xbill.dns, \
+
    http://build.ecf-project.org/maven/3.13.2@id=org.json, \
+
    http://build.ecf-project.org/maven/3.13.2@id=com.mycorp.examples, \
+
    http://repo1.maven.org/maven2@id=central, \
+
...
+
 
</pre>
 
</pre>
  
Then save the org.ops4j.pax.url.mvn.cfg file and start/restart karaf to have this new configuration take effect.  These changes to the etc/org.ops4j.pax.url.mvn.cfg file are only necessary if using the Maven installs below.
 
 
Java 7 (Maven) '''&lt;repo url&gt;:  '''http://download.eclipse.org/rt/ecf/latest/site.p2/karaf4-features-maven.xml<br>
 
Java 7 (http)'''&lt;repo url&gt;:  '''http://download.eclipse.org/rt/ecf/latest/site.p2/karaf4-features.xml
 
 
Java 8 (Maven) '''&lt;repo url&gt;:  '''http://download.eclipse.org/rt/ecf/latest/site.p2/karaf4-j8-features-maven.xml<br>
 
Java 8 (http) '''&lt;repo url&gt;:  '''http://download.eclipse.org/rt/ecf/latest/site.p2/karaf4-j8-features.xml
 
 
===ECF Remote Services SDK Install===
 
 
====Via Command Console====
 
 
*Enter:  '''feature:repo-add <appropriate repo url from above>
 
 
====Via Webconsole====
 
 
*If you haven't already done so, install the Karaf webconsole
 
**Enter:  '''feature:install webconsole'''
 
 
**Open a Web Browser at '''http://localhost:8181/system/console'''.  See [http://karaf.apache.org/manual/latest-3.0.x/users-guide/webconsole.html here] for Karaf default username/password and other information about the use of the webconsole.
 
**Open a Web Browser at '''http://localhost:8181/system/console'''.  See [http://karaf.apache.org/manual/latest-3.0.x/users-guide/webconsole.html here] for Karaf default username/password and other information about the use of the webconsole.
 
*Add the ECF Repository
 
*Add the ECF Repository
Line 94: Line 35:
  
 
[[File:Karafinst2.png]]
 
[[File:Karafinst2.png]]
 
===Install the ECF SDK feature===
 
 
====Via Command Console====
 
 
*Enter:  '''feature:install -v ecf-remoteservices-sdk'''
 
 
====Via Webconsole====
 
  
 
*Click on the arrow for the '''ecf-remoteservices-sdk''' feature/row underneath the '''Actions''' column to install.
 
*Click on the arrow for the '''ecf-remoteservices-sdk''' feature/row underneath the '''Actions''' column to install.
Line 108: Line 41:
 
[[File:Karafinst3.png]]
 
[[File:Karafinst3.png]]
  
The ECF RS SDK is installed and running in Karaf
+
The ECF RS SDK is installed and running in Karaf.
 
+
To export an example remote service, see [[EIG:Install_Timeline_Example_into_Apache_Karaf | tutorial here]].
+

Revision as of 13:38, 4 December 2016

Installing ECF Remote Services SDK

Requirements: ECF 3.13+ requires Karaf 4 running on Java 8.

Once Karaf is started, the Service Component Runtime (SCR) should be installed

karaf@root()>feature:install scr

Install Via Karaf Console

karaf@root()>feature:repo-add http://download.eclipse.org/rt/ecf/latest/site.p2/karaf-features.xml
karaf@root()>feature:install -v ecf-remoteservices-sdk

The ECF Karaf Remote Services SDK is now installed.

To export an example remote service, see tutorial here.

Install Via Webconsole

karaf@root()>feature:install webconsole
  • Add the ECF Repository
    • From the Webconsole Main menu choose Main->Features
    • Add the appropriate <repo url> from above to in the text box, and select Add URL button

Karafinst1.png

The available ECF's features will then be shown below (e.g. ecf-remoteservices-sdk)

Karafinst2.png

  • Click on the arrow for the ecf-remoteservices-sdk feature/row underneath the Actions column to install.
  • When install is complete, the bundles list will have all ECF bundles active

Karafinst3.png

The ECF RS SDK is installed and running in Karaf.

Back to the top