For making CommunityMashup available it is recommended to set up a standalone server environment. This page describes how this can be done and how the server environment then can be maintained.

The basis of a standalone server environment is the Equinox OSGI implementation.

There are several alternatives for running the mashup and making the REST interface available via a Web interface:

In this How-To we describe how to host Jetty in Equinox.
More details about server side Equinox can be found at: http://www.eclipse.org/equinox/server/

Setup of a new server environment

Apache frontend, directory structure

In the following, we assume that the target system is running apache web server for serving standard web pages.

For every Mashup server environment, a new virtual host is created in Apache - in the directory /var/www/domain-name/web/

The OSGi installation will be placed in the directory /var/www/domain-name/osgi/ - In the following sub-sections we usually refer to this directory as (OSGi-)home directory.

The minimal directory structure below the home directory is:

Apache frontend, Apache configuration

If you are using an Apache frontend, the best way to forward requests to the OSGi installation is to use the Apache Reverse Proxy mode. 

See the following example config file for Apache (it includes a non proxy handling for the sub-directory /files and an access restriction to an IP range).

<VirtualHost *:80>
        ProxyRequests Off
        ProxyPreserveHost On


        <Proxy *>
                Require ip 137.193
        </Proxy>


        ProxyPass "/files" "!"
        ProxyPass "/" "http://localhost:8181/"
        ProxyPassReverse "/" "http://localhost:8181/"
        <Location />
                Require ip 137.193
        </Location>




        ServerAdmin michael.koch@unibw.de
        ServerName awareness.communitymashup.de
        DocumentRoot /var/www/awareness.communitymashup.de/web


        ErrorLog /var/www/awareness.communitymashup.de/log/error.log
        CustomLog /var/www/awareness.communitymashup.de/log/access.log combined
</VirtualHost>

OSGI bundles

First we need to place all needed OSGi bundles in the sub-directory "plugins":

The following table lists all bunteres CommunityMashup needs (most sources can be found in the plugins directory in the install directory of the local Eclipse development environment). Alternatively, you can download a minimal set of bundles together with the whole directory structure and other default files from TBD.

Bundle Id

Description

Source

org.eclipse.osgi_3.8.1.v20120830-144521

Equinox Framework

Eclipse Installation /plugins

org.eclipse.osgi.services_3.2.100.v20100503

Equinox Standard OSGi Services

Eclipse Installation /plugins

org.apache.felix.fileinstall_3.1.10

Bundle Installations und Start Service

http://felix.apache.org/site/downloads.cgi

org.apache.felix.webconsole_3.1.8

Felix Web Console

http://felix.apache.org/site/downloads.cgi

javax.servlet_2.5.0.v200910301333

Servlets, benötigt von Jetty

Eclipse Installation /plugins

org.knopflerfish.bundle.commons-logging_2.0.0.kf3

Verschiedene benötigte Log Implementierungen

http://www.knopflerfish.org/repo/index.html

org.mortbay.jetty.util_6.1.23.v201004211559

Utils, benötigt von Jetty

Eclipse Installation /plugins

org.eclipse.equinox.http.jetty_2.0.0.v20100503

Equinox Version des OSGi Http Service (basierend auf Jetty)

Eclipse Installation /plugins

org.mortbay.jetty.server_6.1.23.v201004211559

Mortbay Server, benötigt von Jetty

Eclipse Installation /plugins

org.eclipse.equinox.http.servlet_1.1.0.v20100503

Equinox Version der Http Servlets

Eclipse Installation /plugins

Configuration

Dies bedeutet:

Starten der OSGi Laufzeitumgebung

Für den Start von Equinox wird im Hauptverzeichnis der angelegten Verzeichnisstruktur der Befehl java -jar org.eclipse.osgi_3.6.2.R36x_v20110210.jarausgeführt.
Anschliessend sorgt der Felix File Install Sevice dafür, dass alle Bundles sowie deren Abhängigkeiten in der richtigen Reihenfolge in Equinox installiert und gestartet werden.

Für die Steuerung der OSGi-Umgebung steht die OSGi Console zur Verfügung.
Diese kann je nach Startparameter entweder direkt in der Kommandozeile oder über Telnet aufgerufen werden.

Startanleitung mit Console in Kommandozeile

Startanleitung mit Telnet Console

Felix Console

Nach dem Start von Equinox steht die Console auch über die Felix Webschnittstelle bereit:

OSGi Kommandos

Download: Minimale OSGi Umgebung als Zip

Minimale OSGi Umgebung (ZIP)

 


Contents