CloudTran Home

 
  
 
Contents  >   7.  Deployment
 


7.8 GoGrid Deployment

 7.8.1  Modelling GoGrid Deployments
 7.8.2  Configuration Properties
 7.8.3  Deploying

7.8.1  Modelling GoGrid Deployments
If the 'target' of the deployment option is GoGrid then a sub-directory will be generated in
/deployments. The name of this sub-directory will be the name of the Deployment Option. For example if the Deployment Option is called 'GoGridTest' in the MultiTenancy example.

Then the directory structure for the deployment will be as follows.

As you can see there are a number of files, including properties files, ant build files and shell scripts. All of these files are generated, based on the deployment defined in model. For instance the GoGridTest_BusinessOrganisation.properties is the derived config properties for the Business Organisation Processing Unit.

The files are
build.xml                                   ant file that controls the deployment process (see details below).
deployScript_<app-name>_Machine.sh    deployment script - copied and run on one server, it deploys the application on Gigaspace
sunScript_<app-name>_Machine.sh       run script - copied to all servers and run

The build.xml is an ant file that controls the deployment process, including stopping and starting the servers and the application. In reality this calls to a class in the CloudTran.jar, which in turn uses JClouds to perform the deployment.


7.8.2  Configuration Properties
For the GoGrid deployment to work some additional properties are needed. This currently are the 'key' and 'sharedSecret'. They should be placed in the 'GoGridTest.properties'. This file has two parts - the first half is regenerated and the values are determined from the deployment option values. The second part of the file is not regenerated (all the values here are maintained) and this is where the 'key' and 'sharedSecret' value should go. Any additional properties that you wish to maintain for your deployment should be set in this section.
##
### This section is generated. Any changes made
### here will be overwritten in a rebuild
##
machine0.class=Medium
machine0.name=MediumMachines_0
machine1.class=Medium
machine1.name=MediumMachines_1
numOfMachinesReqd=2
### Anything below this line will not be overwritten
###
##
### The key and the sharedSecret need to be provided.
### The can be obtained from your GoGrid account
###
##
key=xxxxxxxx
sharedSecret=xxxxxxxx

7.8.3  Deploying
One of the generated artefacts of the deployment is an ant build.xml file. This ant script contains a number of targets. The main ones are
deployApp (default)  Deploys the application by copying and running the appropriate shell scripts to the running servers
stopApp              Kills the application on the servers but does not destroy the servers.
allocateMachines     Starts a new cluster of servers based on the deployment configuration
deallocateMachines   Destroys the running servers, even if the application is still running.
listMachines         Lists the allocated machines in the cluster.    
To run a particular target open a command box at the location of the ant script and type
ant <target>

Copyright (c) 2001-2011 CloudTran Inc.