Cloud Application Deployment Configuration File

Search CCF4XAP
Searching Cloud Computing Framework for XAP
Browse CCF4XAP

                                                              

Overview

The Deployment Configuration xml file is build of two main sections: one is the root element <cloud-config> and the second <machines> which is part of <cloud-config>.
The <cloud-config> contains the global elements that are common to all of the machines, The <machines> Element contains individual machine profiles.

The raw-machine elements can be used with gsm-machine , gsc-machine , load-balancer-machine and database-machine machine types.

The Cloud Application Deployment Configuration file supports the following elements:

If an optional Element does not exists within the deployment file, the default value that exists within the Parent Config file will be used.

Deployment XML Example

machines Element

The deployment configuration support several "machine Profiles":

Each machine can have its own properties such as AMI type , files to transfer etc.
See below example for the <machines> section you can declare as part of the cloud configuration file:

The <machines> Element
<cloud-config>
	<machines>
		<load-balancer-machine>
			<name>HTTP_LOAD_BLANACER</name>
			<number-of-machines>1</number-of-machines>
		</load-balancer-machine>
	
		<gsm-machine>
			<name>GSM_MACHINE</name>
			<number-of-machines>1</number-of-machines>
			<gsm-per-machine>1</gsm-per-machine>
		</gsm-machine>
	
		<gsc-machine>
			<name>GSC_HIGH_CPU</name>
			<number-of-machines>1</number-of-machines>
			<gsc-per-machine>1</gsc-per-machine>
			<ami-id>ami-6c648005</ami-id>
			<ami-type>High-CPU Medium</ami-type>
		</gsc-machine>
	</machines>
</cloud-config>

Cloud name

The name of the application. You can run several applications on the same repository-name using only different <cloud-name>.
Don't put white spaces in the <cloud-name>.

Repository-name

The repository-name Rules should follow these rules:

  • No forward slash or backslash.
  • Only lowercase letters, numbers, periods(.) and dashes(-) .
  • Must start with a number or letter.
  • Must be between 3 and 255 characters long.
  • Cannot be in IP address style (e.g. "192.168.5.4").
  • Should not contain an underscore (_).
  • Should not end with a dash.
  • Should not have dashes appear next to periods. For example, "my-.repository" is an invalid name.
    The <repository-name> is actualy an S3 bucket name which is dedicated for running applications on your AWS account, It is possible that a bucket name will already be used by another user, In that case an error will appear and you will need to choose a different name for runing your applications.
    When running from the web console the <repository-name> is automatically picked from the gigaspaces license you provide.

Alternative S3 Directory and the $CPD place holder.

The <alternate-s3-source-dir> element contians the S3 path of your application files and determines the value of the $CPD place holder.
If the <alternate-s3-source-dir> element is not defined, the $CPD value will be the current deployment xml file directory.
The $CPD can be used in any path value like <transfer-files>, <processing-units>, <parent-config-filename>, <script-source>.

AMI Type and AMI ID

Determines the Amazon Image and type that will used to run our machine.
Example:

Machine <ami-type> and <ami-id> Elements
<ami-type>small</ami-type>
<ami-id>ami-91db3cf8</ami-id>

AMI ID Available

US:

Cloud Tools Version ->
Platform
2.3.4 2.3.5 2.3.6 paid AMI 2.3.7 paid AMI
32-bit Debian ami-f6ab4c9f ami-57c6213e ami-91db3cf8 ami-91db3cf8
64-bit Debian ami-3abe5953 ami-3abe5953 ami-7822c511 ami-652cca0c
Load Balancer ami-dd11f5b4 ami-3abe5953 or ami-57c6213e ami-7822c511 ami-91db3cf8 or ami-652cca0c

EU:

Cloud Tools Version ->
Platform
2.3.7 paid AMI
32-bit Obuntu ami-be9db5ca
64-bit Obuntu ami-bc9db5c8
Load Balancer ami-be9db5ca or ami-bc9db5c8

AMI Types Available

You can choose between Small,High-CPU Medium,Large,Extra Large and High-CPU Extra Large AMI types.

The AMI type and AMI ID must have matching platforms.

Instances Types

Here are the supported instances types:

Type RAM Size Compute Unit Compute Unit Definition Storage Size Platform Default
Small 1.7 GB 1 EC2 1 virtual core with 1 EC2 Compute Unit 160 GB 32-bit Default
Large 7.5 GB 4 EC2 2 virtual cores with 2 EC2 Compute Units 850 GB 64-bit  
Extra Large 15 GB 8 EC2 4 virtual cores with 2 EC2 Compute Units 1690 GB 64-bit  
High-CPU Medium 1.7 GB 5 EC2 2 virtual cores with 2.5 EC2 Compute Units 350 GB 32-bit  
High-CPU Extra Large 7 GB 20 EC2 8 virtual cores with 2.5 EC2 Compute Units 1690 GB 64-bit  
  • The Small, Large and Extra Large are well suited for most applications.
  • The High-CPU Medium and the High-CPU Extra Large have proportionally more CPU resources than memory (RAM) and are well suited for compute-intensive applications.

See Amazon Available Instance Types for more details.
Price Details for the various AMI Types can be found at GigaSpaces AMI types pricing page.

Region

New In Cloud Tools 2.3.7.5
See Amazon Regions and Availability Zones. Available regions are:

  • us-east-1
  • eu-west-1

Region us-west-1 is currently not supported.

Availability Zone

See Amazon Regions and Availability Zones. Available zone values are:

  • us-east-1a
  • us-east-1b
  • us-east-1c
  • us-east-1d
  • eu-west-1a
  • eu-west-1b

Default zone is us-east-1a.

New In Cloud Tools 2.3.7: eu-west-1a and eu-west-1b availability Zones.
Since version 2.3.7.5 the zone is optional, but if specified it must match the specified region.

GigaSpaces Zone

New In Cloud Tools 2.3.7
By default the GigaSpaces zone that is assigned to any GSC machine started on the cloud is the GSC machine name provided as part of the deployment descriptor. This name can be used to provision a specific processing unit instance(s) into a specific GSC machine profile instances. You should use the zones options as part of the deployment options to instruct the GSM to provision the deployed PU into the relevant GSC associated with the relevant zone.

Security-Groups

Amazon's EC2 cloud has a built-in firewall capability that is easy to setup. It is based on the concept of security groups . A security group is simply a group of access rules that apply to any instance which is a member of that group. These rules specify what machines are allow to connect to members of that group. A typical real world example would be a "database" group that needs to allow access to the "web" group. The "web" group needs to allow access to the public internet on port 80.
The application configuration file includes the <security-groups> Element allowing you to specify the pre-defined security-groups to be used when running the machine.
Here is how you should specify the security group to be used when deploying your application:

<security-groups>mysecurity-group,second-group</security-groups>

Amazon EC2 Security Groups used for running the AMI secured, to define more than one security group seperate them by comma,
If no Security-Groups are specified, the machine instance is assigned to the default group. By default, this group allows all network traffic from other members of this group and discards traffic from other IP addresses and groups. If this does not meet your needs, you can modify the rule settings of the default group.

See the Securing the Application on the Cloud for more details about security considerations.

Parent Config

Every Deployment file can include the <parent-config-filename> Element which enables reuse of deployment descriptor files, by including it all of the <parent-config-filename> elements are automatically included in the current deployment.

The <parent-config-filename> default value is:

<parent-config-filename>$CPD/../../default-settings/cloud-config.xml</parent-config-filename>

The cloud-config.xml includes the deployment defaults.

The <parent-config-filename> is an optional Element

GigaSpaces Release Handling

The GigaSpaces EC2 AMI support multiple GigaSpaces releases. You may specify the exact version you would like to use as part of the deployment file. Use the <gigaspaces-build-location> element to include the build location to be downloaded into the AMI once started:

<cloud-config>
	<cloud-name>my-data-grid-7.0</cloud-name>
	<gigaspaces-build-location>gigaspacesversions/gigaspaces-xap-premium-7.0.0-ga-b3500-sigar.zip</gigaspaces-build-location>
	<license>Jun 13, 2009~Cloud_GigaSpaces@XXXXXXXXXXXXX#PREMIUM^7.0XAPPremium%UNBOUND+UNLIMITED</license>
</cloud-config>
The <gigaspaces-version-id> tag is not supported with CCF 2.2.6. <gigaspaces-build-location> should be used instead.

Available GigaSpaces releases:

XAP Release gigaspaces-build-location
XAP 6.6.3 gigaspacesversions/gigaspaces-xap-premium-6.6.3-ga-b3210.zip
XAP 7.0.0.GA gigaspacesversions/gigaspaces-xap-premium-7.0.0-ga-b3500-sigar.zip

The <gigaspaces-version-id> should be a S3 path to a valid GiagSpaces build zip file. If you have a special build you may place it on S3 and place its location.

Cloud Tools Version

The cloud-tools-build-location specifies the GigaSpaces Cloud Tools build to use. This is the cloud tools version that will be loaded into the machines while started to perform dynamic scaling or any other cloud related activities.
If the application descriptor does not specify a cloud-tools-build-location , a default one will be used.

Available Cloud Tools releases:

Cloud Tools Release cloud-tools-build-location on S3
2.3.5 gigaspacesversions/gigaspaces-cloudtools-2.3.5.zip
2.3.6 gigaspacesversions/gigaspaces-cloudtools-2.3.6.zip
2.3.6.1 gigaspacesversions/gigaspaces-cloudtools-2.3.6.1.zip
2.3.6.2 gigaspacesversions/gigaspaces-cloudtools-2.3.6.2.zip
2.3.7 gigaspacesversions/gigaspaces-cloudtools-2.3.7.zip
2.3.7.5 gigaspacesversions/gigaspaces-cloudtools-2.3.7.5.zip

Elastic IP Address

Each Machine can be assigned with a specific Elastic IP Addresses. See below example:
Use the Amazon command line, ElasticFox or Amazon Console to allocate a new elastic (static) IP Address.
Place the IP address as part of the <elastic-ip> as demonstrated below.

The <load-balancer-machine> Element with <elastic-ip>
<cloud-config>
	<machines>
		<load-balancer-machine>
			<name>load balancer</name>
			<number-of-machines>2</number-of-machines>
		   	<elastic-ip>75.101.167.75</elastic-ip>
		   	<elastic-ip>75.101.167.76</elastic-ip>
		</load-balancer-machine>
	</machines>
</cloud-config>

Once you will deploy your application, the started machine will have the given IP address assigned.

Machine Password

To fully secure the application deployment on the cloud you may use the <machine-password> element. Once this Element is set it controls the following:

  • NX Server access password
  • gsadmin user login password
  • root user password
When having the Load-Balancer machine running in secured mode the Apache HTTP pass-phrase is 1234. You may change this with your deployment. When running in secured mode a client accessing the machines may use HTTPS secured protocol mode.

See below example for the <machine-password> Element:

<cloud-config>
	<cloud-name>myApplication</cloud-name>
	....
    <machine-password>machine-password</machine-password>
</cloud-config>

Key-pair name

The Name of the key-pair that will be used when launching a new instance, if it is a new name then a new key-pair will be created automatically.
All instances that are created from images that use this key pair will have access to the associated public key at boot.
You can use this key to provide secure access to an instance of an image on a per-instance basis. This feature is used to provide secure access without passwords.

Files Transfer

Used for transferring files from the local computer or from S3 to the running machines.
You may transfer a none-zipped file (use the <source> Element) or a zipped file (use the <source-zipped> Element) that will be unzipped at a specified location.
Example:

The <transfer-files> Element
<transfer-files>
		<file>
			<source>$CPD/scripts/gsc-init.sh</source>
			<target>gsc-init.sh</target>
		</file>
		<file>
			<source-zipped>$CPD/MyTest.zip</source-zipped>	
			<target>opt/gigaspaces</target>
		</file>
	</transfer-files>
$CPD
If <alternate-s3-source-dir> element is defined as part of the deployment config then the files will be downloaded from S3 into the machine started where the $CPD will be replaced by <alternate-s3-source-dir> value. Otherwise files will be copied from the local machine file system into the machine where the $CPD will be representing the deployment config current file path.

The Initialization Scripts Files

The cloud deployment process allows you to run your commands before and after running the GSC, GSM or the cloud desktop.
You may call your commands via the relevant scripts.
The initialization scripts are located by default at \cloudtools\default-settings\scripts.
These are placed into S3 as part of the deployment process, and used with the started machine.

Here are the provided scripts:

  • gsc-init.sh – this script is called before starting the GSC
  • gsm-init.sh – this script is called before starting the GSM
  • ui-init.sh – this script is called before starting the UI
  • gsc-post-init.sh – this script is called after starting the GSC
  • gsm-post-init.sh – this script is called after starting the GSM before waiting for GSCs
  • gsm-deploy-pre.sh – this script is called after starting the GSM after waiting for GSCs and before deploying PUs.
  • gsm-deploy-post.sh – this script is called after starting the GSM after waiting for GSCs and after deploying PUs.
  • server-init.sh – this script is launched when the machine is started
  • desktop-init.sh – this script is called when the cloud desktop is started
    Use your own Initialization files

    You can override those scripts and use your own scripts by naming your target file name as one of this names in transfer-files Element.

gsc-init Example

Here is an example how you can change the GSC Xmx and Xms settings when running on the cloud.
Have a file named gsc-init.sh to incldue the following:

export EXT_JAVA_OPTIONS="-Xmx1024m -Xms1024m -Dcom.gs.multicast.enabled=false"

Place the gsc-init.sh on the application repository at S3 (in out case at the myapplication bucket).
Add into the Application deployment file the following:

<cloud-config>
	<cloud-name>myapplication</cloud-name>
....
	<processing-units>
....
	</processing-units>
	<transfer-files>
		<file>
	  		<source>$CPD/gsc-init.sh</source>
	  		<target>gsc-init.sh</target>
	 		</file>
	</transfer-files>
</cloud-config>

Prior starting the the GSC , the gsc-init.sh will be called, setting the EXT_JAVA_OPTIONS variable.
This will be used with the setenv.sh script called before starting the GSC (using the gsc.sh script).

UI Machine.

The <start-ui> element Defines if to start a machine dedicated for admin, and how to display the admin UI, Options are:

  • admin-application/true - Starts the GigaSpaces Management Center, running in the cloud, without displaying the cloud desktop.
  • false - Does not start the GigaSpaces Management Center.
  • admin-desktop - Starts the web-based cloud desktop. Does not start the GigaSpaces Management Center.
  • instance-only - Starts an AMI instance with the NX server running. Does not start the web-based cloud desktop.

Dynamic Provisioning Agent (DPA)

The DPA allows you to configure your deployment to start a new virtual machine once an SLA event triggered and scale your application dynamically or allow it to self-heal itself. SLA event could be a result of a provisioning failure event or any other type of provisioning event. The DPA getting provisioning events from the GSM and calls the cloud provider API to start new GSC machines. Once these new GSCs identified by the GSM, it provision missing application instances (web application,spaces , services) into these newly started GSCs.

How to enable the Dynamic Provisioning agent?

The DPA includes the following parameters in the root [cloud-config]:

  • <scaling-machine-name> - Machine name to scale - This should be a machine name you specified as part of your deployment machine names.
  • <number-of-machines-for-scaling> - The Scalability increment ratio - Amount of machines to start once the Dynamic scalability agent is triggered. Value 0 (ZERO) would not trigger the DPA.

The amount of GSCs that will be started on each is machine is based on the <gsc-per-machine> value.
The DPA is started on the machine running the GSM.

See the Scale Web Application Dynamically for details how to use the PDA.

Cloud Configuration Examples

For more information about the <deploy-options>, see the puDeploy.

Labels

 
(None)