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 "Setting up a CDO Server"

(Server Configuration)
(Adapt the launch configuration)
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
= Quickstart =
 
= Quickstart =
  
In this section you'll be told how get a running server quickly. Most likely there are setups that fit your needs better. This sections tries to get you up and running as quickly as possible.
+
In this section you'll be told how get a running server quickly. Most likely there are setups that fit your needs better. This sections tries to get you up and running as quickly as possible.  
  
 
== Install all CDO bundles ==
 
== Install all CDO bundles ==
  
Install all CDO features and bundles and dependencies listed on the [http://wiki.eclipse.org/CDO_Project_Resources#Downloads resources] page in the CDO wiki. You may either download [http://www.eclipse.org/modeling/emf/downloads/index.php?project=cdo&showAll=0&showMax=5 zips ] or direct your update manager to the [http://www.eclipse.org/modeling/emf/updates/ EMF update site] to install these bundles and features.
+
Install all CDO features and bundles and dependencies listed on the [http://wiki.eclipse.org/CDO_Project_Resources#Downloads resources] page in the CDO wiki.<br>
 +
You may either download [http://www.eclipse.org/modeling/emf/downloads/index.php?project=cdo&showAll=0&showMax=5 zips ] or direct your update manager to the [http://www.eclipse.org/modeling/emf/updates/ EMF update site] to install these bundles and features.
 +
 
 +
== Checkout org.eclipse.emf.cdo.server.product ==
 +
Checkout the whole [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product-feature/?root=Modeling_Project org.eclipse.emf.cdo.server.product-feature]. You may use the [org.eclipse.emf.cdo.server.product.psf team project set file] or do it manually:
 +
 
 +
[[Image:cvs-org.eclipse.emf.cdo.server.product.png]]
  
 
== Configure your server ==
 
== Configure your server ==
  
An examplary [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product/rootfiles/configuration/cdo-server.xml?root=Modeling_Project&view=markup server setup] and a [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product/CDOServer.product?logsort=date&root=Modeling_Project&view=markup launch configuration] are availbale in the cvs.  
+
The current server bundle is already fully configured. It may be run out-of-the-box. The launcher configuration supplies the following VM argument that tells the server to use the bundled default configuration:
You may download the [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product/rootfiles/configuration/cdo-server.xml?root=Modeling_Project&view=co cdo-server.xml] to a '''configuration''' folder in your '''home-directory''':
+
 
+
  -Dnet4j.config=${resource_loc:/org.eclipse.emf.cdo.server.product-feature/rootfiles/configuration}
 +
 
 +
This default configuration uses a derby database that holds its files in /temp/cdodb1. If this fits your needs, just skip this section.<br>
 +
If you want/have to change the default, create a custom configuration as explained in this section, create a laucher (as told below) and remove the VM argument in the launcher. <br><br>
 +
An examplary [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product-feature/rootfiles/configuration/cdo-server.xml?root=Modeling_Project&view=markup server configration] is included in the feature you now have in your workspace.<br>
 +
Change at least the location for the db files:
 +
<br><br>
 +
[[Image:change-db-file-cdo-server-xml.png]]
 +
<br>
 +
You may read further details on available configuration options in the [http://wiki.eclipse.org/CDO_Server_Configuration_Reference server configuration reference].<br>
 +
In the next step you have to copy it to a '''configuration''' folder in your '''home-directory''':
 +
 
 
  linux:  '''/home/yoda/configuration/cdo-server.xml''' or
 
  linux:  '''/home/yoda/configuration/cdo-server.xml''' or
 
   
 
   
 
  windows: '''C:\Documents and Settings\Yoda\configuration\cdo-server.xml'''
 
  windows: '''C:\Documents and Settings\Yoda\configuration\cdo-server.xml'''
  
 +
You can achieve this by exporting the '''configuration directory''' and the '''cdo-server.xml''' to the file system:<br><br>
 +
[[Image:export-to-file-system.png]]<br><br>
 +
[[Image:export-cdo-server-configuration.png]]<br><br>
  
You'll then have to edit '''cdo-server.xml''' to your own needs by changing the path where derby stores its files:
+
== Create a launch configuration ==
  
[[Image:change-db-file-cdo-server-xml.png]]
+
To launch the server you may use the [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product-feature/CDOServer.product?logsort=date&root=Modeling_Project&view=markup launch configuration] held in the server product feature. Open it and run it once. Even though this fails, you now have a launch configuration you can edit.
 +
<br><br>
 +
[[Image:Get-cdo-server-launch.png]]  
 +
<br>
  
== Launch Configuration ==
 
  
To launch the server you may use the [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product/CDOServer.product?logsort=date&root=Modeling_Project&view=markup launch configuration] held in the server product feature. [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/features/org.eclipse.emf.cdo.server.product/CDOServer.product?root=Modeling_Project&view=co Download] it and import it to your eclipse instance
+
== Adapt the launch configuration ==
 +
You'll now have to modify this launch configuration to get the server up and running.
 +
The first thing you need to adapt is to tell it to generate a fresh '''config.ini''':
 +
<br><br>
 +
[[Image:Launch-generate-config.png]]
 +
<br><br>
 +
Furhermore you'll have to make sure your server gets all plugins it needs. Most plugins are declared to dependent on in the bundle manifests, so hitting [[Image:Add-required-plugins.png]] is all you need to get them included. If you have aptana bundles installed,
 +
<br>
 +
* com.aptana.ide.libraries
 +
gets selected automatically. It holds derby bundles (ex. derby client, etc.) that are of no use to our setup. Deselect it!
 +
<br>
 +
The database backend (beside the client/server-communication and other components) is configurable and resolved at runtime. You'll therefore have to add those manually. If you stay with the default configuration, that uses an embedded derby database, you'll have to add:
 +
<br>
 +
* org.apache.derby
 +
* org.eclipse.emf.cdo.server.db
 +
* org.eclipse.emf.cdo.server.net4j
 +
* org.eclipse.net4j.db.derby
 +
* org.eclipse.net4j.tcp
 +
<br>
  
[[Image:import-launch-configuration.png]]
+
[[Image:Launch-select-plugins.png]]  
 +
<br>
 +
<br>
 +
You may enable fine grained logging (for the cdo- and net4j-bundles) in the '''trace''' tab in order to get detailed informations on what's going on.<br>
 +
<br>
 +
[[Image:Launch-enable-tracing.png]]<br><br>
  
== Checkout org.eclipse.emf.cdo.server.product ==
+
<b>Attention OS-X-User:</b><br>
 +
You have to adapt the -VM argument -Dnet4j.config pointing to an absolute path instead of simply "configuration".
  
Alternatively you may checkout the whole feature. You may use the [org.eclipse.emf.cdo.server.product.psf team project set file] or do it manually:
+
== Start and Stop your server ==
  
[[Image:cvs-org.eclipse.emf.cdo.server.product.png]]
+
You are now ready to launch your server. Hit the trigger and watch it get up and running.<br>
 +
<br>
 +
[[Image:Launch-started.png]]
 +
<br><br>
 +
You're running an embedded derby database in an OSGI container. Terminating it by stopping the execution thread in the debugger does not allow it to shut down tidily. To achieve that, get your cursor to the osgi console and close the server by entering '''close'''.
 +
<br><br>
 +
[[Image:Launch-close.png]]  
  
 
----
 
----
 
Wikis: [[CDO]] | [[Net4j]] | [[EMF]] | [[Eclipse]]
 
Wikis: [[CDO]] | [[Net4j]] | [[EMF]] | [[Eclipse]]

Latest revision as of 14:27, 15 March 2011

Quickstart

In this section you'll be told how get a running server quickly. Most likely there are setups that fit your needs better. This sections tries to get you up and running as quickly as possible.

Install all CDO bundles

Install all CDO features and bundles and dependencies listed on the resources page in the CDO wiki.
You may either download zips or direct your update manager to the EMF update site to install these bundles and features.

Checkout org.eclipse.emf.cdo.server.product

Checkout the whole org.eclipse.emf.cdo.server.product-feature. You may use the [org.eclipse.emf.cdo.server.product.psf team project set file] or do it manually:

Cvs-org.eclipse.emf.cdo.server.product.png

Configure your server

The current server bundle is already fully configured. It may be run out-of-the-box. The launcher configuration supplies the following VM argument that tells the server to use the bundled default configuration:

 -Dnet4j.config=${resource_loc:/org.eclipse.emf.cdo.server.product-feature/rootfiles/configuration}

This default configuration uses a derby database that holds its files in /temp/cdodb1. If this fits your needs, just skip this section.
If you want/have to change the default, create a custom configuration as explained in this section, create a laucher (as told below) and remove the VM argument in the launcher.

An examplary server configration is included in the feature you now have in your workspace.
Change at least the location for the db files:

Change-db-file-cdo-server-xml.png


You may read further details on available configuration options in the server configuration reference.
In the next step you have to copy it to a configuration folder in your home-directory:

linux:   /home/yoda/configuration/cdo-server.xml or

windows: C:\Documents and Settings\Yoda\configuration\cdo-server.xml

You can achieve this by exporting the configuration directory and the cdo-server.xml to the file system:

Export-to-file-system.png

Export-cdo-server-configuration.png

Create a launch configuration

To launch the server you may use the launch configuration held in the server product feature. Open it and run it once. Even though this fails, you now have a launch configuration you can edit.

Get-cdo-server-launch.png


Adapt the launch configuration

You'll now have to modify this launch configuration to get the server up and running. The first thing you need to adapt is to tell it to generate a fresh config.ini:

Launch-generate-config.png

Furhermore you'll have to make sure your server gets all plugins it needs. Most plugins are declared to dependent on in the bundle manifests, so hitting Add-required-plugins.png is all you need to get them included. If you have aptana bundles installed,

* com.aptana.ide.libraries

gets selected automatically. It holds derby bundles (ex. derby client, etc.) that are of no use to our setup. Deselect it!
The database backend (beside the client/server-communication and other components) is configurable and resolved at runtime. You'll therefore have to add those manually. If you stay with the default configuration, that uses an embedded derby database, you'll have to add:

* org.apache.derby
* org.eclipse.emf.cdo.server.db
* org.eclipse.emf.cdo.server.net4j
* org.eclipse.net4j.db.derby
* org.eclipse.net4j.tcp


Launch-select-plugins.png

You may enable fine grained logging (for the cdo- and net4j-bundles) in the trace tab in order to get detailed informations on what's going on.

Launch-enable-tracing.png

Attention OS-X-User:
You have to adapt the -VM argument -Dnet4j.config pointing to an absolute path instead of simply "configuration".

Start and Stop your server

You are now ready to launch your server. Hit the trigger and watch it get up and running.

Launch-started.png

You're running an embedded derby database in an OSGI container. Terminating it by stopping the execution thread in the debugger does not allow it to shut down tidily. To achieve that, get your cursor to the osgi console and close the server by entering close.

Launch-close.png


Wikis: CDO | Net4j | EMF | Eclipse

Back to the top