Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

 

Stratos IaaS configuration file

The IaaS configuration files are in the cloud-controller.xml file and it is located in the repository/conf/ folder in the repository.

Stratos DevOps edits the cloud-controller.xml to configure IaaS. Please see Cloud Controller Configuration Files, for element definitions on the sub-sections in the following cloud-controller.xml file.

<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">
    	<!-- MB server info -->
        <mbServerUrl>MB_HOSTNAME:MB_LISTEN_PORT</mbServerUrl>
        <cron>1 * * * * ? *</cron>
    </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>
     		<iaasProvider type="ec2" name="ec2 specific details">
				<className>org.wso2.carbon.stratos.cloud.controller.iaases.AWSEC2Iaas</className>
    			<provider>aws-ec2</provider>
    			<identity svns:secretAlias="elastic.scaler.openstack.identity">EC2_IDENTITY</identity>
   				<credential svns:secretAlias="elastic.scaler.openstack.credential">EC2_CREDENTIAL</credential>
            	<scaleUpOrder>EC2_SCALEUP_ORDER</scaleUpOrder>
            	<scaleDownOrder>EC2_SCALEDOWN_ORDER</scaleDownOrder>
            	<property name="jclouds.ec2.ami-query" value="owner-id=XX-XX-XX;state=available;image-type=machine"/>
            	<property name="availabilityZone" value="EC2_AVAILABILITY_ZONE"/>
            	<property name="securityGroups" value="EC2_SECURITY_GROUPS"/>
            	<property name="instanceType" value="EC2_INSTANCE_TYPE"/>
            	<property name="keyPair" value="EC2_KEYPAIR"/>
            	<imageId>EC2_IMAGE_ID</imageId>
     		</iaasProvider>
	 		<iaasProvider type="openstack" name="openstack specific details">
				<className>org.wso2.carbon.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/" />
            	<scaleUpOrder>OPENSTACK_SCALEUP_ORDER</scaleUpOrder>
            	<scaleDownOrder>OPENSTACK_SCALEDOWN_ORDER</scaleDownOrder>
            	<property name="X" value="x" />
            	<property name="Y" value="y" />
            	<imageId>OPENSTACK_IMAGE_ID</imageId>
			</iaasProvider>
		</iaasProviders>

</cloudController>


Cartridge configuration files

There can be a single file or several files that the Cartridge Deployer creates for Cartridge configuration <cartridge>.xml, to capture metadata about the Cartridge including the image ID's. Please see Element Definitions, for element definitions on the following Cartridge XML file.

Example:
repository/deployment/server/cartridges/php.xml

<!-- Use below section to specify properties that are needed in order to start Cartridges.  -->
    <cartridges>

        <!-- You can have 1..n cartridge elements. -->
        <cartridge type="php" host="php.STRATOS_DOMAIN" provider="zend-provider" version="5.5" multiTenant="false">
			<!--  cartridge element can have 0..n properties, and they'll be overwritten by the properties specified under iaasProvider child elements of cartridge element. -->

            <displayName>PHP</displayName>
            <description>PHP Cartridge</description>

			<!-- A cartridge element should add a reference to an existing IaaS provider (specified in the above &lt;iaasProviders&gt; section) or it can create a completely new IaaS Provider (which should have a unique "type" attribute. -->

            <iaasProvider type="openstack" >
                <imageId>nova/3a4000c8-0973-421a-94f8-dbfe8b7b5250</imageId>
                <property name="keyPair" value="stratos-demo"/>
                <property name="instanceType" value="nova/1"/>
                <property name="securityGroups" value="default"/>
                <!--<property name="payload" value="resources/as.txt"/>-->
            </iaasProvider>

            <!--<iaasProvider type="ec2" >
                <imageId>us-east-1/ami-ef49e786</imageId>           
                <property name="keyPair" value="aa"/>
                <property name="securityGroups" value="default"/>
                <property name="instanceType" value="m1.large"/>
                <property name="payload" value="resources/as-ec2.txt"/>
            </iaasProvider>-->

            <deployment baseDir="/var/www">
                <dir>www=copy#app#files#here</dir>
                <dir>simplesamlphp=copy#saml#libraries#here</dir>
                <dir>sql=copy#saml#libraries#here</dir>
            </deployment>

           <portMapping>
               <http port="80" proxyPort="8280"/>
               <https port="443" proxyPort="8243"/>
           </portMapping>

            <!--<appTypes>
                <property name="axis2services" isBothmapping="false"/>
                <property name="webapps" isBothmapping="true"/>
                <property name="jaxwebapps" isBothmapping="true"/>
                <property name="jaggeryapps" isBothmapping="true"/>
            </appTypes>-->
        </cartridge>

    </cartridges>

In Carbon Cartridges, the Cartridge type should be the same as the value of the CartridgeAlias element in repository/conf/carbon.xml file.


Services configurations files

Service configurations can be a single file or several files. This file includes the domain, sub-domain and Cartridge type per service. Please see Element Definitions, for element definitions on the following service XML file.

Example:

repository/deployment/server/services/as.xml

<service domain="wso2.appserver.domain" subDomain="__$default" tenantRange="*">
       <cartridge type="appserver"/>
       <host>appserver.s2.wso2.com</host>
       <payload>/opt/wso2cc-1.0.0/repository/resources/payload/as-default.zip</payload>
</service>

In Carbon Cartridges, the Cartridge type should be the same as the value of the CartridgeAlias element in repository/conf/carbon.xml file.

 

  • No labels