Configuring cloud-controller.xml
Sample configurations
<cloudController xmlns:svns="http://org.wso2.securevault/configuration"> <svns:secureVault provider="org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler" /> <dataPublisher enable="false"> <!-- BAM Server Info - default values are 'admin' and 'admin' Optional element. --> <bamServer> <!-- BAM server URL should be specified in carbon.xml --> <adminUserName>admin</adminUserName> <adminPassword svns:secretAlias="cloud.controller.bam.server.admin.password">admin</adminPassword> </bamServer> <!-- Default cron expression is '1 * * * * ? *' meaning 'first second of every minute'. Optional element. --> <cron>1 * * * * ? *</cron> <!-- Cassandra cluster related info --> <!--cassandraInfo> <connectionUrl>localhost:9160</connectionUrl> <userName>admin</userName> <password svns:secretAlias="cloud.controller.cassandra.server.password">admin</password> </cassandraInfo--> </dataPublisher> <topologySync enable="true"> <property name="cron" value="1 * * * * ? *" /> </topologySync> <!-- Specify the properties that are common to an IaaS here. This element is not necessary [0..1]. But you can use this section to avoid specifying same property over and over again. --> <iaasProviders> <EC2_PROVIDER_STARTiaasProvider type="ec2" name="ec2 specific details"> <className>org.apache.stratos.cloud.controller.iaases.AWSEC2Iaas</className> <provider>aws-ec2</provider> <identity svns:secretAlias="cloud.controller.ec2.identity">EC2_IDENTITY</identity> <credential svns:secretAlias="cloud.controller.ec2.credential">EC2_CREDENTIAL</credential> <property name="jclouds.ec2.ami-query" value="owner-id=EC2_OWNER_ID;state=available;image-type=machine"/> <property name="availabilityZone" value="EC2_AVAILABILITY_ZONE"/> <property name="securityGroups" value="EC2_SECURITY_GROUPS"/> <property name="autoAssignIp" value="true" /> <property name="keyPair" value="EC2_KEYPAIR"/> </iaasProviderEC2_PROVIDER_END> <OPENSTACK_PROVIDER_STARTiaasProvider type="openstack" name="openstack specific details"> <className>org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas</className> <provider>openstack-nova</provider> <identity svns:secretAlias="cloud.controller.openstack.identity">OPENSTACK_IDENTITY</identity> <credential svns:secretAlias="cloud.controller.openstack.credential">OPENSTACK_CREDENTIAL</credential> <property name="jclouds.endpoint" value="OPENSTACK_ENDPOINT" /> <property name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/> <property name="jclouds.api-version" value="2.0/" /> <property name="X" value="x" /> <property name="Y" value="y" /> </iaasProviderOPENSTACK_PROVIDER_END> <VCLOUD_PROVIDER_STARTiaasProvider type="vcloud" name="VMware vCloud specific details"> <className>org.apache.stratos.cloud.controller.iaases.VCloudIaas</className> <provider>vcloud</provider> <identity svns:secretAlias="cloud.controller.vcloud.identity">VCLOUD_IDENTITY</identity> <credential svns:secretAlias="cloud.controller.vcloud.credential">VCLOUD_CREDENTIAL</credential> <property name="jclouds.endpoint" value="VCLOUD_ENDPOINT" /> <property name="jclouds.vcloud.version.schema" value="1.5" /> <property name="jclouds.api-version" value="1.5" /> <property name="autoAssignIp" value="true" /> <property name="X" value="x" /> <property name="Y" value="y" /> </iaasProviderVCLOUD_PROVIDER_END> </iaasProviders> </cloudController>
Element definitions
The following are the configurations in the cloud-controller.xml
file.
BAM server
The Cloud Controller will connect to the BAM server to publish data. Therefore, the connection information related to the BAM server needs to be specified. The BAM server URL should be specified in the carbon.xml file.
XML Element | Description | Default Value | Mandatory/ Optional |
---|---|---|---|
<adminUserName> | The admin's username to connect to the BAM server. | admin | Optional |
<adminPassword> | The admin's password to connect to the BAM server. | admin | Optional |
Data publisher cron
XML Element | Description | Default Value | Mandatory/ Optional |
---|---|---|---|
<cron> | This defines how often the cron job is scheduled for the data publisher. | 1 * * * * ? * The above value meaning 'first second of every minute' | Optional |
Cassandra information
The Cloud Controller will connect to the Cassandra server for data retrieval. Therefore, the Cassandra server related information needs to be specified.
XML Element | Description | Default Value | Mandatory/ Optional |
---|---|---|---|
<connectionUrl> | Cassandra endpoint URL. | N/A | Optional |
<userName> | Username used to connect to Cassandra. | N/A | Optional |
<password> | Password used to connect to Cassandra. | N/A | Optional |
Topology synchronization
XML Element | Attribute | Description | Default Value | Mandatory/ Optional |
---|---|---|---|---|
<topologySync> | enable | This is used to enable and disable topology synchronization. If topologySync is enabled the topology will get updated periodically. | true | Mandatory |
| name value | This configuration can be used to specify topology synchronization related properties. For more information, see the section below. | N/A | N/A |
Topology synchronization related properties
Property Attribute Name | Possible Property Values | Description | Mandatory/ Optional |
---|---|---|---|
cron | 1 * * * * ? * The above value meaning 'first second of every minute' | Used to specify property names. | Mandatory only if topologySync is enabled. |
IaaS providers
Properties that are common to the various IaaS being used can be specified. This section is not mandatory to maintain. However, it can be used to avoid repeatedly specifying the same property.
XML Element | Attribute | Description | Default Value | Mandatory/ Optional | |
---|---|---|---|---|---|
IaaS | Value | ||||
| type | Type of IaaS provider. | EC2 | ec2 | Optional |
OpenStack | openstack | Optional | |||
vCloud | vcloud | Optional | |||
name | Summarized description of the IaaS provider. | All IaaS | N/A | Optional | |
| The class name of the IaaS implementation. | EC2 | org.apache.stratos.cloud.controller.iaases.AWSEC2Iaas | Mandatory | |
OpenStack | org.apache.stratos.cloud.controller.iaases.OpenstackNovaIaas | Mandatory | |||
vCloud | org.apache.stratos.cloud.controller.iaases.VCloudIaas | Mandatory | |||
<provider> | The IaaS provider's name. | All IaaS | N/A | Mandatory | |
<identity> | IaaS provider's identity number. | All IaaS | N/A | Mandatory | |
<credential> | IaaS provider's credentials. | All IaaS | N/A | Mandatory | |
<property> | name value | This configuration can be used to specify IaaS provider related properties. For more information, see the section below. | All IaaS | N/A | Optional |
IaaS specific properties
IaaS level properties
These properties can not be overridden by the cartridge definition.
Property Attribute Name | Relevant IaaS | Description | Default Value | Example Value | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | X | X | The AWS owner ID of the account. | N/A | 537938826222 | ||||||
| X | √ | √ | The endpoint of the IaaS. jclouds will communicate with the IaaS through this endpoint. The
| N/A | OpenStack http://puppet.test.org:5000/v2.0 vCloud
| ||||||
| X | √ | X | This is a flag to indicate that when a node is spawned, a floating IP should be automatically set, and removed when the instance is terminated. | false | false, true | ||||||
| X | √ | √ | The API version of jclouds.The API version will vary based on the IaaS. | OpenStack 2.0 vClouds 1.5 | 2.0, 1.5 | ||||||
| X | X | √ | The schema version of vCloud. | 1.5 | 1.5 |
Cartridge level properties
The following properties will be applicable to all cartridges. However, if you want to use different properties per cartridge or want to use a different property for a specific cartridge, you can override the cloud controller cartridge level properties by the IaaS provider properties that are defined in the cartridge definition. This will enable cartridges to be customized based on various factors.
Property Name | Relevant IaaS | Description | Default Value | Example Values | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
associatePublicIpAddress | √ | X | X | When using virtual private cloud (VPC) this property needs to be assigned to true, so that your cartridge instance will be assigned a public IP. | true | true, false | ||||||
autoAssignIp | √ | √ | √ | This is used to determine whether your cartridge will be assigned a public IP or private IP. If this property, is true a public IP will be assigned to your cartridge. If this property is false the IP will be assigned manually. | true | true, false | ||||||
availabilityZone | √ | √ | X | The name of the availability zone. I f you are using more than one partition, define the availability zone only in the cartridge definition and make sure not to define the availability zone in the cloud-controller.xml. This will enable the Autoscaler to dynamically select availability zone based on the partition. | N/A | ap-southeast-1a | ||||||
blockUntilRunning | X | √ | X | This will determine whether or not the instance spawning call to the IaaS will be blocked, in order to retrieve IP addresses. If you wish to auto assign IPs, the instance spawning call should be blocking, but if you wish to assign IPs manually, it can be non-blocking. | false | true, false | ||||||
defaultFloatingIpPool | X | √ | X | If the floating IPs have not been pre-allocated for the respective tenant, when launching a cartridge, the floating IP allocation will fail. This property is used to specify the name of the floating IP pool that needs to be used. | N/A | PublicPool1 | ||||||
| √ | √ | X | The type of instance that determines the instance size, which needs to be used. In OpenStack this is referred to as flavor. The instance type value needs to be specified differently based on the IaaS.
| N/A | EC2 m1.small OpenStack RegionOne/2 | ||||||
keyPair | √ | √ | X | The name of the private key that corresponds to the key pair used to connect to the instance. | N/A | apache-stratos-key1 | ||||||
securityGroupIds | √ | √ | X | When defining a security group in a VPC scenario, this property should be used instead of the securityGroups property. | N/A | sg-c999f7a6 | ||||||
securityGroups | √ | √ | X | The name of the security group that is used to define the IP filter rules for the instance. | N/A | sg-c999f7a6 | ||||||
shellType | X | X | √ | The type of shell scripting language being used in the cartridge. This property is used to identify the correct customization script to use when passing the payload to the cartridge. | N/A | bash, sh, cmd | ||||||
subnetId | √ | X | X | ID used to identify the virtual private cloud (VPC). For more information, go to Amazon VPC. | N/A | subnet-3b8a7d2g | ||||||
tag | √ | X | X | A tag is a name value pair used to filter instances. For more information, go to Using Tags. | N/A | a | ||||||
tags | √ | X | X | Defines the names of multiple tags. For example: <property name="tags" value="a,b,c,d" /> | N/A | a,b,c,d |