[Carbon-commits] [Carbon] svn commit r108802 - in branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf: . synapse-configs/default/sequences
azeez at wso2.com
azeez at wso2.com
Fri Jul 1 09:31:47 EDT 2011
Author: azeez
Date: Fri Jul 1 06:31:47 2011
New Revision: 108802
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=108802
Log:
Added new config. Now we can configure the ServiceDynamicLoadBalanceEndpoint, Autoscale mediators & autoscale task, all using a single config file; lbservices.xml.
Added:
branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/lbservices.xml
Modified:
branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/synapse-configs/default/sequences/main.xml
Added: branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/lbservices.xml
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/lbservices.xml?pathrev=108802
==============================================================================
--- (empty file)
+++ branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/lbservices.xml Fri Jul 1 06:31:47 2011
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. licenses this file to you under the Apache License,
+ ~ Version 2.0 (the "License"); you may not use this file except
+ ~ in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!--
+ Stratos services which have to be load balanced
+-->
+<loadBalancerConfig xmlns="http://ws.apache.org/ns/synapse">
+ <!--
+ The private key for ec2
+ -->
+ <property name="ec2PrivateKey" value="/mnt/payload/pk.pem"/>
+
+ <!--
+ The certificate for ec2
+ -->
+ <property name="ec2Cert" value="/mnt/payload/cert.pem"/>
+ <!--
+ The key pair
+ -->
+ <property name="sshKey" value="stratos-1.0.0-keypair"/>
+
+ <loadBalancer>
+ <property name="securityGroup" value="stratos-appserver-lb"/>
+ <property name="instanceType" value="m1.large"/>
+ <property name="instances" value="1"/>
+ <property name="elasticIP" value="${ELASTIC_IP}"/>
+ <property name="availabilityZone" value="us-east-1c"/>
+ <property name="payload" value="/mnt/payload.zip"/>
+ </loadBalancer>
+
+ <services>
+ <defaults>
+ <property name="payload" value="resources/cluster_node.zip"/>
+ <property name="availabilityZone" value="us-east-1c"/>
+ <property name="securityGroup" value="default-2011-02-23"/>
+ <property name="instanceType" value="m1.large"/>
+ <property name="minAppInstances" value="1"/>
+ <property name="maxAppInstances" value="5"/>
+ <property name="queueLengthPerNode" value="400"/>
+ <property name="roundsToAverage" value="10"/>
+ <property name="instancesPerScaleUp" value="1"/>
+ <property name="messageExpiryTime" value="60000"/>
+ </defaults>
+ <service>
+ <hosts>
+ <host>cloud-test.wso2.com</host>
+ </hosts>
+ <domain>wso2.manager.domain</domain>
+ </service>
+ <service>
+ <hosts>
+ <host>appserver.cloud-test.wso2.com</host>
+ <host>as.cloud-test.wso2.com</host>
+ </hosts>
+ <domain>wso2.as.domain</domain>
+
+ <property name="payload" value="resources/cluster_node.zip"/>
+ <property name="availabilityZone" value="us-east-1c"/>
+ </service>
+ <service>
+ <hosts>
+ <host>esb.cloud-test.wso2.com</host>
+ </hosts>
+ <domain>wso2.esb.domain</domain>
+
+ <property name="payload" value="resources/cluster_node.zip"/>
+ <property name="minAppInstances" value="1"/>
+ <property name="maxAppInstances" value="5"/>
+ <property name="queueLengthPerNode" value="400"/>
+ <property name="roundsToAverage" value="10"/>
+ <property name="instancesPerScaleUp" value="1"/>
+ <property name="availabilityZone" value="us-east-1c"/>
+ <property name="securityGroup" value="ds-2011-02-23"/>
+ </service>
+ <service>
+ <hosts>
+ <host>governance.cloud-test.wso2.com</host>
+ </hosts>
+ <domain>wso2.governance.domain</domain>
+ </service>
+ <service>
+ <hosts>
+ <host>identity.cloud-test.wso2.com</host>
+ </hosts>
+ <domain>wso2.is.domain</domain>
+ </service>
+ </services>
+</loadBalancerConfig>
\ No newline at end of file
Modified: branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/synapse-configs/default/sequences/main.xml
URL: http://wso2.org/svn/browse/wso2/branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/synapse-configs/default/sequences/main.xml?rev=108802&r1=108801&r2=108802&view=diff
==============================================================================
--- branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/synapse-configs/default/sequences/main.xml (original)
+++ branches/carbon/3.2.0/products/lb/1.0.1/modules/distribution/product/src/main/conf/synapse-configs/default/sequences/main.xml Fri Jul 1 06:31:47 2011
@@ -23,6 +23,11 @@
<in>
<property name="SERVICE_PREFIX" expression="$axis2:SERVICE_PREFIX"/>
+ <!--
+ The LB services are declared in the lbservices.xml file. This file is used by both
+ the serviceDynamicLoadbalanceEndpoint & AutoscaleIn mediators
+ -->
+ <autoscaleIn configuration="file:repository/conf/lbservices.xml"/>
<send>
<endpoint name="sdlbEndpoint">
<session type="http">
@@ -30,47 +35,16 @@
<sessionTimeout>900000</sessionTimeout>
</session>
<serviceDynamicLoadbalance failover="true"
- algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
- <services>
- <service>
- <hosts>
- <host>cloud-test.wso2.com</host>
- </hosts>
- <domain>wso2.manager.domain</domain>
- </service>
- <service>
- <hosts>
- <host>appserver.cloud-test.wso2.com</host>
- <host>as.cloud-test.wso2.com</host>
- </hosts>
- <domain>wso2.as.domain</domain>
- </service>
- <service>
- <hosts>
- <host>esb.cloud-test.wso2.com</host>
- </hosts>
- <domain>wso2.esb.domain</domain>
- </service>
- <service>
- <hosts>
- <host>governance.cloud-test.wso2.com</host>
- </hosts>
- <domain>wso2.governance.domain</domain>
- </service>
- <service>
- <hosts>
- <host>identity.cloud-test.wso2.com</host>
- </hosts>
- <domain>wso2.is.domain</domain>
- </service>
- </services>
- </serviceDynamicLoadbalance>
+ algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"
+ configuration="file:repository/conf/lbservices.xml"/>
</endpoint>
</send>
<drop/>
</in>
<out>
+ <autoscaleOut/>
+
<!-- Handling status codes: 301, 302 Redirection -->
<filter source="$trp:Location" regex=".+">
<property name="LB_SP_Host" expression="$ctx:SERVICE_PREFIX"
More information about the Carbon-commits
mailing list