Difference between revisions of "Remote Eclipse RCP Management"

From Eclipsepedia

Jump to: navigation, search
(Admin UI)
(What has to be done)
 
(45 intermediate revisions by 2 users not shown)
Line 9: Line 9:
  
 
== How to ==
 
== How to ==
The source code of the project is hostet on the [http://www.eclipse.org/ecf/ Eclipse Communication Framework] CVS. If you would like to become a committer please write me an email (reiswich@gmx.de). The main technologies used for this project are Eclipse Communication Framework and Eclipse Update API for managing updates, installs and uninstalls.
+
The source code of the project is hostet on the [http://sourceforge.net/projects/remotercp/ Sourceforge] git repository. If you would like to become a committer please write me an email (reiswich@gmx.de). The main technologies used for this project are Eclipse Communication Framework and Equinox P2 API for managing updates, installs and uninstalls.
  
=== CVS ===
+
=== git  ===
'''Host:''' ecf1.osuosl.org
+
<br>
+
'''Repository Path:''' /ecf -->  remoteprovisioning
+
<br>
+
'''User:''' anonymous
+
<br>
+
'''Password:''' <empty>
+
<br>
+
'''Connection method:''' pserver
+
<br>
+
  
From the above mentioned CVS repository checkout the following plugins:
+
The code can be found at '''git://remotercp.git.sourceforge.net/gitroot/remotercp/remotercp'''.
* org.remotercp.contacts
+
* org.remotercp.app
+
* org.remotercp.common
+
* org.remotercp.ecf
+
* org.remotercp.errorhandling
+
* org.remotercp.filetransfer.receiver
+
* org.remotercp.filetransfer.sender
+
* org.remotercp.login
+
* org.remotercp.progress
+
* org.remotercp.provisioning
+
* org.remotercp.provisioning.ui
+
* org.remotercp.preferences
+
* org.remotercp.preferences.ui
+
* org.remotercp.util
+
  
=== Admin UI ===
+
=== Admin UI ===
To run the admin-UI select in the plugin '''org.remotercp.core''' the remotercp.product file and click on the "Overview" tab "Launch an eclipse application. If the application doesn't start remove all bundles on the "Configuration" tab and add the following bundles:
+
 
<br />
+
To run the admin-UI select in the plugin '''org.remotercp.app''' the remotercp.product file and click on the "Overview" tab "Launch an eclipse application. If the application doesn't start remove all bundles on the "Configuration" tab and add the following bundles: <br> The admin UI depends on the following plugins:  
The admin UI depends on the following plugins:
+
 
* org.remotercp.contacts
+
*org.remotercp.admin.service.remoteprogress
* org.remotercp.app
+
*org.remotercp.app  
* org.remotercp.common
+
*org.remotercp.common
* org.remotercp.ecf
+
*org.remotercp.domain.authorization
* org.remotercp.errorhandling
+
*org.remotercp.domain.preferences
* org.remotercp.filetransfer.sender
+
*org.remotercp.domain.provisioning
* org.remotercp.login
+
*org.remotercp.service.connection
* org.remotercp.progress
+
*org.remotercp.ui.administration
* org.remotercp.preferences
+
*org.remotercp.ui.contacts
* org.remotercp.preferences.ui
+
*org.remotercp.ui.errorhandling
* org.remotercp.provisioning.ui
+
*org.remotercp.ui.login
* org.remotercp.util
+
*org.remotercp.ui.preferences
<br />
+
*org.remotercp.ui.progress
Afterwards press the button "Add Required Plug-ins". The application should start now. If you are still experiencing problems please check whether ECF is installed on your Eclipse app.
+
*org.remotercp.ui.provisioning
 +
*org.remotercp.util
 +
 
 +
----
 +
 
 +
As the tool is based on OSGi declarative services do not forget to add the following bundles to your launch configuration:
 +
 
 +
*org.eclipse.equinox.ds
 +
 
 +
<br> Afterwards press the button "Add Required Plug-ins". The application should start now. If you are still experiencing problems please check whether ECF is installed on your Eclipse app.  
  
 
By now the admin UI is an own RCP application but it is possible to move it to a perspective that can be easily integrated in own RCP applications.
 
By now the admin UI is an own RCP application but it is possible to move it to a perspective that can be easily integrated in own RCP applications.
  
Admin UI (Windows) '''DOWNLOAD''' [http://www.mediafire.com/file/nlmwzdzij5m/remotercpAdmin.zip]
+
=== Client  ===
  
=== Client ===
+
[[Image:Remote rcp login.png|thumb|right|Login dialog Remote Eclipse RCP Management prototype]] To run the client you'll need to create a simple RCP project (like the mail example) and include the following plugins to the dependencies:  
[[Image:Remote_rcp_login.png|right|thumb|Login dialog Remote Eclipse RCP Management prototype]]
+
To run the client you'll need to create a simple RCP project (like the mail example) and include the following plugins to the dependencies:
+
* org.remotercp.common
+
* org.remotercp.ecf
+
* org.remotercp.errorhandling
+
* org.remotercp.filetransfer.receiver
+
* org.remotercp.login
+
* org.remotercp.preferences
+
* org.remotercp.progress
+
* org.remotercp.provisioning
+
* org.remotercp.util
+
  
In order to run the client properly you will need to login to an XMPP server. By now the application supports only XMPP connections but as ECF is used it's very easy to extend the support for other connection types. To establish a connection you can add the following code to your ApplicationWorkbenchWindowAdvisor:
+
*org.remotercp.common
* public void preWindowOpen() {
+
*org.remotercp.domain.authorization
* IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
+
*org.remotercp.domain.preferences
* configurer.setInitialSize(new Point(400, 300));
+
*org.remotercp.domain.provisioning
* configurer.setShowCoolBar(false);
+
*org.remotercp.service.authorization
* configurer.setShowStatusLine(true);
+
*org.remotercp.service.connection
* configurer.setTitle("RCP Application");
+
*org.remotercp.service.preferences
*
+
*org.remotercp.service.provisioning
* // important in order to display progress in file transfer
+
*org.remotercp.ui.login
* configurer.setShowProgressIndicator(true);
+
*org.remotercp.util
*
+
* ChatLoginWizardDialog dialog = new ChatLoginWizardDialog();
+
* int open = dialog.open();
+
* if (open == Window.OK) {
+
* // start remote services
+
*                     ServiceLauncher.startRemoteServices();
+
* }
+
* }
+
  
You should now be able to run the client from Eclipse. At the beginning a login dialog will prompt and ask you for the login information. If you are able to connect to your server first step is done. But bevore you are able to install/update or uninstall features you'll need to create a feature based product of your application.
+
----
  
If you are using the mailexample client please create a product configuration based on your launch configuration. The next step you have to do is to create a feature for your product and initialize it from your product configuration. Now export your application and try to launch it.
+
As the tool is based on OSGi declarative services do not forget to add the following bundles to your launch configuration:
  
If you would like to play a bit around I've set up a simple feature in three versions which contains a view and a button. This features are are available from the following update site: http://eugenda.eu.funpic.de/upload/ Don't forget to restart the updated application to apply changes. For this purpose you can use the "Restart remote Application" button from the "Selected Contacts" view of the admin application.
+
*org.eclipse.equinox.ds
  
If your installation/update process works fine you should see the additional view with different names for the button (button v1, v2 and v3).
+
In order to run the client properly you will need to login to an XMPP server. By now the application supports only XMPP connections but as ECF is used it's very easy to extend the support for other connection types. To establish a connection you can add the following code to your Application and ApplicationWorkbenchWindowAdvisor:
  
Client Mail Example with remote capability (Windows) '''DOWNLOAD''' [http://www.mediafire.com/file/mehzmdwknmm/mailClient.zip]
+
  '''Application:'''
 +
 +
public Object start(IApplicationContext context) throws Exception {
 +
Display display = PlatformUI.createDisplay();
 +
try {
 +
'''ChatLoginWizardDialog dialog = new ChatLoginWizardDialog();'''
 +
'''int open = dialog.open();'''
 +
'''if (open == Window.CANCEL) {'''
 +
'''return IApplication.EXIT_OK;'''
 +
'''}'''
 +
 +
int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
 +
if (returnCode == PlatformUI.RETURN_RESTART)
 +
return IApplication.EXIT_RESTART;
 +
else
 +
return IApplication.EXIT_OK;
 +
} finally {
 +
display.dispose();
 +
}
 +
 +
}
 +
 +
'''ApplicationWorkbenchWindowAdvisor:'''
 +
 +
public void preWindowOpen() {
 +
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
 +
configurer.setInitialSize(new Point(400, 300));
 +
configurer.setShowCoolBar(false);
 +
configurer.setShowStatusLine(true);
 +
configurer.setTitle("RCP Application");
 +
 +
// important in order to display progress of long running operations
 +
'''configurer.setShowProgressIndicator(true);'''
 +
}
 +
 
 +
You should now be able to run the client from Eclipse. At the beginning a login dialog will prompt and ask you for the login information. If you are able to connect to your server first step is done. But before you are able to install/update or uninstall features you'll need to create a feature based product of your application.
  
 
== Milestones ==  
 
== Milestones ==  
=== What is done ===
+
=== What is done ===
# prototype UI is developed
+
 
# roster items are displayed with online/offline status in UI
+
#prototype UI is developed  
# remote OSGi services on ECF  
+
#roster items are displayed with online/offline status in UI  
# login functionallity with a login wizard
+
#remote OSGi services on ECF  
# connection to XMPP server
+
#login functionallity with a login wizard  
# file transfer
+
#connection to XMPP server  
# manipulating remote preferences
+
#file transfer  
# get a list of installed features on a remote machine
+
#manipulating remote preferences  
# install/update/uninstall operations based on the standalone update API
+
#get a list of installed features on a remote machine  
# browse remote update sites and download features/updates
+
#install/update/uninstall operations based on the standalone update API  
 +
#browse remote update sites and download features/updates
 +
 
 +
'''Update 11.06.2009'''
 +
 
 +
#Source Code adapted to Eclipse Communication Framework 3.0
 +
 
 +
'''Update 18.07.2009'''
 +
 
 +
#Introduced OSGi declarative services to client and admin tool&nbsp;
 +
 
 +
'''Update 30.11.2010'''
 +
#Currently working on Remote RCP based on P2. The reuse of P2 API is finished, but the reuse of P2 UI is difficult so far as it is not intended to be reused outside of the P2 Installation Wizard (statement p2-dev mailinglist).
 +
 
 +
'''Update 10.02.2011'''
 +
# The P2 API for install, update and uninstall operations is finished. The reuse of P2 UI is still difficult, however we were able to reuse some parts of the install dialog.
  
'''Update 11.06.2009'''
+
'''Update 14.02.2011'''
# Source Code adapted to Eclipse Communication Framework 3.0
+
# Remote ProgressMonitor developed. The remote ProgressMonitor does now report install/update/uninstall operations progress to Admin.
# Several bugs fixed
+
  
 
=== What has to be done ===
 
=== What has to be done ===
# perform install, update and unistall operations based on Equinox p2 (''' 08.07.2008 As it is very difficult to get support for P2 I started to use the [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/update/standalone/package-summary.html Standalone Update API] instead of P2 to get the prototype running. As soon as P2 support will be available I will try to switch to Equinox P2''')
+
# So far all provisioning operations are tested for a single client. More tests to handle multiple clients are required
# remote file browsing
+
# Reusing most of the P2 UI for update, install and uninstall operations
 
# security aspects have to be considered and implemented (not part of the prototype yet)
 
# security aspects have to be considered and implemented (not part of the prototype yet)
  
 
[[Category:Eclipse Communication Framework]]
 
[[Category:Eclipse Communication Framework]]

Latest revision as of 07:20, 11 July 2011

Contents

[edit] Introduction

The Remote Eclipse RCP Management project has been started in April 2008 and the first prototype was finished in October 2008. Any contribution to this project is welcome. The main purpose for this tool is to manage remote rcp applications.

A brief overview of the project goals:
Prototype Remote Eclipse RCP Management
  • update, install and delete features on a remote RCP application from an admin UI
  • remote administration of either user groups or single user
  • remote administration in headless mode
  • file transfer

[edit] How to

The source code of the project is hostet on the Sourceforge git repository. If you would like to become a committer please write me an email (reiswich@gmx.de). The main technologies used for this project are Eclipse Communication Framework and Equinox P2 API for managing updates, installs and uninstalls.

[edit] git

The code can be found at git://remotercp.git.sourceforge.net/gitroot/remotercp/remotercp.

[edit] Admin UI

To run the admin-UI select in the plugin org.remotercp.app the remotercp.product file and click on the "Overview" tab "Launch an eclipse application. If the application doesn't start remove all bundles on the "Configuration" tab and add the following bundles:
The admin UI depends on the following plugins:

  • org.remotercp.admin.service.remoteprogress
  • org.remotercp.app
  • org.remotercp.common
  • org.remotercp.domain.authorization
  • org.remotercp.domain.preferences
  • org.remotercp.domain.provisioning
  • org.remotercp.service.connection
  • org.remotercp.ui.administration
  • org.remotercp.ui.contacts
  • org.remotercp.ui.errorhandling
  • org.remotercp.ui.login
  • org.remotercp.ui.preferences
  • org.remotercp.ui.progress
  • org.remotercp.ui.provisioning
  • org.remotercp.util

As the tool is based on OSGi declarative services do not forget to add the following bundles to your launch configuration:

  • org.eclipse.equinox.ds


Afterwards press the button "Add Required Plug-ins". The application should start now. If you are still experiencing problems please check whether ECF is installed on your Eclipse app.

By now the admin UI is an own RCP application but it is possible to move it to a perspective that can be easily integrated in own RCP applications.

[edit] Client

Login dialog Remote Eclipse RCP Management prototype
To run the client you'll need to create a simple RCP project (like the mail example) and include the following plugins to the dependencies:
  • org.remotercp.common
  • org.remotercp.domain.authorization
  • org.remotercp.domain.preferences
  • org.remotercp.domain.provisioning
  • org.remotercp.service.authorization
  • org.remotercp.service.connection
  • org.remotercp.service.preferences
  • org.remotercp.service.provisioning
  • org.remotercp.ui.login
  • org.remotercp.util

As the tool is based on OSGi declarative services do not forget to add the following bundles to your launch configuration:

  • org.eclipse.equinox.ds

In order to run the client properly you will need to login to an XMPP server. By now the application supports only XMPP connections but as ECF is used it's very easy to extend the support for other connection types. To establish a connection you can add the following code to your Application and ApplicationWorkbenchWindowAdvisor:

 Application:

	public Object start(IApplicationContext context) throws Exception {
		Display display = PlatformUI.createDisplay();
		try {
			ChatLoginWizardDialog dialog = new ChatLoginWizardDialog();
			int open = dialog.open();
			if (open == Window.CANCEL) {
				return IApplication.EXIT_OK;
			}
			
			int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
			if (returnCode == PlatformUI.RETURN_RESTART)
				return IApplication.EXIT_RESTART;
			else
				return IApplication.EXIT_OK;
		} finally {
			display.dispose();
		}
		
	}	

ApplicationWorkbenchWindowAdvisor:

	public void preWindowOpen() {
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
		configurer.setInitialSize(new Point(400, 300));
		configurer.setShowCoolBar(false);
		configurer.setShowStatusLine(true);
		configurer.setTitle("RCP Application");
		
		// important in order to display progress of long running operations
		configurer.setShowProgressIndicator(true);
	}

You should now be able to run the client from Eclipse. At the beginning a login dialog will prompt and ask you for the login information. If you are able to connect to your server first step is done. But before you are able to install/update or uninstall features you'll need to create a feature based product of your application.

[edit] Milestones

[edit] What is done

  1. prototype UI is developed
  2. roster items are displayed with online/offline status in UI
  3. remote OSGi services on ECF
  4. login functionallity with a login wizard
  5. connection to XMPP server
  6. file transfer
  7. manipulating remote preferences
  8. get a list of installed features on a remote machine
  9. install/update/uninstall operations based on the standalone update API
  10. browse remote update sites and download features/updates

Update 11.06.2009

  1. Source Code adapted to Eclipse Communication Framework 3.0

Update 18.07.2009

  1. Introduced OSGi declarative services to client and admin tool 

Update 30.11.2010

  1. Currently working on Remote RCP based on P2. The reuse of P2 API is finished, but the reuse of P2 UI is difficult so far as it is not intended to be reused outside of the P2 Installation Wizard (statement p2-dev mailinglist).

Update 10.02.2011

  1. The P2 API for install, update and uninstall operations is finished. The reuse of P2 UI is still difficult, however we were able to reuse some parts of the install dialog.

Update 14.02.2011

  1. Remote ProgressMonitor developed. The remote ProgressMonitor does now report install/update/uninstall operations progress to Admin.

[edit] What has to be done

  1. So far all provisioning operations are tested for a single client. More tests to handle multiple clients are required
  2. Reusing most of the P2 UI for update, install and uninstall operations
  3. security aspects have to be considered and implemented (not part of the prototype yet)