This is the WSO2 Elastic Load Balancer documentation version 2.0.3. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

Defining the IaaS Providers and their Properties

You can define information of IaaS providers, that may or not dependent on the different service clusters and their properties in the 'IaaS providers section' of the <ELB_HOME>/repository/conf/cloud-controller.xml file. This section can be commented out but it is the recommended and convenient method to define IaaS providers.

A sample configuration is shown below:

Described below are the elements of the configuration above.

<iaasProvider>
XML Syntax
<iaasProvider type="" name=""/>
DescriptionUsed to specify the properties that are common to IaaS. This section can be commented out but it is the recommended and convenient method to define IaaS providers.
Mandatory/OptionalOptional


AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/Optional
typeA unique name for the IaaS provider. Cannot have two IaaS providers with the same value for 'type' attributeStringNoneNoneMandatory
nameA description about the IaaS provider.StringNoneNoneOptional

<className>
XML Syntax
<className/>
DescriptionThe full qualified name of the IaaS provider implementation
TypeString
Default ValueNone
Fixed ValuesNone
Mandatory/OptionalMandatory

 <provider>
XML Syntax
<provider/>
Description

The relevant provider’s name as in http://www.jclouds.org/documentation/reference/supported-providers.

TypeString
Default ValueNone
Fixed ValuesNone
Mandatory/OptionalMandatory

 <identity>
XML Syntax
<identity svns:secretAlias=""/>
Description

Uses WSO2 Secure Vault functionality. If it is unable to find a value from secure vault at runtime, the plain-text value of these elements, if any, will be used.

Mandatory/OptionalOptional


AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/Optional
svns:secretAlias StringNoneNoneMandatory

<credential>
XML Syntax
<credential svns:secretAlias=""/>
Description

Uses WSO2 Secure Vault functionality. If it is unable to find a value from secure vault at runtime, the plain-text value of these elements, if any, will be used.

Mandatory/Optional Mandatory


AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/Optional
svns:secretAlias StringNoneNoneMandatory

<scaleUpOrder>
XML Syntax
<scaleUpOrder/>
DescriptionDetermines the order of selection of an IaaS when scaling up. We are giving a high priority for the IaaS which has a lesser positive integer, among all configured IaaSes. i.e. IaaS with scaleUpOrder 1 will get higher priority over an IaaS with scaleUpOrder 2.
TypeInteger
Default ValueNone
Fixed ValuesNone
Mandatory/OptionalMandatory

<scaleDownOrder>
XML Syntax
<scaleDownOrder/>
Description

Determines the order of selection of an IaaS when scaling down. We give high priority to the IaaS which has a smaller positive integer, among all configured IaaSes. i.e. IaaS with scaleDownOrder 1 will get higher priority over an IaaS with scaleDownOrder 2.

TypeInteger
Default ValueNone
Fixed ValuesNone
Mandatory/OptionalMandatory

<Property>
XML Syntax
<property name="" value=""/>
Description

Used o define key pair, security groups etc. Can have 0 to n number of 'property' elements.

Mandatory/OptionalOptional

<imageId>
XML Syntax
<scaleDownOrder/>
Description

Defines the id of an image created in this IaaS.

TypeString
Default ValueNone
Fixed ValuesNone
Mandatory/OptionalMandatory

Linking Service Topology with the Embedded Auto-Scaler

Let's investigate how to link the service topology with the embedded auto-scaler through an example. Assume that you want to scale an 'appserver' service, which may consist of multiple sub clusters. Factually, what you actually scale are those sub service clusters. The following diagram depicts the appserver service cluster topology.

You need to configure the embedded auto-scaler that is responsible for scaling the system so that it is aware of this service topology.

1) First, define appserver service topology using a cartridge definition of the embedded auto-scaler, and then add a reference to that cartridge definition from the embedded auto-scaler’s service definitions, which describe service clusters. This 'service definition' to 'cartridge definition' mapping is shown in the following figure.


2) Copy an XML file which defines your Cartridge, to <ELB_HOME>/repository/deployment/server/cartridges/ folder.

The Cartridge XML File

The Cartridge XML file should have a unique file name and adhere to any of the following two XML schemas.

  • Cartridge schema as defined in <ELB-HOME>/repository/conf/etc/cartridge.xsd file. You can define only one Cartridge in a file.
  • Cartridges schema as defined in <ELB-HOME>/repository/conf/etc/cartridges.xsd file. You can define multiple Cartridges in a single file.

Infor

Icon
There’s a limitation in XML 1.0 specification requiring adherence to the sequential order of the elements of these configuration files. This limitation is rectified in XML 1.1.

Shown below is a sample Cartridge XML file. Code comments in the file explain each element.

Note

Icon
The 'deployment' element is mandatory: <deployment baseDir=""/>

3. You now have the 'appserver' cartridge defined and deployed in ELB. Proceed to defining the service clusters. This can be done by simply copying an XML file which defines the service configuration to <ELB_HOME>/repository/deployment/server/services/ folder.

The Service XML File

The Service XML file should have a unique file name and adhere to any of the following two XML schemas.

  • Service schema as defined in <ELB-HOME>/repository/conf/etc/service.xsd file. You can define only one Service in a file.
  • Services schemaas defined in <ELB-HOME>/repository/conf/etc/services.xsd file. You can define multiple Services in a single file.

Infor

Icon
There’s a limitation in XML 1.0 specification requiring adherence to the sequential order of the elements of these configuration files. This limitation is rectified in XML 1.1.

Shown below is a sample XML file. Code comments in the file explain each element.

4. You have now configured ELB for auto-scaling.

  • No labels