Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Tutorial/4.0/cloud/Cloud Step-by-Step"

< Scout‎ | Tutorial‎ | 4.0
(RabbitMQ)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ScoutPage|cat=Release 4.0}}
+
{{ScoutPage|cat=Tutorial 4.0}}
  
=How to deploy your Scout Application to the Cloud =
+
{{warning|This tutorial is still under cunstruction}}
This tutorial describes how to deploy your Scout Application to a PaaS cloud.
+
  
== Enable Clustersync ==
+
== Introduction ==
Register the clustersynchroniztation service in the plugin.xml of your server application:
+
  
<service
+
Since the Lune Release Eclipse Scout supports dynamic scalable server applications.
  class="org.eclipse.scout.rt.server.services.common.clustersync.ClusterSynchronizationService"
+
The motivation behind adding this feature is described in this [http://www.bsiag.com/scout/eclipse-luna-scout-cloud-apps/ Scout blog post]. For further information please read the master thesis about [[media:eclipse_scout_in_the_cloud_master_thesis.pdf|Scout in the Cloud (German)]].
  createImmediately="false"
+
  factory="org.eclipse.scout.rt.server.services.ServerServiceFactory"
+
  session="yourproject.ServerSession">
+
</service>
+
  
== Messaging Services ==
+
With the cloud support added to Scout 4.0 it is possible to run several instances of the server application and place them behind a load balancer. For the synchronization between the server nodes it's necessary to use two additional external services. A Cache Service and a Message Queue.  
Service plugins for messaging and cachestore can be installed from https://tools.bsiag.com/marketplace/cloud.
+
  
 +
Scout developers are able to either use one of the default implementations for cache services and message queue services or implement their own custom synchronization service connectors.
 +
The Scout default implementations are available from the [http://marketplace.eclipse.org Eclipse Marketplace].
 +
For chache services, default implementations are based on Memcached or Redis, and for message queue services the default implementations are based on RabbitMQ and AciveMQ.
  
=== RabbitMQ ===
+
== Preparation ==
  
'''Update Configuration'''
+
First we create a new Scout "Hello World" application as described in the [[Scout/Tutorial/4.0/HelloWorld|Hello World tutorial]].
You have to configure the services in the config.ini
+
  
#Message Queue
+
== Add Cloud Support to your Application ==
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#host=
+
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#user=
+
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#password=
+
  
== Cache Services ==
+
The second Step is to add the support of the cloud features to your application. Follow the [[{{BASEPAGENAME}}/add_cloud_support|instructions]].
A cache service can be used to synchronize the ServerSession and other shared state on the scout server side.
+
  
=== Memcached ===
+
== Deploy to the Cloud ==
On the marketplace there is a service available using [https://code.google.com/p/spymemcached/| spymemcached]  to connect to a memcached cache.
+
  
'''Update Targetplatform'''
+
Finally you are able to deploy you eclipse scout server application to the cloud.
 +
How to do this on the example of Amazon Beanstalk you can find [[{{BASEPAGENAME}}/deploy_on_cloud|here]].
  
Add the memcached feature to your target file:
+
== Deploy to a Local Cluster ==
  
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
+
If you want to test your application on your local machine you will fin the instructions [[{{BASEPAGENAME}}/local cloud|here]].
<unit id="org.eclipse.scout.rt.server.memcached.source.feature.group" version="0.0.0"/>
+
<repository location="http://tools.bsiag.com/marketplace/cloud/"/>
+
</location>
+
 
+
'''Update Product File'''
+
Add the bundles to the product file.
+
 
+
org.eclipse.scout.rt.server.memcached
+
com.bsiag.net.spy.memcached
+
org.eclipse.scout.commons.log4j.bridge.fragment
+
 
+
'''Update Configuration'''
+
Add the following settings to the config.ini file of the server.
+
 
+
#Memcached
+
org.eclipse.scout.cloud.cachestore.MemcachedCacheService#host=
+
org.eclipse.scout.cloud.cachestore.MemcachedCacheService#port=
+
org.eclipse.scout.cloud.cachestore.MemcachedCacheService#username=
+
org.eclipse.scout.cloud.cachestore.MemcachedCacheService#password=
+
 
+
 
+
=== Redis===
+
 
+
'''Update Targetplatform'''
+
 
+
Add the redis feature to your target file:
+
 
+
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
+
  <unit id="org.eclipse.scout.rt.server.redis.source.feature.group" version="0.0.0"/>
+
  <repository location="http://tools.bsiag.com/marketplace/cloud"/>
+
</location>
+
 
+
'''Update Product File'''
+
Add the bundles to the product file.
+
 
+
com.bsiag.redis.clients.jedis
+
org.eclipse.scout.rt.server.redis
+
org.apache.commons.pool
+
 
+
'''Update Configuration'''
+
Add the following settings to the config.ini file of the server.
+
 
+
#Redis
+
org.eclipse.scout.rt.server.redis.RedisCacheService#host=
+
org.eclipse.scout.rt.server.redis.RedisCacheService#port=
+
org.eclipse.scout.rt.server.redis.RedisCacheService#auth=true
+
org.eclipse.scout.rt.server.redis.RedisCacheService#password=
+

Latest revision as of 06:34, 6 August 2014

The Scout documentation has been moved to https://eclipsescout.github.io/.

Warning2.png
This tutorial is still under cunstruction


Introduction

Since the Lune Release Eclipse Scout supports dynamic scalable server applications. The motivation behind adding this feature is described in this Scout blog post. For further information please read the master thesis about Scout in the Cloud (German).

With the cloud support added to Scout 4.0 it is possible to run several instances of the server application and place them behind a load balancer. For the synchronization between the server nodes it's necessary to use two additional external services. A Cache Service and a Message Queue.

Scout developers are able to either use one of the default implementations for cache services and message queue services or implement their own custom synchronization service connectors. The Scout default implementations are available from the Eclipse Marketplace. For chache services, default implementations are based on Memcached or Redis, and for message queue services the default implementations are based on RabbitMQ and AciveMQ.

Preparation

First we create a new Scout "Hello World" application as described in the Hello World tutorial.

Add Cloud Support to your Application

The second Step is to add the support of the cloud features to your application. Follow the instructions.

Deploy to the Cloud

Finally you are able to deploy you eclipse scout server application to the cloud. How to do this on the example of Amazon Beanstalk you can find here.

Deploy to a Local Cluster

If you want to test your application on your local machine you will fin the instructions here.

Back to the top