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 "Scout/Tutorial/4.0/cloud/Cloud Step-by-Step"

< Scout‎ | Tutorial‎ | 4.0
(Redis)
 
(10 intermediate revisions by 3 users 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">
+
</service>
+
  
 +
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.
  
== Overview Cloud Support on Marketplace ==
+
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.
There are a number of plugins available on the [https://marketplace.eclipse.org/content/cloud-support-eclipse-scout eclipse marketplace] to support running scout applications in the cloud. This section provides an overview of the available features and plugins.
+
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.
  
== Messaging Services ==
+
== Preparation ==
Service plugins for messaging and cachestore can be installed from the updatesite https://tools.bsiag.com/marketplace/cloud/4.0 or from the [https://marketplace.eclipse.org/content/cloud-support-eclipse-scout eclipse marketplace].
+
  
=== RabbitMQ ===
+
First we create a new Scout "Hello World" application as described in the [[Scout/Tutorial/4.0/HelloWorld|Hello World tutorial]].
  
On the marketplace there is a service available for [http://www.rabbitmq.com/| RabbitMQ].
+
== Add Cloud Support to your Application ==
  
'''Update Targetplatform'''
+
The second Step is to add the support of the cloud features to your application. Follow the [[{{BASEPAGENAME}}/add_cloud_support|instructions]].
  
Add the feature to your target file:
+
== Deploy to the Cloud ==
  
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
+
Finally you are able to deploy you eclipse scout server application to the cloud.  
<unit id="org.eclipse.scout.rt.server.rabbitmq.source.feature.group" version="0.0.0"/>
+
How to do this on the example of Amazon Beanstalk you can find [[{{BASEPAGENAME}}/deploy_on_cloud|here]].
<repository location="http://tools.bsiag.com/marketplace/cloud/"/>
+
</location>
+
  
'''Update Product File'''
+
== Deploy to a Local Cluster ==
Add the bundles to the product file.
+
  
org.eclipse.scout.rt.server.rabbitmq
+
If you want to test your application on your local machine you will fin the instructions [[{{BASEPAGENAME}}/local cloud|here]].
com.bsiag.com.rabbitmq.client
+
org.apache.commons.io
+
org.apache.commons.pool
+
 
+
'''Update Configuration'''
+
Add the following settings to the config.ini file of the server.
+
 
+
#Message Queue
+
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#host=
+
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#user=
+
org.eclipse.scout.rt.server.rabbitmq.RabbitMQMessageService#password=
+
 
+
=== ActiveMQ ===
+
 
+
On the marketplace there is a service available for [http://activemq.apache.org/| ActiveMQ].
+
 
+
'''Update Targetplatform'''
+
 
+
Add the feature to your target file:
+
 
+
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
+
<unit id="org.eclipse.scout.rt.server.activemq.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.activemq
+
com.bsiag.org.apache.activemq.all
+
 
+
'''Update Configuration'''
+
Add the following settings to the config.ini file of the server.
+
 
+
#Message Queue
+
org.eclipse.scout.rt.server.activemq.ActiveMQMessageService#host=
+
org.eclipse.scout.rt.server.activemq.ActiveMQMessageService#user=
+
org.eclipse.scout.rt.server.activemq.ActiveMQMessageService#password=
+
 
+
== Cache Services ==
+
A cache service can be used to synchronize the ServerSession and other shared state on the scout server side.
+
 
+
=== Memcached ===
+
On the marketplace there is a service available using [https://code.google.com/p/spymemcached/| spymemcached]  to connect to a memcached cache.
+
 
+
'''Update Targetplatform'''
+
 
+
Add the memcached feature to your target file:
+
 
+
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
+
<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===
+
On the marketplace there is a service available using [http://redis.io/| Redis] to connect to a redis cache.
+
 
+
'''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