You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/01/07 08:08:11 UTC

[20/42] creating Stratos Manager product

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/features-dashboard.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/features-dashboard.xml b/products/stratos-manager/conf/features-dashboard.xml
new file mode 100755
index 0000000..4b6887e
--- /dev/null
+++ b/products/stratos-manager/conf/features-dashboard.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<data>
+	<service name="Cloud Services" link="" key="manager">
+		<story title="Metering">
+			<story-content>Metering measures levels of resource utilization, such
+				as network bandwidth usage and
+				data storage volume, consumed by the
+				cloud services subscribers, aka
+				tenants.
+				Resource utilization's
+				(bandwidth and storage usage) are measured on the fly
+				and the
+				measured data is stored for summarizing and analyzing.
+			</story-content>
+			<story-links>
+				<link url="/carbon/tenant-usage/tenant_usage.jsp">Go to Metering....</link>
+				<link url="/carbon/tenant-usage/docs/userguide.html">Read more (docs)...</link>
+			</story-links>
+		</story>
+		<story title="Account Management">
+			<story-content>Account management allows a tenant to update and
+				validate contact information,
+				update the usage plan, validate the
+				account and even de-activate the
+				account.
+            </story-content>
+			<story-links>
+				<link url="/carbon/account-mgt/account_mgt.jsp">Manage Account...</link>
+				<link url="/carbon/account-mgt/docs/userguide.html">Read more (docs)...</link>
+			</story-links>
+		</story>
+		<story title="Users and Roles">
+			<story-content>You can add users and define your own roles for a
+				tenant. The permission model is
+				role based. So a tenant admin can
+				define what actions a role can perform
+				by
+				configuring permissions for
+				that role.</story-content>
+			<story-links>
+				<link url="/carbon/userstore/index.jsp">Manage users/roles...</link>
+				<link url="/carbon/userstore/docs/userguide.html">Read more (docs)...</link>
+			</story-links>
+		</story>
+	</service>
+	<service name="Stratos Controller" link="" key="sc">
+		<story title="Multi-Tenant Cartridges">
+			<story-content>Stratos Cartridges, hosting WSO2 multi-tenant middleware 
+				services delivers multi-tenancy within each Cartridge instance 
+				where teams may define multiple tenants per Cartridge.
+			</story-content>
+			<story-links>
+				<link url="/carbon/cartridge-mgt/available_cartridges.jsp?item=available_multitenant_cartridges">Available Multi-Tenant Cartridges</link>
+			</story-links>
+		</story>
+		<story title="Single-Tenant Cartridges">
+			<story-content>Stratos Cartridges provide process-level isolation and 
+				instance-level dedicated tenancy with single-tenant containers and frameworks.
+			</story-content>
+			<story-links>
+				<link url="/carbon/cartridge-mgt/available_cartridges.jsp?item=available_singletenant_cartridges">Available Single-Tenant Cartridges</link>
+			</story-links>
+		</story>
+		<story title="Subscribed Cartridges">
+			<story-content>The tenant user can see all details of the Subscribed Cartridges such as
+				the status and the number of running instances at the moment.
+			</story-content>
+			<story-links>
+				<link url="/carbon/cartridge-mgt/subscribed_cartridges.jsp">Subscribed Cartridges</link>
+			</story-links>
+		</story>
+	</service>
+</data>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/identity.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/identity.xml b/products/stratos-manager/conf/identity.xml
new file mode 100755
index 0000000..1a20f09
--- /dev/null
+++ b/products/stratos-manager/conf/identity.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
+
+	<OpenIDServerUrl>https://localhost:9443/openidserver</OpenIDServerUrl>
+
+	<OpenIDUserPattern>https://localhost:9443/openid/</OpenIDUserPattern>
+
+     <JDBCPersistenceManager>
+        <DataSource>
+        	<!-- Include a data source name (jndiConfigName) from the set of data sources defined in master-datasources.xml -->
+        	<Name>jdbc/WSO2CarbonDB</Name>
+    	</DataSource>
+		<!-- If the identity database is created from another place and if it is required to skip schema initialization during the server start up, set the following
+		 property to "true". -->
+		<!-- <SkipDBSchemaCreation>false</SkipDBSchemaCreation> -->
+    </JDBCPersistenceManager>
+
+	<!--
+      Security configurations
+    -->
+	<Security>
+		<UserTrustedRPStore>
+			<Location>${carbon.home}/repository/resources/security/userRP.jks</Location>
+			<!-- Keystore type (JKS/PKCS12 etc.)-->
+			<Type>JKS</Type>
+			<!-- Keystore password-->
+			<Password>wso2carbon</Password>
+			<!-- Private Key password-->
+			<KeyPassword>wso2carbon</KeyPassword>
+		</UserTrustedRPStore>
+
+		<!--
+			The directory under which all other KeyStore files will be stored
+		-->
+		<KeyStoresDir>${carbon.home}/conf/keystores</KeyStoresDir>
+	</Security>
+
+	<Identity>
+		<IssuerPolicy>SelfAndManaged</IssuerPolicy>
+		<TokenValidationPolicy>CertValidate</TokenValidationPolicy>
+		<BlackList></BlackList>
+		<WhiteList></WhiteList>
+		<System>
+			<KeyStore></KeyStore>
+			<StorePass></StorePass>
+		</System>
+	</Identity>
+
+	<OAuth>
+		<RequestTokenUrl>https://localhost:9443/oauth/request-token</RequestTokenUrl>
+		<AccessTokenUrl>https://localhost:9443/oauth/access-token</AccessTokenUrl>
+		<AuthorizeUrl>https://localhost:9443/oauth/authorize-url</AuthorizeUrl>
+		<!-- Default validity period for Authorization Code in seconds -->
+		<AuthorizationCodeDefaultValidityPeriod>300</AuthorizationCodeDefaultValidityPeriod>
+		<!-- Default validity period for Access Token in seconds -->
+		<AccessTokenDefaultValidityPeriod>3600</AccessTokenDefaultValidityPeriod>
+		<!-- Timestamp skew in seconds -->
+		<TimestampSkew>300</TimestampSkew>
+		<!-- Enable OAuth caching. This cache has the replication support. -->
+		<EnableOAuthCache>true</EnableOAuthCache>
+		<!-- Configure the security measures needs to be done prior to store the token in the database,
+		such as hashing, encrypting, etc.-->
+		<TokenPersistencePreprocessor>org.wso2.carbon.identity.oauth.preprocessor.PlainTextTokenPersistencePreprocessor</TokenPersistencePreprocessor>
+		<!-- Supported Response Types -->
+		<SupportedResponseTypes>token,code</SupportedResponseTypes>
+		<!-- Supported Grant Types -->
+		<SupportedGrantTypes>authorization_code,password,refresh_token,client_credentials</SupportedGrantTypes>
+		<OAuthCallbackHandlers>		
+				<OAuthCallbackHandler Class="org.wso2.carbon.identity.oauth.callback.DefaultCallbackHandler"/>
+		</OAuthCallbackHandlers>
+	</OAuth>
+
+	<MultifactorAuthentication>
+		<XMPPSettings>
+			<XMPPConfig>
+				<XMPPProvider>gtalk</XMPPProvider>
+				<XMPPServer>talk.google.com</XMPPServer>
+				<XMPPPort>5222</XMPPPort>
+				<XMPPExt>gmail.com</XMPPExt>
+				<XMPPUserName>multifactor1@gmail.com</XMPPUserName>
+				<XMPPPassword>wso2carbon</XMPPPassword>
+			</XMPPConfig>
+		</XMPPSettings>
+	</MultifactorAuthentication>
+
+    	<SSOService>
+    	    <IdentityProviderURL>https://localhost:9443/samlsso</IdentityProviderURL>
+    	</SSOService>
+</Server>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/jaas.conf
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/jaas.conf b/products/stratos-manager/conf/jaas.conf
new file mode 100644
index 0000000..b560cba
--- /dev/null
+++ b/products/stratos-manager/conf/jaas.conf
@@ -0,0 +1,30 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+Server {
+       org.apache.zookeeper.server.auth.DigestLoginModule required
+       user_super="admin"
+       user_admin="admin";
+};
+Client {
+       org.apache.zookeeper.server.auth.DigestLoginModule required
+       username="admin"
+       password="admin";
+};

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/jndi.properties
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/jndi.properties b/products/stratos-manager/conf/jndi.properties
new file mode 100644
index 0000000..425c2b7
--- /dev/null
+++ b/products/stratos-manager/conf/jndi.properties
@@ -0,0 +1,4 @@
+connectionfactoryName=topicConnectionfactory
+connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:5677'
+java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
+#java.naming.provider.url=repository/conf/jndi.properties

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/loadbalancer.conf
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/loadbalancer.conf b/products/stratos-manager/conf/loadbalancer.conf
new file mode 100644
index 0000000..e97eb77
--- /dev/null
+++ b/products/stratos-manager/conf/loadbalancer.conf
@@ -0,0 +1,49 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+services {
+    # default parameter values to be used in all services
+    defaults {
+        # minimum number of service instances required. WSO2 ELB will make sure that this much of instances
+        # are maintained in the system all the time, of course only when autoscaling is enabled.
+        min_app_instances       1;
+        # maximum number of service instances that will be load balanced by this ELB.
+        max_app_instances       5;
+        # you need to calibrate autoscaling parameters before start using. Please go through following blog post
+        # http://nirmalfdo.blogspot.com/2013/01/scale-up-early-scale-down-slowly.html
+        max_requests_per_second   5;
+        alarming_upper_rate 0.7;
+        alarming_lower_rate 0.2;
+        scale_down_factor 0.25;
+        rounds_to_average       2;
+        message_expiry_time     60000;
+    }
+    
+    identity {
+        hosts                   identity.aaaa.cloud-test.wso2.com;
+        domains   {
+            wso2.identity.aaaa.domain {
+                tenant_range    *;
+            }
+            
+        }
+    }
+    
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/metering-config-non-manager.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/metering-config-non-manager.xml b/products/stratos-manager/conf/metering-config-non-manager.xml
new file mode 100755
index 0000000..6f642a3
--- /dev/null
+++ b/products/stratos-manager/conf/metering-config-non-manager.xml
@@ -0,0 +1,104 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+<meteringConfig xmlns="http://wso2.com/carbon/multitenancy/metering/config">
+    <tasks>
+        <task service="org.apache.stratos.metering.agent.task.PerRegistryRequestTask">
+            <preHandlers>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoRetriever">
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.RegistryActionValidator">
+                </handler>
+            </preHandlers>
+            <postHandlers>
+                <handler service="org.apache.stratos.metering.agent.handlers.RemoteTaskInvoker"
+                        async="true" frequency="1"><!-- trigger per each request-->
+                    <parameter name="taskServiceUrl">https://localhost:9443/services/</parameter>
+                    <parameter name="userName">admin</parameter>
+                    <parameter name="password">admin</parameter>
+                    <parameter name="taskName">org.apache.stratos.metering.manager.task.PerRegistryRequestRemoteTask</parameter>
+                </handler>
+            </postHandlers>
+        </task>
+        <task service="org.apache.stratos.metering.agent.task.PerUserAddRequestTask">
+            <preHandlers>
+                <handler service="org.apache.stratos.metering.agent.handlers.RemoteTaskInvoker"
+                        async="false" frequency="1"><!-- trigger per each request-->
+                    <parameter name="taskServiceUrl">https://localhost:9443/services/</parameter>
+                    <parameter name="userName">admin</parameter>
+                    <parameter name="password">admin</parameter>
+                    <parameter name="taskName">org.apache.stratos.metering.manager.task.PerUserAddRequestRemoteTask</parameter>
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoRetriever">
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.AddUserActionValidator">
+                </handler>
+            </preHandlers>
+        </task>
+        <task service="org.apache.stratos.metering.manager.task.PerRegistryRequestRemoteTask">
+            <postHandlers>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoRetriever">
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.DBContentVolumeRetriever"><!-- trigger per each registry request-->
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.BandwidthDataRetriever" async="true" frequency="5"><!-- trigger per 5 registry request-->
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.BandwidthDataStorer">
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.BillingDataRetriever"><!-- trigger per each registry request-->
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.RuleInvoker">
+                    <parameter name="rule-file">restriction-rules.drl</parameter>
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoStorer">
+                </handler>
+            </postHandlers>
+        </task>
+        <task service="org.apache.stratos.metering.manager.task.PerUserAddRequestRemoteTask">
+            <postHandlers>
+                <handler service="org.apache.stratos.metering.manager.handlers.UsersCountRetriever"><!-- trigger per each user add request-->
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoRetriever">
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.BillingDataRetriever"><!-- trigger per each user add request-->
+                </handler>
+                <handler service="org.apache.stratos.metering.manager.handlers.RuleInvoker">
+                    <parameter name="rule-file">restriction-rules.drl</parameter>
+                </handler>
+                <handler service="org.apache.stratos.metering.agent.handlers.ValidationInfoStorer">
+                </handler>
+            </postHandlers>
+        </task>
+        <!-- to be implemented -->
+        <!--
+        <task service="org.apache.stratos.metering.manager.task.ScheduledTask">
+            <parameters>
+                <parameter name="period">1Month</parameter>
+                <parameter name="dayToTriggerOn">1</parameter>
+                <parameter name="hourToTriggerOn">0</parameter>
+                <parameter name="timeZone">GMT-8:00</parameter>
+            </parameters>
+            <hanldlers>
+                <handler service="org.apache.stratos.metering.manager.handler.RuleInvoker">
+                    <parameter name="rule-file">restriction-rules.drl</parameter>
+                </handler>
+            </handlers>
+        </task>
+        -->
+    </tasks>
+</meteringConfig>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/multitenancy-billing-rules.drl
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/multitenancy-billing-rules.drl b/products/stratos-manager/conf/multitenancy-billing-rules.drl
new file mode 100755
index 0000000..20a45c6
--- /dev/null
+++ b/products/stratos-manager/conf/multitenancy-billing-rules.drl
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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.
+ */
+
+import org.wso2.carbon.billing.core.dataobjects.*;
+import org.wso2.carbon.billing.mgt.dataobjects.*;
+
+
+rule smallSubscription
+when
+$item: MultitenancyPackage(name == "SMB")
+$subItem: Item(parent == $item && name == "subscription")
+then
+$subItem.setCost(new Cash("$100"));
+$subItem.setCreditLimit(new Cash("$200"));
+end
+
+
+rule mediumSubscription
+when
+$item: MultitenancyPackage(name == "Professional")
+$subItem: Item(parent == $item && name == "subscription")
+then
+$subItem.setCost(new Cash("$500"));
+$subItem.setCreditLimit(new Cash("$1000"));
+end
+
+
+rule largeSubscription
+when
+$item: MultitenancyPackage(name == "Enterprise")
+$subItem: Item(parent == $item && name == "subscription")
+then
+$subItem.setCost(new Cash("$2000"));
+$subItem.setCreditLimit(new Cash("$4000"));
+end
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/nhttp.properties
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/nhttp.properties b/products/stratos-manager/conf/nhttp.properties
new file mode 100644
index 0000000..40c3bfc
--- /dev/null
+++ b/products/stratos-manager/conf/nhttp.properties
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+# This file contains the configuration parameters used by the Non-blocking HTTP transport
+
+#http.socket.timeout=60000
+#nhttp_buffer_size=8192
+#http.tcp.nodelay=1
+#http.connection.stalecheck=0
+
+# Uncomment the following property for an AIX based deployment
+#http.nio.interest-ops-queueing=true
+
+# HTTP Sender thread pool parameters
+#snd_t_core=20
+#snd_t_max=100
+#snd_alive_sec=5
+#snd_qlen=-1
+#snd_io_threads=2
+
+# HTTP Listener thread pool parameters
+#lst_t_core=20
+#lst_t_max=100
+#lst_alive_sec=5
+#lst_qlen=-1
+#lst_io_threads=2

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/passthru-http.properties
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/passthru-http.properties b/products/stratos-manager/conf/passthru-http.properties
new file mode 100644
index 0000000..21cd1ab
--- /dev/null
+++ b/products/stratos-manager/conf/passthru-http.properties
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+## This file contains the configuration parameters used by the Pass-through HTTP transport
+
+## Pass-through HTTP transport specific tuning parameters 
+#worker_pool_size_core=40
+#worker_pool_size_max=200
+#worker_thread_keepalive_sec=60
+#worker_pool_queue_length=-1
+#io_threads_per_reactor=2
+#io_buffer_size=8192
+#http.max.connection.per.host.port=32767
+
+## Other parameters
+#http.user.agent.preserve=false
+#http.server.preserve=true
+#http.connection.disable.keepalive=false

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/rule-component.conf
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/rule-component.conf b/products/stratos-manager/conf/rule-component.conf
new file mode 100644
index 0000000..7ee068e
--- /dev/null
+++ b/products/stratos-manager/conf/rule-component.conf
@@ -0,0 +1,22 @@
+<!-- 
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF 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.
+-->
+
+<RuleServer>
+    <RuleEngineProvider class="org.wso2.carbon.rule.engine.jsr94.JSR94BackendRuntimeFactory"/>
+</RuleServer>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/samples-desc.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/samples-desc.xml b/products/stratos-manager/conf/samples-desc.xml
new file mode 100755
index 0000000..580f9b0
--- /dev/null
+++ b/products/stratos-manager/conf/samples-desc.xml
@@ -0,0 +1,33 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+<samples xmlns="http://wso2.com/stratos/samples">
+    <sample name="Shopping Cart">
+        <cloudServices>
+            <cloudService name="Application Server"/>
+            <!--cloudService name="WSO2 Stratos Governance"/>
+            <cloudService name="WSO2 Stratos Application Server"/>
+            <cloudService name="WSO2 Stratos Gadget Server"/>
+            <cloudService name="WSO2 Stratos Mashup Server"/>
+            <cloudService name="WSO2 Stratos Enterprise Service Bus"/>
+            <cloudService name="WSO2 Stratos Data Services Server"/>
+            <cloudService name="WSO2 Stratos Business Process Server"/-->
+        </cloudServices>
+	<fileName>GlobalShoppingCartSample-${shoppingcart.global.version}</fileName>
+    </sample>
+</samples>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/sso-idp-config.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/sso-idp-config.xml b/products/stratos-manager/conf/sso-idp-config.xml
new file mode 100755
index 0000000..e8fa188
--- /dev/null
+++ b/products/stratos-manager/conf/sso-idp-config.xml
@@ -0,0 +1,27 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+<SSOIdentityProviderConfig>
+     <LoginPageBannerBaseURL>http://wso2.com/product-ads/stratos/wso2cloud/</LoginPageBannerBaseURL>
+     <TenantRegistrationPage>https://stratos-local.wso2.com/carbon/tenant-register/select_domain.jsp</TenantRegistrationPage>
+     <ServiceProvider>
+            <Issuer>WSO2 Stratos Controller</Issuer>
+            <AssertionConsumerService>https://stratos-local.wso2.com/acs</AssertionConsumerService>
+	    <CustomLoginPage>stratos-sso/login_ajaxprocessor.jsp</CustomLoginPage>
+     </ServiceProvider>
+</SSOIdentityProviderConfig>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/status-monitor-config.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/status-monitor-config.xml b/products/stratos-manager/conf/status-monitor-config.xml
new file mode 100755
index 0000000..91bf5a3
--- /dev/null
+++ b/products/stratos-manager/conf/status-monitor-config.xml
@@ -0,0 +1,53 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<!-- 
+     Defines the database and related params that to be used for the services status
+     monitoring. Status Monitor Agent writes to the database defined here, and the 
+     Status Monitor reads it. 
+  -->
+
+<serviceStatusConfig xmlns="http://wso2.com/carbon/status/monitor/config">
+   <authConfig>
+        <jksLocation>../../repository/resources/security/wso2carbon.jks</jksLocation> <!--location to the jks file-->
+
+        <!--The tenant credentials that to be used to login to the Stratos 
+	services. Make sure the correct credentials are given to avoid 
+	false positives.-->
+        <userName>admin@wso2-heartbeat-checker.org</userName>
+        <password>password</password>
+        <tenantDomain>wso2-heartbeat-checker.org</tenantDomain>
+   </authConfig>
+
+   <platformSample>
+        <!--The tenant that has the webapps and services to monitor. 
+	This can of course be the same tenant given above as tenantDomain-->
+        <tenantDomain>wso2.org</tenantDomain>
+    </platformSample>
+
+   <dbConfig>
+        <url>jdbc:mysql://localhost:3306/stratos_status</url>
+        <userName>monitor</userName>
+        <password>monitor</password>
+        <driverName>com.mysql.jdbc.Driver</driverName>
+        <maxActive>80</maxActive>
+        <maxWait>60000</maxWait>
+        <minIdle>5</minIdle>
+    </dbConfig>
+</serviceStatusConfig>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/stratos-datasources.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/stratos-datasources.xml b/products/stratos-manager/conf/stratos-datasources.xml
new file mode 100755
index 0000000..4969870
--- /dev/null
+++ b/products/stratos-manager/conf/stratos-datasources.xml
@@ -0,0 +1,69 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">
+  
+    <providers>
+        <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
+    </providers>
+  
+    <datasources>
+		<datasource>
+            <name>WSO2BillingDS</name>
+            <description>The datasource used for registry and user manager</description>
+            <jndiConfig>
+                <name>jdbc/WSO2BillingDS</name>
+            </jndiConfig>
+            <definition type="RDBMS">
+                <configuration>
+                    <url>jdbc:h2:repository/database/WSO2BILLING_DB;DB_CLOSE_ON_EXIT=FALSE</url>
+                    <username>wso2carbon</username>
+                    <password>wso2carbon</password>
+                    <driverClassName>org.h2.Driver</driverClassName>
+                    <maxActive>50</maxActive>
+                    <maxWait>60000</maxWait>
+                    <testOnBorrow>true</testOnBorrow>
+                    <validationQuery>SELECT 1</validationQuery>
+                    <validationInterval>30000</validationInterval>
+                </configuration>
+            </definition>
+        </datasource>
+
+	<datasource>
+            <name>WSO2S2DS</name>
+            <description>The datasource used for s2</description>
+            <jndiConfig>
+                <name>jdbc/WSO2S2DS</name>
+            </jndiConfig>
+            <definition type="RDBMS">
+                <configuration>
+                    <url>jdbc:h2:repository/database/WSO2S2_DB;DB_CLOSE_ON_EXIT=FALSE</url>
+                    <username>wso2carbon</username>
+                    <password>wso2carbon</password>
+                    <driverClassName>org.h2.Driver</driverClassName>
+                    <maxActive>50</maxActive>
+                    <maxWait>60000</maxWait>
+                    <testOnBorrow>true</testOnBorrow>
+                    <validationQuery>SELECT 1</validationQuery>
+                    <validationInterval>30000</validationInterval>
+                </configuration>
+            </definition>
+        </datasource>
+      </datasources>
+</datasources-configuration>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse-configs/default/registry.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse-configs/default/registry.xml b/products/stratos-manager/conf/synapse-configs/default/registry.xml
new file mode 100644
index 0000000..f259c7a
--- /dev/null
+++ b/products/stratos-manager/conf/synapse-configs/default/registry.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<!-- Registry declaration of the WSO2 ESB -->
+<registry xmlns="http://ws.apache.org/ns/synapse" provider="org.wso2.carbon.mediation.registry.WSO2Registry">
+    <!--all resources loaded from the URL registry would be
+    cached for this number of milliseconds -->
+    <parameter name="cachableDuration">15000</parameter>
+</registry>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse-configs/default/sequences/errorHandler.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse-configs/default/sequences/errorHandler.xml b/products/stratos-manager/conf/synapse-configs/default/sequences/errorHandler.xml
new file mode 100644
index 0000000..8621bee
--- /dev/null
+++ b/products/stratos-manager/conf/synapse-configs/default/sequences/errorHandler.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+    <sequence name="errorHandler" xmlns="http://ws.apache.org/ns/synapse">
+	<log level="full">
+        	<property name="MESSAGE" value="Executing default 'fault' sequence"/>
+        	<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
+        	<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
+    	</log>
+        <makefault response="true">
+            <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+            <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
+        </makefault>
+        <send/>
+    </sequence>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse-configs/default/sequences/fault.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse-configs/default/sequences/fault.xml b/products/stratos-manager/conf/synapse-configs/default/sequences/fault.xml
new file mode 100644
index 0000000..9d2d8f7
--- /dev/null
+++ b/products/stratos-manager/conf/synapse-configs/default/sequences/fault.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<!-- Default fault sequence shipped with the Apache Synapse -->
+<sequence xmlns="http://ws.apache.org/ns/synapse" name="fault">
+
+    <!-- Log the message at the full log level with the ERROR_MESSAGE and the ERROR_CODE-->
+    <!-- log level="full">
+        <property name="MESSAGE" value="Executing default 'fault' sequence"/>
+        <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
+        <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
+    </log -->
+
+    <!-- Drops the messages by default if there is a fault -->
+    <script language="js"><![CDATA[
+        mc.setPayloadXML(
+           <{mc.getProperty("SERVICENAME")}Response xmlns="org.wso2.gateway">
+            <Timestamp>{new Date()}</Timestamp>
+            <Ack>Failure</Ack>
+            <Errors>
+             <ShortMessage>Gateway Error</ShortMessage>
+             <LongMessage>{mc.getProperty("ERROR_MESSAGE")}</LongMessage>
+             <ErrorCode>500</ErrorCode>
+             <SeverityCode>Error</SeverityCode>
+             <ErrorClassification>RequestError</ErrorClassification>
+            </Errors>
+            <ServiceName>{mc.getProperty("SERVICENAME")}</ServiceName>
+            <ResponseCode>{mc.getProperty("HTTP_SC")}</ResponseCode>
+            <ContentType>{mc.getProperty("Content-Type")}</ContentType>
+            <Version>1.5.1</Version>
+           </{mc.getProperty("SERVICENAME")}Response>
+        );
+      ]]></script>
+    <switch source="get-property('ERROR_CODE')">
+        <case regex="101504">   <!-- TIMEOUT ERROR -->
+            <property name="HTTP_SC" value="504" scope="axis2"/>
+            <sequence key="seq_timeout"/>
+        </case>
+        <case regex="303001">
+            <property name="HTTP_SC" value="503" scope="axis2"/>
+            <sequence key="seq_endpoint_down"/>
+        </case>
+        <case regex="111503">
+            <property name="HTTP_SC" value="503" scope="axis2"/>
+            <sequence key="seq_endpoint_down"/>
+        </case>
+        <default>
+            <property name="HTTP_SC" value="500" scope="axis2"/>
+        </default>
+    </switch>
+    <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
+    <header name="To" action="remove"/>
+    <property name="RESPONSE" value="true"/>
+    <property name="messageType" value="text/xml" scope="axis2"/>
+    <property name="ContentType" value="text/xml" scope="axis2"/>
+
+    <send/>
+
+</sequence>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse-configs/default/sequences/main.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse-configs/default/sequences/main.xml b/products/stratos-manager/conf/synapse-configs/default/sequences/main.xml
new file mode 100644
index 0000000..c4dbf5b
--- /dev/null
+++ b/products/stratos-manager/conf/synapse-configs/default/sequences/main.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<!-- Default main sequence shipped with the WSO2 ESB -->
+<sequence xmlns="http://ws.apache.org/ns/synapse" name="main" onError="fault">
+    <description>The main sequence for the message mediation</description>
+
+    <in>
+        <property name="REQUEST_HOST_HEADER" expression="$trp:host" scope="axis2"/>
+        <property name="SERVICE_PREFIX" expression="$axis2:SERVICE_PREFIX"/>
+        <send>
+            <!--endpoint name="sdlbEndpoint">
+                <session type="http">-->
+                    <!-- Session timout is 15mins-->
+                    <!--sessionTimeout>900000</sessionTimeout>
+                </session>
+                <serviceDynamicLoadbalance failover="true"
+                                           algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"
+                                           configuration="$system:loadbalancer.xml"/>
+            </endpoint>
+            -->
+	          <!--endpoint name="tenantAwareLBEndpoint">
+                <class name ="org.wso2.carbon.lb.endpoint.endpoint.TenantAwareLoadBalanceEndpoint">
+                     <parameter name="algorithm"> org.apache.synapse.endpoints.algorithms.RoundRobin</parameter>
+                     <parameter name="configuration">$system:loadbalancer.conf</parameter>
+                     <parameter name="failover">true</parameter>          
+                     <parameter name="sessionTimeout">900000</parameter>
+  	            </class>
+ 	          </endpoint-->
+        </send>
+        <drop/>
+    </in>
+
+    <out>
+        <!-- Handling status codes: 301, 302 Redirection -->
+        <filter source="$trp:Location" regex=".+">
+            <property name="LB_SP_Host" expression="$ctx:SERVICE_PREFIX"
+                      pattern="(^http.?://\b)(.*):(\d*)(.*)" group="2"/>
+
+            <property name="LB_Location_Protocol" expression="$trp:Location"
+                      pattern="(^http.?://\b)(.*):(\d*)(.*)" group="1"/>
+            <property name="LB_Location_Host" expression="$trp:Location"
+                      pattern="(^http.?://\b)(.*):(\d*)(.*)" group="2"/>
+            <property name="LB_Location_Path" expression="$trp:Location"
+                      pattern="(^http.?://\b)(.*):(\d*)(.*)" group="4"/>
+
+            <!--<log level="custom">
+               <property name="ameera-ocation" expression="$trp:Location"/>
+               <property name="ameera-sprefix" expression="$ctx:SERVICE_PREFIX"/>
+           </log>-->
+
+            <filter xpath="fn:lower-case($ctx:LB_SP_Host)=fn:lower-case($ctx:LB_Location_Host)">
+                <then>
+                    <switch source="fn:lower-case($ctx:LB_Location_Protocol)">
+                        <case regex="https://">
+                            <property name="Location"
+                                      expression="fn:concat($ctx:LB_Location_Protocol,$ctx:LB_REQUEST_HOST,$ctx:LB_Location_Path)"
+                                      scope="transport"/>
+                        </case>
+                        <case regex="http://">
+                            <property name="Location"
+                                      expression="fn:concat($ctx:LB_Location_Protocol,$ctx:LB_REQUEST_HOST,$ctx:LB_Location_Path)"
+                                      scope="transport"/>
+                        </case>
+                    </switch>
+                </then>
+
+                <else>
+                    <filter xpath="$ctx:LB_REQUEST_HOST=fn:lower-case($ctx:LB_Location_Host)">
+                        <switch source="fn:lower-case($ctx:LB_Location_Protocol)">
+                            <case regex="https://">
+                                <property name="Location"
+                                          expression="fn:concat($ctx:LB_Location_Protocol,$ctx:LB_REQUEST_HOST,$ctx:LB_Location_Path)"
+                                          scope="transport"/>
+                            </case>
+                            <case regex="http://">
+                                <property name="Location"
+                                          expression="fn:concat($ctx:LB_Location_Protocol,$ctx:LB_REQUEST_HOST,$ctx:LB_Location_Path)"
+                                          scope="transport"/>
+                            </case>
+                        </switch>
+                    </filter>
+                </else>
+            </filter>
+        </filter>
+
+        <!-- Send the messages where they have been sent (i.e. implicit To EPR) -->
+        <property name="messageType" value="text/html" scope="axis2"/>
+        <send/>
+        <drop/>
+    </out>
+
+</sequence>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse-configs/default/synapse.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse-configs/default/synapse.xml b/products/stratos-manager/conf/synapse-configs/default/synapse.xml
new file mode 100755
index 0000000..d8ad52d
--- /dev/null
+++ b/products/stratos-manager/conf/synapse-configs/default/synapse.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+
+<!-- The default synapse configuration shipped with the WSO2 Elastic  Load Balancer
+ -->
+
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+</definitions>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/synapse.properties
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/synapse.properties b/products/stratos-manager/conf/synapse.properties
new file mode 100755
index 0000000..c3cbdb4
--- /dev/null
+++ b/products/stratos-manager/conf/synapse.properties
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+#synapse.threads.core = 20
+#synapse.threads.max = 100
+#synapse.threads.keepalive = 5
+#synapse.threads.qlen = 10
+#synapse.threads.group = synapse-thread-group
+#synapse.threads.idprefix = SynapseWorker
+
+synapse.sal.endpoints.sesssion.timeout.default=600000
+
+#In memory statistics cleaning state 
+statistics.clean.enable=false
+
+# Dependency tracking Synapse observer
+# Comment out to disable dependency management
+synapse.observers=org.wso2.carbon.mediation.dependency.mgt.DependencyTracker
+
+# User defined wsdlLocator/Schema Resolver Implementations.
+# synapse.wsdl.resolver=org.wso2.carbon.mediation.initializer.RegistryWSDLLocator
+# synapse.schema.resolver=org.wso2.carbon.mediation.initializer.RegistryXmlSchemaURIResolver
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/tenant-reg-agent.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/tenant-reg-agent.xml b/products/stratos-manager/conf/tenant-reg-agent.xml
new file mode 100755
index 0000000..c39e189
--- /dev/null
+++ b/products/stratos-manager/conf/tenant-reg-agent.xml
@@ -0,0 +1,25 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+<tenantRegListenerServers>
+    <!--<server>
+        <serverUrl>https://10.100.1.206:9443/services/</serverUrl>
+        <userName>admin</userName>
+        <password>admin</password>
+    </server>-->
+</tenantRegListenerServers>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/throttling-rules.drl
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/throttling-rules.drl b/products/stratos-manager/conf/throttling-rules.drl
new file mode 100755
index 0000000..cf62ae4
--- /dev/null
+++ b/products/stratos-manager/conf/throttling-rules.drl
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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.
+ */
+
+import org.wso2.carbon.throttling.manager.dataobjects.*;
+import org.wso2.carbon.billing.mgt.dataobjects.*;
+import org.wso2.carbon.stratos.common.constants.*;
+
+// free users restrictions
+
+rule unsetRestrictFreeUsers
+when
+ $package: MultitenancyPackage(name == "Demo")
+ $dataContext : ThrottlingDataContext()
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_ADD_USER_ACTION, false, null);
+
+end
+
+
+rule restrictFreeDataVolume
+when
+ $package: MultitenancyPackage(name == "Demo")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > (20 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed disk storage of 20Mb. Please upgrade the subscription.");
+end
+
+
+rule unsetRestrictFreeDataVolume
+when
+ $package: MultitenancyPackage(name == "Demo")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) <= (20 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, false, null);
+end
+
+
+rule restrictFreeBandwidth
+when
+ $package: MultitenancyPackage(name == "Demo")
+ $dataContext : ThrottlingDataContext()
+ eval(($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH) + 
+ 		$dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_OUTGOING_BANDWIDTH)) > (50 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 50Mb. Please upgrade the subscription.");
+ validation.setTenantBlocked(StratosConstants.THROTTLING_WEBAPP_IN_BANDWIDTH_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 50Mb. Please upgrade the subscription.");
+ validation.setTenantBlocked(StratosConstants.THROTTLING_OUT_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 50Mb. Please upgrade the subscription.");                      
+end
+
+
+rule unsetRestrictFreeBandwidth
+when
+ $package: MultitenancyPackage(name == "Demo")
+ $dataContext : ThrottlingDataContext()
+ eval(($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH) + 
+ 		$dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_OUTGOING_BANDWIDTH)) < (50 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION,false,null);
+ validation.setTenantBlocked(StratosConstants.THROTTLING_WEBAPP_IN_BANDWIDTH_ACTION,false,null);
+ validation.setTenantBlocked(StratosConstants.THROTTLING_OUT_DATA_ACTION,false,null);
+end
+
+
+//---------------------------------------------------------------------------------
+// small users restrictions
+
+
+
+rule restrictSmallDataVolume
+when
+ $package: MultitenancyPackage(name == "SMB")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > (50 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed disk storage of 50Mb. Please upgrade the subscription.");
+end
+
+
+rule unsetRestrictSmallDataVolume
+when
+ $package: MultitenancyPackage(name == "SMB")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) <= (50 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, false, null);
+end
+
+
+rule restrictSmallBandwidth
+when
+ $package: MultitenancyPackage(name == "SMB")
+ $dataContext : ThrottlingDataContext()
+ eval(($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH) + 
+ 		$dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_OUTGOING_BANDWIDTH)) > (150 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 150Mb. Please upgrade the subscription.");
+ validation.setTenantBlocked(StratosConstants.THROTTLING_WEBAPP_IN_BANDWIDTH_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 150Mb. Please upgrade the subscription.");
+ validation.setTenantBlocked(StratosConstants.THROTTLING_OUT_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed bandwidth of 150Mb. Please upgrade the subscription."); 
+end
+
+
+rule unsetRestrictSmallBandwidth
+when
+ $package: MultitenancyPackage(name == "SMB")
+ $dataContext : ThrottlingDataContext()
+ eval(($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH) + 
+ 		$dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_OUTGOING_BANDWIDTH)) < (150 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION,false,null);
+ validation.setTenantBlocked(StratosConstants.THROTTLING_WEBAPP_IN_BANDWIDTH_ACTION,false,null);
+ validation.setTenantBlocked(StratosConstants.THROTTLING_OUT_DATA_ACTION,false,null);
+end
+
+
+rule unsetRestrictSmallUsers
+when
+ $package: MultitenancyPackage(name == "SMB")
+ $dataContext : ThrottlingDataContext()
+then
+
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_ADD_USER_ACTION, false, null);
+
+end
+
+
+
+
+//-------------------------------------------------------------------------------
+// medium users restrictions
+
+
+
+rule restrictMediumDataVolume
+when
+ $package: MultitenancyPackage(name == "Professional")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > (500 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed disk storage of 500Mb. Please upgrade the subscription.");
+end
+
+
+rule unsetRestrictMediumDataVolume
+when
+ $package: MultitenancyPackage(name == "Professional")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) <= (500 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, false, null);
+end
+
+
+rule unsetRestrictMediumUsers
+when
+ $package: MultitenancyPackage(name == "Professional")
+ $dataContext : ThrottlingDataContext()
+then
+
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_ADD_USER_ACTION, false, null);
+
+end
+
+
+
+//-----------------------------------------------------------------------------------------------
+// large users restrictions
+
+
+rule restrictLargeDataVolume
+when
+ $package: MultitenancyPackage(name == "Enterprise")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > (1500 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true, 
+            "You have exceeded the maximum allowed disk storage of 1500Mb.");
+end
+
+
+rule unsetRestrictLargeDataVolume
+when
+ $package: MultitenancyPackage(name == "Enterprise")
+ $dataContext : ThrottlingDataContext()
+ eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) <= (1500 * 1024 * 1024) && 
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, false, null);
+end
+
+
+rule unsetRestrictLargeUsers
+when
+ $package: MultitenancyPackage(name == "Enterprise")
+ $dataContext : ThrottlingDataContext()
+then
+
+ ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+ validation.setTenantBlocked(StratosConstants.THROTTLING_ADD_USER_ACTION, false, null);
+
+end
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/user-mgt.xml
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/user-mgt.xml b/products/stratos-manager/conf/user-mgt.xml
new file mode 100644
index 0000000..c6cdb74
--- /dev/null
+++ b/products/stratos-manager/conf/user-mgt.xml
@@ -0,0 +1,241 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF 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.
+  -->
+        
+<UserManager>
+    <Realm>
+        <Configuration>
+                <AdminRole>admin</AdminRole>
+                <AdminUser>
+                     <UserName>admin</UserName>
+                     <Password>admin</Password>
+                </AdminUser>
+            <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
+            <Property name="dataSource">jdbc/WSO2CarbonDB</Property>
+            <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
+        </Configuration>
+	<!-- Following is the default user store manager. This user store manager is based on embedded-apacheds LDAP. It reads/writes users and roles into the 		     default apacheds LDAP user store. Descriptions about each of the following properties can be found in user management documentation of the 	 respective product. In case if user core cache domain is needed to identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>
+	     Note: Do not comment within UserStoreManager tags. Cause, specific tag names are used as tokens when building configurations for products. -->
+	<!--UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
+            <Property name="ConnectionURL">ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}</Property>
+            <Property name="ConnectionName">uid=admin,ou=system</Property>
+            <Property name="ConnectionPassword">admin</Property>
+            <Property name="passwordHashMethod">SHA</Property>
+            <Property name="UserNameListFilter">(objectClass=person)</Property>
+	    <Property name="UserEntryObjectClass">wso2Person</Property>
+            <Property name="UserSearchBase">ou=Users,dc=wso2,dc=org</Property>
+            <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
+            <Property name="UserNameAttribute">uid</Property>
+            <Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
+            <Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+	    <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+            <Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+            <Property name="ReadLDAPGroups">true</Property>
+	    <Property name="WriteLDAPGroups">true</Property>
+	    <Property name="EmptyRolesAllowed">true</Property>
+            <Property name="GroupSearchBase">ou=Groups,dc=wso2,dc=org</Property>
+            <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
+            <Property name="GroupEntryObjectClass">groupOfNames</Property>
+            <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
+            <Property name="GroupNameAttribute">cn</Property>
+            <Property name="MembershipAttribute">member</Property>
+	    <Property name="UserRolesCacheEnabled">true</Property>
+	    <Property name="UserDNPattern">uid={0},ou=Users,dc=wso2,dc=org</Property>
+        </UserStoreManager-->
+
+	<!-- Following is the configuration for internal JDBC user store. This user store manager is based on JDBC. In case if application needs to manage 		     passwords externally set property <Property name="PasswordsExternallyManaged">true</Property>. In case if user core cache domain is needed to 			identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>. Furthermore properties, IsEmailUserName and 	     			DomainCalculation are readonly properties. 
+	     Note: Do not comment within UserStoreManager tags. Cause, specific tag names are used as tokens when building configurations for products. -->	
+        <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
+	    <Property name="ReadOnly">false</Property>
+            <Property name="MaxUserNameListLength">100</Property>
+            <Property name="IsEmailUserName">false</Property>
+            <Property name="DomainCalculation">default</Property>
+            <Property name="PasswordDigest">SHA-256</Property>
+            <Property name="StoreSaltedPassword">true</Property>
+            <Property name="UserNameUniqueAcrossTenants">false</Property>
+            <Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
+            <Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
+	    <Property name="UsernameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+	    <Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+	    <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+	    <Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="UserRolesCacheEnabled">true</Property>
+        </UserStoreManager>
+	
+	<!-- If product is using an external LDAP as the user store in READ ONLY mode, use following user manager.
+		In case if user core cache domain is needed to identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>
+ 	-->
+        <!--UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
+            <Property name="ReadOnly">true</Property>
+	    <Property name="MaxUserNameListLength">100</Property>
+            <Property name="ConnectionURL">ldap://localhost:10389</Property>
+            <Property name="ConnectionName">uid=admin,ou=system</Property>
+            <Property name="ConnectionPassword">admin</Property>
+            <Property name="UserSearchBase">ou=system</Property>
+            <Property name="UserNameListFilter">(objectClass=person)</Property>
+            <Property name="UserNameAttribute">uid</Property>
+            <Property name="ReadLDAPGroups">false</Property>
+            <Property name="GroupSearchBase">ou=system</Property>
+            <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
+            <Property name="GroupNameAttribute">cn</Property>
+            <Property name="MembershipAttribute">member</Property>
+            <Property name="UserRolesCacheEnabled">true</Property>
+	    <Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
+        </UserStoreManager-->
+	
+	<!-- Active directory configuration is as follows.
+	    In case if user core cache domain is needed to identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>
+	    There are few special properties for "Active Directory". 
+	    They are : 
+	    1.Referral - (comment out this property if this feature is not reuired) This enables LDAP referral support.
+	    2.BackLinksEnabled - (Do not comment, set to true or false) In some cases LDAP works with BackLinksEnabled. In which role is stored
+	     at user level. Depending on this value we need to change the Search Base within code.
+	    3.isADLDSRole - (Do not comment) Set to true if connecting to an AD LDS instance else set to false.  
+	-->
+	<!--UserStoreManager class="org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager">
+            <Property name="defaultRealmName">WSO2.ORG</Property>
+            <Property name="kdcEnabled">false</Property>
+            <Property name="ConnectionURL">ldaps://10.100.1.100:636</Property> 
+            <Property name="ConnectionName">CN=admin,CN=Users,DC=WSO2,DC=Com</Property>
+            <Property name="ConnectionPassword">A1b2c3d4</Property>
+	    <Property name="passwordHashMethod">SHA</Property>
+            <Property name="UserSearchBase">CN=Users,DC=WSO2,DC=Com</Property>
+            <Property name="UserEntryObjectClass">user</Property>
+            <Property name="UserNameAttribute">cn</Property>
+            <Property name="isADLDSRole">false</Property>
+	    <Property name="userAccountControl">512</Property>
+            <Property name="UserNameListFilter">(objectClass=user)</Property>
+	    <Property name="UserNameSearchFilter">(&amp;(objectClass=user)(cn=?))</Property>
+            <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
+            <Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
+	    <Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
+	    <Property name="ReadLDAPGroups">true</Property>
+	    <Property name="WriteLDAPGroups">true</Property>
+	    <Property name="EmptyRolesAllowed">true</Property>
+            <Property name="GroupSearchBase">CN=Users,DC=WSO2,DC=Com</Property>
+	    <Property name="GroupEntryObjectClass">group</Property>
+            <Property name="GroupNameAttribute">cn</Property>
+            <Property name="MembershipAttribute">member</Property>
+            <Property name="GroupNameListFilter">(objectcategory=group)</Property>
+	    <Property name="GroupNameSearchFilter">(&amp;(objectClass=group)(cn=?))</Property>
+            <Property name="UserRolesCacheEnabled">true</Property>
+            <Property name="Referral">follow</Property>
+	    <Property name="BackLinksEnabled">true</Property>
+        </UserStoreManager-->
+	
+	<!-- If product is using an external LDAP as the user store in read/write mode, use following user manager 
+		In case if user core cache domain is needed to identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>
+	-->
+	<!--UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
+            <Property name="ConnectionURL">ldap://localhost:10389</Property>
+            <Property name="ConnectionName">uid=admin,ou=system</Property>
+            <Property name="ConnectionPassword">secret</Property>
+            <Property name="passwordHashMethod">SHA</Property>
+            <Property name="UserNameListFilter">(objectClass=person)</Property>
+	    <Property name="UserEntryObjectClass">inetOrgPerson</Property>
+            <Property name="UserSearchBase">ou=system</Property>
+            <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
+            <Property name="UserNameAttribute">uid</Property>
+	    <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
+            <Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+	    <Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
+            <Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
+	    <Property name="ReadLDAPGroups">true</Property>
+	    <Property name="WriteLDAPGroups">true</Property>
+	    <Property name="EmptyRolesAllowed">false</Property>
+            <Property name="GroupSearchBase">ou=system</Property>
+            <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
+            <Property name="GroupEntryObjectClass">groupOfNames</Property>
+            <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
+            <Property name="GroupNameAttribute">cn</Property>
+            <Property name="MembershipAttribute">member</Property>
+            <Property name="UserRolesCacheEnabled">true</Property>
+	    <Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
+        </UserStoreManager-->
+
+	<!-- Following user manager is used by Identity Server (IS) as its default user manager. 
+	     IS will do token replacement when building the product. Therefore do not change the syntax. 
+	     If "kdcEnabled" parameter is true, IS will allow service principle management. Thus "ServicePasswordJavaRegEx", "ServiceNameJavaRegEx"
+	     properties control the service name format and service password formats.
+	     In case if user core cache domain is needed to identify uniquely set property <Property name="UserCoreCacheIdentifier">domain</Property>
+	-->
+	<!--ISUserStoreManager class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
+            <Property name="defaultRealmName">WSO2.ORG</Property>
+            <Property name="kdcEnabled">false</Property>
+            <Property name="ConnectionURL">ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}</Property>
+            <Property name="ConnectionName">uid=admin,ou=system</Property>
+            <Property name="ConnectionPassword">admin</Property>
+            <Property name="passwordHashMethod">SHA</Property>
+            <Property name="UserNameListFilter">(objectClass=person)</Property>
+            <Property name="UserEntryObjectClass">scimPerson</Property>
+            <Property name="UserSearchBase">ou=Users,dc=wso2,dc=org</Property>
+            <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
+            <Property name="UserNameAttribute">uid</Property>
+            <Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
+	    <Property name="ServicePasswordJavaRegEx">^[\\S]{5,30}$</Property>
+	    <Property name="ServiceNameJavaRegEx">^[\\S]{2,30}/[\\S]{2,30}$</Property>
+            <Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+            <Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
+            <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
+	    <Property name="ReadLDAPGroups">true</Property>
+	    <Property name="WriteLDAPGroups">true</Property>
+	    <Property name="EmptyRolesAllowed">true</Property>
+            <Property name="GroupSearchBase">ou=Groups,dc=wso2,dc=org</Property>
+            <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
+	    <Property name="GroupEntryObjectClass">groupOfNames</Property>
+            <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
+            <Property name="GroupNameAttribute">cn</Property>
+            <Property name="MembershipAttribute">member</Property>
+            <Property name="UserRolesCacheEnabled">true</Property>
+	    <Property name="UserDNPattern">uid={0},ou=Users,dc=wso2,dc=org</Property>
+	    <Property name="SCIMEnabled">true</Property>
+        </ISUserStoreManager-->
+
+        <AuthorizationManager
+            class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
+            <Property name="AdminRoleManagementPermissions">/permission</Property>
+	    <Property name="AuthorizationCacheEnabled">true</Property>
+        </AuthorizationManager>
+    </Realm>
+</UserManager>
+
+<!--*******Description of some of the configuration properties used in user-mgt.xml*********************************
+UserRolesCacheEnabled - This is to indicate whether to cache role list of a user. By default it is set to true.
+                        You may need to disable it if user-roles are changed by external means and need to reflect
+                        those changes in the carbon product immediately.
+
+ReplaceEscapeCharactersAtUserLogin - This is to configure whether escape characters in user name needs to be replaced at user login.
+				     Currently the identified escape characters that needs to be replaced are '\' & '\\'
+
+UserDNPattern - This property will be used when authenticating users. During authentication we do a bind. But if the user is login with
+                email address or some other property we need to first lookup LDAP and retreive DN for the user. This involves an additional step. 
+                If UserDNPattern is specified the DN will be contructed using the pattern specified in this property. Performance of this is much better than looking
+                up DN and binding user.
+
+passwordHashMethod - This says how the password should be stored. Allowed values are as follows,
+                     SHA - Uses SHA digest method
+                     MD5 - Uses MD 5 digest method
+                     PLAIN_TEXT - Plain text passwords
+                     In addition to above this supports all digest methods supported by http://docs.oracle.com/javase/6/docs/api/java/security/MessageDigest.html.
+
+-->

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-manager/conf/zoo.cfg
----------------------------------------------------------------------
diff --git a/products/stratos-manager/conf/zoo.cfg b/products/stratos-manager/conf/zoo.cfg
new file mode 100644
index 0000000..5c54037
--- /dev/null
+++ b/products/stratos-manager/conf/zoo.cfg
@@ -0,0 +1,24 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF 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.
+#
+
+tickTime=2000
+dataDir=repository/data/zookeeper
+clientPort=2181
+start_zk_server=false