|
Search CCF4XAP
Browse CCF4XAP
|
Summary: Package and Deploy your Web application on the cloud
OverviewPrior deploying your web application on the Cloud you should build your application and test it on your local environment. A good example for building such can be found as part of the quick start section. We will use the web application created with the quick start as an example when explaining the steps you need to perform when deploying your web application on the cloud.
Deployment TopologyThe Deployment will involve the following:
Here is the basic flow of the application:
Step 1 - Create your Application Cloud RepositoryThe Application Cloud Repository used to store the application libraries. <alternate-s3-source-dir>myapplicationfiles</alternate-s3-source-dir> Step 2 - Create your Application Deployment ConfigurationThe deployment process uses an XML-based configuration file that stores the deployment parameters. Here is the Web Application Cloud Configuration file you should create: <cloud-config> <cloud-name>plainwebapp</cloud-name> <alternate-s3-source-dir>plainwebapp-bucketname</alternate-s3-source-dir> <zone>us-east-1a</zone> <machines> <gsm-machine> <name>gsm</name> <number-of-machines>1</number-of-machines> <gsm-per-machine>1</gsm-per-machine> <processing-units> <processing-unit> <name>$CPD/PlainWebAppExample.war</name> <deploy-options/> </processing-unit> </processing-units> <web-app-url>PlainWebAppExample</web-app-url> </gsm-machine> <gsc-machine> <name>gsc</name> <number-of-machines>1</number-of-machines> <gsc-per-machine>1</gsc-per-machine> </gsc-machine> <load-balancer-machine> <name>load_balancer</name> <number-of-machines>1</number-of-machines> </load-balancer-machine> <ui-machine> <name>ui</name> <number-of-machines>1</number-of-machines> </ui-machine> </machines> </cloud-config>
The above example will deploy on the cloud a jar named PlainWebAppExample.war.
See the Cloud Application Deployment Configuration File for details about the supported options. Step 3 - Deploy your ApplicationYou can use the Cloud Web Console or the Cloud Tools Command Line Framework. With this example we will use the Cloud Web Console. This will will start GSM machine, GSC machine and Load-Balancer Machine and deploy the web application on the cloud.
Once the deployment process will be completed you will be able to access the web server running on the cloud.
Step 4 - Manage your ApplicationOne of the most useful tools to use in order to manage your application when running on the cloud is the GigaSpaces Management Center. The same tools you have been using to manage the application on your local environment can be used when running your application on the cloud. The only difference is that you should run in on the Cloud and not on your local environment. In order to run the GigaSpaces Management Center on the cloud click the Manage button. Step 5 - Shutdown your ApplicationOnce you are done, or in case you would like to terminate the machines running your application Click the Shutdown button. More things you can do...Start Multiple Web ServersThe following configuration will deploy 2 instances of the web application, each into different GSC, each running on different virtual machine. The load-balancer will rout incoming requests into these different web servers based on its load-balancing policy configuration. <machines> <gsm-machine> ... <processing-unit> <name>$CPD/PlainWebAppExample.war</name> <deploy-options>-cluster total_members=2 -max-instances-per-vm 1 -max-instances-per-machine 1 </deploy-options> </processing-unit> </machines> Scale your Web Application DynamicallyThe Scale Web Application Dynamically explains how to configure your web application to scale dynamically. |
Additional resources: XAP Application Server | XAP Data Grid | XAP for Cloud Computing | XAP J2EE Support

Here are the basic steps you should go through:

