You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/21 21:02:12 UTC

[40/44] applied 0001-Moved-cloud-controller-1.0.1-to-products-and-removed.patch

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml b/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
new file mode 100644
index 0000000..5b137c7
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) 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.
+ -->
+<assembly>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <excludes>
+                <exclude>**/*.sh</exclude>
+                <exclude>**/*.bat</exclude>
+                <exclude>**/log4j.properties</exclude>
+                <exclude>**/conf/axis2/axis2.xml</exclude>
+                <exclude>**/services/sample01.aar</exclude>
+                <exclude>**/repository/services/version/**</exclude>
+                <exclude>**/version.txt</exclude>
+                <exclude>**/LICENSE.txt</exclude>
+                <exclude>**/wso2server.bat</exclude>
+		<exclude>**/launch.ini</exclude>
+                <exclude>**/README.txt</exclude>
+                <exclude>**/INSTALL.txt</exclude>
+                <exclude>**/release-notes.html</exclude>
+                <exclude>**/carbon.xml</exclude>
+            </excludes>
+        </fileSet>
+        <fileSet>
+            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <excludes>
+                <exclude>**/wso2server.sh</exclude>
+                <exclude>**/wso2server.bat</exclude>     
+            </excludes>
+	    <includes>
+                <include>**/*.sh</include>
+                <include>**/native/*</include>
+            </includes>
+            <fileMode>755</fileMode>
+        </fileSet>
+		<!--samples set of product-->
+        <fileSet>
+            <directory>../../modules/samples/product/jmsclient</directory>
+            <outputDirectory>wso2cc-${pom.version}/samples/jmsclient</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../../modules/samples/product/jmstransport</directory>
+            <outputDirectory>wso2cc-${pom.version}/samples/jmstransport</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../../modules/samples/product/wsclient</directory>
+            <outputDirectory>wso2cc-${pom.version}/samples/wsclient</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../../modules/samples/product/services</directory>
+            <outputDirectory>wso2cc-${pom.version}/samples/services</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>
+                ../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/advanced/
+            </directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/advanced
+            </outputDirectory>
+            <includes>
+                <include>**/qpid-config.xml</include>
+                <include>**/qpid-jmxremote.access</include>
+                <include>**/qpid-virtualhosts.xml</include>
+            </includes>
+        </fileSet>
+	<fileSet>
+            <directory>src/main/conf/synapse-configs</directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/deployment/server/synapse-configs
+            </outputDirectory>
+        </fileSet>
+	 <fileSet>
+            <directory>src/main/cartridges</directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/deployment/server/cartridges</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/services</directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/deployment/server/services</outputDirectory>
+        </fileSet>
+	 <!--Multitenancy related file -->
+        <fileSet>
+            <directory>
+                ../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/
+            </directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/multitenancy</outputDirectory>
+            <includes>
+                <include>**/stratos.xml</include>
+                <include>**/multitenancy-packages.xml</include>
+                <include>**/usage-throttling-agent-config.xml</include>
+                <include>**/cloud-services-desc.xml</include>
+            </includes>
+        </fileSet>
+
+        <fileSet>
+           <directory>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/</directory>
+           <outputDirectory>wso2cc-${pom.version}/repository/conf/etc</outputDirectory>
+           <includes>
+               <include>**/cassandra.yaml</include>
+           </includes>
+        </fileSet>
+      
+	<!-- copy the landing page webapp -->
+        <fileSet>
+		<directory>lib/home</directory>
+		<outputDirectory>wso2cc-${pom.version}/repository/deployment/server/webapps/STRATOS_ROOT</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>
+                ../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/
+            </directory>
+            <outputDirectory>wso2cc-${pom.version}/dbscripts/identity</outputDirectory>
+            <includes>
+                <include>**/h2.sql</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../styles/service/src/main/resources/web/styles/css</directory>
+           <outputDirectory>${pom.artifactId}-${pom.version}/resources/allthemes/Default/admin</outputDirectory>
+            <includes>
+                <include>**/**.css</include>
+           </includes>
+        </fileSet>
+        <fileSet>
+           <directory>../styles/service/src/main/resources/web/styles/images</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/resources/allthemes/Default/images</outputDirectory>
+            <includes>
+                <include>**/**.gif</include>
+                <include>**/**.png</include>
+            </includes>
+        </fileSet>
+
+	<!-- get axis2_1.6.1.wso2v9.jar from carbon kernel patch 0002 -->
+        <fileSet>
+           <directory>../p2-profile/target/WSO2-CARBON-PATCH-4.1.0-0002/</directory>
+           <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
+           <includes>
+              <include>**/patch0002/axis2_1.6.1.wso2v9.jar</include>
+           </includes>
+        </fileSet>
+    </fileSets>
+
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>wso2cc-${pom.version}/repository/deployment/client/modules
+            </outputDirectory>
+            <includes>
+                <include>org.apache.rampart:rampart:mar</include>
+            </includes>
+        </dependencySet>
+	<dependencySet>
+            <outputDirectory>wso2cc-${pom.version}/client-lib</outputDirectory>
+            <includes>
+                <include>org.wso2.andes.wso2:andes-client:jar</include>
+                <include>org.apache.geronimo.specs.wso2:geronimo-jms_1.1_spec:jar</include>
+                <include>org.wso2.carbon:org.wso2.carbon.event.client.stub:jar</include>
+                <include>org.wso2.carbon:org.wso2.carbon.event.client:jar</include>
+		        <include>slf4j.wso2:slf4j:jar</include>
+                <include>log4j:log4j:jar</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+
+    <files>
+        <file>
+            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/axis2/axis2.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/axis2</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>src/main/conf/event-broker.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+        </file>
+	<!--file>
+            <source>src/main/conf/user-mgt.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+            <destName>user-mgt.xml</destName>
+        </file-->
+	  <!-- Setting jamm javaagent in bam -->
+        <file>
+            <source>src/main/resources/launch.ini</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>src/main/conf/embedded-ldap.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+            <destName>embedded-ldap.xml</destName>
+        </file>
+         <file>
+            <source>src/main/conf/zoo.cfg</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+         <file>
+            <source>src/main/conf/jaas.conf</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/security</outputDirectory>
+        </file>
+         <file>
+            <source>src/main/resources/wso2server.sh</source>
+            <outputDirectory>wso2cc-${pom.version}/bin/</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>755</fileMode>
+        </file>
+        <file>
+            <source>src/main/resources/log4j.properties</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>755</fileMode>
+        </file>
+	 <file>
+            <source>src/main/conf/synapse.properties</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+            <destName>synapse.properties</destName>
+            <filtered>true</filtered>
+        </file>
+        <file>
+            <source>src/main/conf/cipher-text.properties</source>
+            <outputDirectory>wso2cc-${pom.version}/lib</outputDirectory>
+            <destName>cipher-text.properties</destName>
+            <filtered>true</filtered>
+        </file>
+         <file>
+            <source>src/main/resources/wso2server.bat</source>
+            <outputDirectory>wso2cc-${pom.version}/bin/</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>755</fileMode>
+        </file>
+	<file>
+            <source>src/main/conf/datasources.properties</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf</outputDirectory>
+            <destName>datasources.properties</destName>
+            <filtered>true</filtered>
+        </file>
+        <file>
+            <source>../../LICENSE.txt</source>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>../../README.txt</source>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>../../INSTALL.txt</source>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <!--file>
+            <source>../../docs/xdoc/release-notes.xml</source>
+            <outputDirectory>wso2cc-${pom.version}</outputDirectory>
+            <destName>release-notes.html</destName>
+            <fileMode>644</fileMode>
+        </file-->
+        <file>
+            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt</source>
+            <outputDirectory>wso2cc-${pom.version}/bin/</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/version.txt</source>
+            <outputDirectory>wso2cc-${pom.version}/bin/</outputDirectory>
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
+        </file>
+        <file>
+            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/</outputDirectory>
+            <filtered>true</filtered>
+        </file>
+	<!--file>
+            <source>
+                ../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/authenticators.xml
+            </source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/security/</outputDirectory>
+            <filtered>true</filtered>
+        </file-->
+
+	<!-- Including logging-config.xml file -->
+ 	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/logging-config.xml</source>
+            <outputDirectory>wso2cc-${pom.version}/repository/conf/etc/</outputDirectory>
+        </file>
+        <file>
+             <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/identity.xml</source>
+	     <outputDirectory>wso2cc-${pom.version}/repository/conf/</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/cloud-controller.xml</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/cartridge.xsd</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/services.xsd</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/service.xsd</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/cartridges.xsd</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+	<file>
+            <source>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/coordination-client-config.xml</source>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+        </file>
+    </files>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/assembly/dist.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/assembly/dist.xml b/products/cloud_controller/modules/distribution/src/main/assembly/dist.xml
new file mode 100644
index 0000000..ff7ba51
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/assembly/dist.xml
@@ -0,0 +1,36 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) 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.
+ -->
+<assembly>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <!-- Copying p2 profile and osgi bundles-->
+        <fileSet>
+            <directory>../p2-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/components</directory>
+            <outputDirectory>wso2cc-${pom.version}/repository/components</outputDirectory>
+            <excludes>
+                <exclude>**/eclipse.ini</exclude>
+                <exclude>**/*.lock</exclude>
+                <exclude>**/.data</exclude>
+                <exclude>**/.settings</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/cipher-text.properties
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/cipher-text.properties b/products/cloud_controller/modules/distribution/src/main/conf/cipher-text.properties
new file mode 100644
index 0000000..9ad599b
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/cipher-text.properties
@@ -0,0 +1,23 @@
+#
+#  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
+#
+#  Licensed 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.
+#
+
+#aliases=esb
+#
+## configuration  per each plaintext
+#esb.secret=M6U74dMVvRm4XFMczki2qZ6CsTvnUuRTjSditlACR5vTISSMI7F/mCTVJGOGdKJjij+VWVhBtmAOkElyvR9TwlUECnZ1o5DNsTK6l8je+9amc/ziTQLP3Q1tzm/Ex1pzHsG6jPGGrv3O0B9pZTfYFqRvlcNhM7Ve3WvA3ibs4Yk=
+#esb.secret.alias=wso2carbon
+#esb.secret.keystore=identity
+#

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/embedded-ldap.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/embedded-ldap.xml b/products/cloud_controller/modules/distribution/src/main/conf/embedded-ldap.xml
new file mode 100644
index 0000000..6e64fac
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/embedded-ldap.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- *
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+* -->
+
+<!--
+	All carbon based products comes with a LDAP user store.
+	For this we use an embedded LDAP in carbon based products.
+	This file contains necessary configurations to control the behavior of embedded LDAP.
+	You may use this file to enable, disable LDAP server, configure connection admin password, etc ...
+	In addition to embedded-ldap server configurations this file also has Kerberos KDC (Key Distribution Center)
+	specific configurations.
+-->
+
+<EmbeddedLDAPConfig>
+
+  <!--
+	LDAP server configurations
+	==========================
+	This section contains LDAP server specific configurations.
+
+	Property                Usage
+	=======                 ====
+	enable                  If true the embedded LDAP server will start when server starts up.
+				            Else embedded LDAP server will not start. Thus user has to use a different
+				            user store.
+	instanceid              An id given to the LDAP server instance.
+	connectionPassword      The password of the admin. (uid=admin,ou=system)
+	workingDirectory        Location where LDAP will store its schema files.
+	AdminEntryObjectClass   Object class which encapsulate attributes needed by claims.
+	allowAnonymousAccess    Should allow users to access LDAP server without credentials. Default false.
+	accessControlEnabled    Should access control be enabled among partitions. Default true.
+	saslHostName            Default host name to be used in SASL (Simple Authentication and Security Layer).
+				            This property comes from apacheds implementation itself.
+	saslPrincipalName       Default SASL principal name. Again this property also comes from apacheds implementation
+				            itself.
+  -->
+  <EmbeddedLDAP>
+    <Property name="enable">false</Property>
+    <Property name="port">${Ports.EmbeddedLDAP.LDAPServerPort}</Property>
+    <Property name="instanceId">default</Property>
+    <Property name="connectionPassword">admin</Property>
+    <Property name="workingDirectory">.</Property>
+    <Property name="AdminEntryObjectClass">wso2Person</Property>
+    <Property name="allowAnonymousAccess">false</Property>
+    <Property name="accessControlEnabled">true</Property>
+    <Property name="denormalizeOpAttrsEnabled">false</Property>
+    <Property name="maxPDUSize">2000000</Property>
+    <Property name="saslHostName">localhost</Property>
+    <Property name="saslPrincipalName">ldap/localhost@EXAMPLE.COM</Property>
+  </EmbeddedLDAP>
+
+  <!--
+	Default partition configurations
+	================================
+	When embedded LDAP server starts for the first time it will create a default partition.
+	Following properties configure values for the default partition.
+
+	Property                        Usage
+	=======                         =====
+	id                              Each partition is given an id. The id given to the default paritition.
+	realm                           Realm is the place where we store user principals and service principals.
+                                        The name of the realm for default partition.
+	kdcPassword                     This parameter is used when KDC (Key Distribution Center) is enabled. In apacheds
+                                        KDC also has a server principal. This defines a password for KDC server principal.
+	ldapServerPrinciplePassword     If LDAP server is also defined as a server principal, this will be the password.
+
+  -->
+  <DefaultPartition>
+    <Property name="id">root</Property>
+    <Property name="realm">wso2.org</Property>
+    <Property name="kdcPassword">secret</Property>
+    <Property name="ldapServerPrinciplePassword">randall</Property>
+  </DefaultPartition>
+
+  <!--
+	Default partition admin configurations
+	======================================
+	In a multi-tenant scenario each tenant will have a separate partition. Thus tenant admin will be the partition admin.
+	Following configurations define admin attributes for above created default partition.
+
+	Property            Usage
+	========            =====
+	uid                 UID attribute for partition admin.
+	commonName          The cn attribute for admin
+	lastName            The sn attribute for admin
+	email               The email attribute for admin
+	passwordType        The password hashing mechanism. Following hashing mechanisms are available, "SHA", "MD5".
+                        "Plaintext" is also a valid value. If KDC is enabled password type will be enforced to be
+                        plain text.
+  -->
+  <PartitionAdmin>
+    <Property name="uid">admin</Property>
+    <Property name="firstName">admin</Property>
+    <Property name="lastName">admin</Property>
+    <Property name="email">admin@wso2.com</Property>
+    <Property name="password">admin</Property>
+    <Property name="passwordType">SHA</Property>
+  </PartitionAdmin>
+
+  <!--
+	Default partition admin's group configuration
+	=============================================
+	Embedded LDAP is capable of keeping group information also.
+	If LDAP groups are enabled in user store (usr-mgt.xml) group information will be
+	recorded in a separate sub-context. Following configuration defines the group
+	properties.
+
+	Property                Usage
+	=======                 =====
+	adminRoleName		    The name of the role/group that admin should be included.
+	groupNameAttribute	    The attribute which group name will be recorded.
+	memberNameAttribute	    The attribute which memebers are recorded.
+  -->
+  <PartitionAdminGroup>
+    <Property name="adminRoleName">admin</Property>
+    <Property name="groupNameAttribute">cn</Property>
+    <Property name="memberNameAttribute">member</Property>
+  </PartitionAdminGroup>
+
+    <!--
+      KDC configurations
+      =================
+      Following configurations are applicable to KDC server. Generally, the KDC is only enabled in
+      Identity Server. You may enable KDC server if you wish to do so. But if you dont have any Kerberos specific
+      programs, it is recommended to disable KDC server.
+
+      Property                          Usage
+      =======                           =====
+      name                              Name given to default KDC server.
+      enabled                           If true a KDC server will start when starting LDAP server.
+                                          Else a KDC server will not start with a LDAP server.
+      protocol                          Default protocol to be used in KDC communication. Default is UDP.
+      maximumTicketLifeTime             The maximum life time of a ticket issued by the KDC.
+      maximumRenewableLifeTime          Life time which a ticket can be used by renewing it several times.
+      preAuthenticationTimeStampEnabled Pre-authentication is a feature in latest Kerberos protocol.
+                                          This property says whether to enable it or disable it.
+    -->
+  <KDCServer>
+    <Property name="name">defaultKDC</Property>
+    <Property name="enabled">false</Property>
+    <Property name="protocol">UDP</Property>
+    <Property name="host">localhost</Property>
+    <Property name="port">${Ports.EmbeddedLDAP.KDCServerPort}</Property>
+    <Property name="maximumTicketLifeTime">8640000</Property>
+    <Property name="maximumRenewableLifeTime">604800000</Property>
+    <Property name="preAuthenticationTimeStampEnabled">true</Property>
+  </KDCServer>
+
+</EmbeddedLDAPConfig>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/event-broker.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/event-broker.xml b/products/cloud_controller/modules/distribution/src/main/conf/event-broker.xml
new file mode 100644
index 0000000..0c242a0
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/event-broker.xml
@@ -0,0 +1,44 @@
+<!--
+this is the configuration file for the carbon event broker component. this configuration file configures the various subsystems of the event
+broker compoent and parameters.
+-->
+<eventBrokerConfig xmlns="http://wso2.org/carbon/event/broker">
+    <eventBroker name="carbonEventBroker" class = "org.wso2.carbon.event.core.internal.CarbonEventBrokerFactory">
+         <!-- topic manager implemenation class.-->
+        <topicManager name="TopicManager" class="org.wso2.carbon.event.core.internal.topic.registry.RegisistryTopicManagerFactory">
+            <!-- root node of the topic tree -->
+            <topicStoragePath>event/topics</topicStoragePath>
+        </topicManager>
+        <!-- subscriptionmnager implementaion. subscription manager persits the
+        subscriptions at the registry.  users can configure the topics root node and the topicIndex path -->
+        <subscriptionManager name="subscriptionManager"
+                             class="org.wso2.carbon.event.core.internal.subscription.registry.RegistrySubscriptionManagerFactory">
+            <topicStoragePath>event/topics</topicStoragePath>
+            <indexStoragePath>event/topicIndex</indexStoragePath>
+        </subscriptionManager>
+
+        <!-- delivary manager inmplementation. delivary manager does actual delivary part of the event broker -->
+        <deliveryManager name="deliveryManager"
+                         class="org.wso2.carbon.event.core.internal.delivery.jms.QpidJMSDeliveryManagerFactory"
+                         type="local">
+           <!--  <remoteMessageBroker>
+                <hostName>localhost</hostName>
+                <servicePort>9443</servicePort>
+                <webContext>/</webContext>
+                <userName>admin</userName>
+                <password>admin</password>
+                <qpidPort>5672</qpidPort>
+                <clientID>clientID</clientID>
+                <virtualHostName>carbon</virtualHostName>
+            </remoteMessageBroker> -->
+        </deliveryManager>
+
+         <!-- when publising an event event broker uses a seperate thread pool with an executor. following parameters configure different parameters of that -->
+        <eventPublisher>
+            <minSpareThreads>5</minSpareThreads>
+            <maxThreads>50</maxThreads>
+            <maxQueuedRequests>1000</maxQueuedRequests>
+            <keepAliveTime>1000</keepAliveTime>
+        </eventPublisher>
+    </eventBroker>
+</eventBrokerConfig>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/jaas.conf
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/jaas.conf b/products/cloud_controller/modules/distribution/src/main/conf/jaas.conf
new file mode 100644
index 0000000..7a2a295
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/jaas.conf
@@ -0,0 +1,10 @@
+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/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/log4j.properties b/products/cloud_controller/modules/distribution/src/main/conf/log4j.properties
new file mode 100644
index 0000000..73fe0eb
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/log4j.properties
@@ -0,0 +1,125 @@
+#
+#  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
+#
+#  Licensed 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 is the log4j configuration file used by WSO2 ESB
+# =====================================================
+#
+# IMPORTANT : Please do not remove or change the names of any of the Appenders defined here.
+# The layout pattern & log file can be changed using the WSO2 ESB Management Console, and those
+# settings will override the settings in this file.
+##
+
+##
+# WSO2 ESB is now able to create per-service trace logs at runtime. Thus while a message
+# is being processed through a Proxy service or the Synapse service (i.e. message mediation through
+# the 'main' sequence), tracing may be turned 'on' at any Proxy, Sequence or Mediator level. This
+# trace state 'flows' with the message - i.e from a trace enabled sequence to another sequence etc.
+# and applies to all mediators within a trace enabled sequence etc. unless another sequence or
+# mediator does not override and specify a different trace setting.
+##
+
+# the root category is ERROR (applies for all 3rd party JARs etc) and will be logged to the
+# LOG_APPENDER and the CONSOLE_APPENDER
+
+log4j.rootLogger=ERROR, CARBON_CONSOLE, CARBON_LOGFILE, ERROR_LOGFILE
+
+log4j.category.org.apache.synapse=INFO
+log4j.category.org.apache.synapse.transport=INFO
+log4j.category.org.apache.axis2=INFO
+log4j.category.org.apache.axis2.transport=INFO
+log4j.logger.com.atomikos=INFO,ATOMIKOS
+log4j.logger.org.quartz=WARN
+log4j.logger.org.wso2=INFO
+log4j.logger.org.wso2.carbon=INFO
+
+log4j.logger.org.apache.catalina=WARN
+log4j.logger.org.apache.synapse.endpoints.EndpointContext=ERROR
+log4j.logger.org.apache.coyote=WARN
+log4j.logger.org.apache.axis2.enterprise=FATAL
+log4j.logger.de.hunsicker.jalopy.io=FATAL
+
+# uncomment the following logs to see HTTP headers and messages
+#log4j.logger.org.apache.synapse.transport.nhttp.headers=DEBUG
+#log4j.logger.org.apache.synapse.transport.nhttp.wire=DEBUG
+
+#nhttp accesslogs
+log4j.logger.org.apache.synapse.transport.nhttp.access=INFO
+
+# qpid related logs for the message broker
+log4j.logger.qpid=FATAL
+log4j.logger.org.apache.qpid=FATAL
+
+# The console appender is used to display general information at console
+log4j.appender.CARBON_CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CARBON_CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d{ISO8601}] %5p - %c{1} %m%n
+
+# Configure the service logger at INFO level. Writes only run-time/mediation-time audit messages
+log4j.category.SERVICE_LOGGER=INFO, SERVICE_APPENDER
+log4j.additivity.SERVICE_LOGGER=false
+log4j.appender.SERVICE_APPENDER=org.apache.log4j.RollingFileAppender
+log4j.appender.SERVICE_APPENDER.File=repository/logs/${instance.log}/wso2-cc${instance.log}.log
+log4j.appender.SERVICE_APPENDER.MaxFileSize=1000KB
+log4j.appender.SERVICE_APPENDER.MaxBackupIndex=10
+log4j.appender.SERVICE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.SERVICE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
+
+# The trace logger dumps enough information @INFO level, but maybe pushed upto TRACE.
+# Writes only run-time/mediation time tracing/debug messages for messages passing through trace
+# enabled sequences, mediators and services. Enabling tracing on these has a performance impact
+log4j.category.TRACE_LOGGER=INFO, TRACE_APPENDER
+log4j.additivity.TRACE_LOGGER=false
+log4j.appender.TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.TRACE_APPENDER.File=repository/logs/${instance.log}/wso2-cc-trace${instance.log}.log
+log4j.appender.TRACE_APPENDER.Append=true
+log4j.appender.TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
+
+# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout.
+log4j.appender.CARBON_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+# Log file will be overridden by the configuration setting in the DB
+# This path should be relative to WSO2 Carbon Home
+log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log
+log4j.appender.CARBON_LOGFILE.Append=true
+log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n
+log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_LOGFILE.threshold=DEBUG
+
+# The standard error log where all the warnings, errors and fatal errors will be logged
+log4j.appender.ERROR_LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.ERROR_LOGFILE.File=repository/logs/${instance.log}/wso2-cc-errors.log
+log4j.appender.ERROR_LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.ERROR_LOGFILE.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
+log4j.appender.ERROR_LOGFILE.threshold=WARN
+
+log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_CONSOLE
+log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_CONSOLE
+log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_CONSOLE
+log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_CONSOLE
+log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_CONSOLE
+
+# Appender config to send Atomikos transaction logs to new log file tm.out.
+log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender
+log4j.appender.ATOMIKOS.File = repository/logs/tm.out
+log4j.appender.ATOMIKOS.Append = true
+log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout
+log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n
+log4j.additivity.com.atomikos=false
+
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/rule-component.conf
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/rule-component.conf b/products/cloud_controller/modules/distribution/src/main/conf/rule-component.conf
new file mode 100644
index 0000000..1bd6c09
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/rule-component.conf
@@ -0,0 +1,3 @@
+<RuleServer>
+    <RuleEngineProvider class="org.wso2.carbon.rule.engine.jsr94.JSR94BackendRuntimeFactory"/>
+</RuleServer>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/registry.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/registry.xml b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/registry.xml
new file mode 100644
index 0000000..b19a4c8
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/registry.xml
@@ -0,0 +1,25 @@
+<?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.
+  -->
+
+<!-- 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/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/errorHandler.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/errorHandler.xml b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/errorHandler.xml
new file mode 100644
index 0000000..62c31a6
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/errorHandler.xml
@@ -0,0 +1,30 @@
+<?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.
+  -->
+    <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/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml
new file mode 100644
index 0000000..e8ead4a
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml
@@ -0,0 +1,109 @@
+<?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.
+  -->
+
+<!-- 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/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/conf/zoo.cfg
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/conf/zoo.cfg b/products/cloud_controller/modules/distribution/src/main/conf/zoo.cfg
new file mode 100644
index 0000000..57927f2
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/conf/zoo.cfg
@@ -0,0 +1,3 @@
+tickTime=2000
+dataDir=repository/data/zookeeper
+clientPort=2182

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/log4j.properties b/products/cloud_controller/modules/distribution/src/main/resources/log4j.properties
new file mode 100644
index 0000000..0bb1e42
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/resources/log4j.properties
@@ -0,0 +1,193 @@
+#
+# Copyright 2009 WSO2, Inc. (http://wso2.com)
+#
+# Licensed 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 is the log4j configuration file used by WSO2 Carbon
+#
+# IMPORTANT : Please do not remove or change the names of any
+# of the Appenders defined here. The layout pattern & log file
+# can be changed using the WSO2 Carbon Management Console, and those
+# settings will override the settings in this file.
+#
+
+log4j.rootLogger=INFO, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG
+
+log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE
+log4j.logger.org.apache.axis2.wsdl.codegen.writer.PrettyPrinter=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.axis2.clustering=INFO, CARBON_CONSOLE, CARBON_LOGFILE
+log4j.logger.org.apache=INFO, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.catalina=WARN
+log4j.logger.org.apache.tomcat=WARN
+log4j.logger.org.wso2.carbon.apacheds=WARN
+log4j.logger.org.apache.directory.server.ldap=WARN
+log4j.logger.org.apache.directory.server.core.event=WARN
+log4j.logger.com.atomikos=INFO,ATOMIKOS
+log4j.logger.org.quartz=WARN
+log4j.logger.org.apache.jackrabbit.webdav=WARN
+log4j.logger.org.apache.juddi=ERROR
+log4j.logger.org.apache.commons.digester.Digester=WARN
+log4j.logger.org.apache.jasper.compiler.TldLocationsCache=WARN
+log4j.logger.org.apache.qpid=WARN
+log4j.logger.org.apache.qpid.server.Main=INFO
+log4j.logger.qpid.message=WARN
+log4j.logger.qpid.message.broker.listening=INFO
+log4j.logger.org.apache.tiles=WARN
+log4j.logger.org.apache.commons.httpclient=ERROR
+log4j.logger.org.apache.coyote=WARN
+log4j.logger.org.apache.solr=ERROR
+log4j.logger.org.infinispan=WARN
+log4j.logger.org.jgroups=ERROR
+log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=ERROR
+log4j.logger.org.wso2=INFO
+log4j.logger.org.apache.axis2.enterprise=FATAL, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.opensaml.xml=WARN, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_LOGFILE, CARBON_MEMORY 
+#Following are to remove false error messages from startup (IS)
+log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.core.DefaultDirectoryService=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.core=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+#Hive Related Log configurations
+log4j.logger.DataNucleus=ERROR
+log4j.logger.Datastore=ERROR
+log4j.logger.Datastore.Schema=ERROR
+log4j.logger.JPOX.Datastore=ERROR
+log4j.logger.JPOX.Plugin=ERROR
+log4j.logger.JPOX.MetaData=ERROR
+log4j.logger.JPOX.Query=ERROR
+log4j.logger.JPOX.General=ERROR
+log4j.logger.JPOX.Enhancer=ERROR
+log4j.logger.org.apache.hadoop.hive=WARN
+log4j.logger.hive=WARN
+log4j.logger.ExecMapper=WARN
+log4j.logger.ExecReducer=WARN
+
+#cassandra specific
+
+log4j.logger.org.apache.cassandra.db=WARN
+log4j.logger.org.apache.cassandra.service=WARN
+log4j.logger.org.apache.cassandra.thrift=WARN
+log4j.logger.org.apache.cassandra.io.sstable=WARN
+log4j.logger.org.apache.cassandra.utils=WARN
+#log4j.logger.org.apache.cassandra.io.sstable=WARN
+#log4j.logger.org.apache.cassandra.io.sstable=WARN
+
+
+
+#andes specific
+log4j.logger.org.wso2.andes.server.handler.ConnectionStartOkMethodHandler=WARN
+log4j.logger.org.wso2.andes.server.handler.ChannelOpenHandler=WARN
+log4j.logger.org.wso2.andes.server.handler.ChannelCloseHandler=WARN
+log4j.logger.org.wso2.andes.server.AMQChannel=WARN
+log4j.logger.org.wso2.andes.server.handler.ConnectionCloseMethodHandler=WARN
+log4j.logger.org.wso2.andes.server.handler.QueueDeclareHandler=WARN
+log4j.logger.org.wso2.andes.server.handler.QueueBindHandler=WARN
+log4j.logger.org.wso2.andes.server.virtualhost.VirtualHostConfigRecoveryHandler=WARN
+log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE
+
+log4j.additivity.org.apache.axis2.clustering=false
+log4j.additivity.com.atomikos=false
+
+# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CARBON_CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CARBON_CONSOLE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m%n
+log4j.appender.CARBON_CONSOLE.layout.TenantPattern=%U%@%D[%T]
+log4j.appender.CARBON_CONSOLE.threshold=DEBUG
+
+
+# The memory appender for logging
+log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.appender.CarbonMemoryAppender
+log4j.appender.CARBON_MEMORY.bufferSize=2000
+log4j.appender.CARBON_MEMORY.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_MEMORY.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n
+log4j.appender.CARBON_MEMORY.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_MEMORY.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
+log4j.appender.CARBON_MEMORY.threshold=DEBUG
+
+# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout.
+log4j.appender.CARBON_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+# Log file will be overridden by the configuration setting in the DB
+# This path should be relative to WSO2 Carbon Home
+log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log
+log4j.appender.CARBON_LOGFILE.Append=true
+log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n
+log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_LOGFILE.threshold=DEBUG
+
+log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender
+log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout
+log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p {%c} - %x %m {%c}%n
+log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost
+log4j.appender.CARBON_SYS_LOG.Facility=USER
+log4j.appender.CARBON_SYS_LOG.threshold=DEBUG
+
+# CASSANDRA is set to be a CassandraAppender using a PatternLayout to send logs to cassandra keyspace
+log4j.appender.CASSANDRA=org.wso2.carbon.logging.appender.LogEventAppender
+log4j.appender.CASSANDRA.keyspace=LogEntry
+log4j.appender.CASSANDRA.colFamily=logs
+log4j.appender.CASSANDRA.url=localhost:9160
+log4j.appender.CASSANDRA.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.CASSANDRA.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%Stacktrace
+
+# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT 
+log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender
+log4j.appender.LOGEVENT.url=tcp://10.100.3.103:7611
+log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
+log4j.appender.LOGEVENT.userName=admin
+log4j.appender.LOGEVENT.password=admin
+
+# Appender config to CARBON_TRACE_LOGFILE
+log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log
+log4j.appender.CARBON_TRACE_LOGFILE.Append=true
+log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m {%c}%n
+log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE
+log4j.additivity.trace.messages=false
+
+# Appender config to AUDIT_LOGFILE
+log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log
+log4j.appender.AUDIT_LOGFILE.Append=true
+log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n
+log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.AUDIT_LOGFILE.threshold=INFO
+log4j.additivity.AUDIT_LOG=false
+
+# Appender config to send Atomikos transaction logs to new log file tm.out.
+log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender
+log4j.appender.ATOMIKOS.File = repository/logs/tm.out
+log4j.appender.ATOMIKOS.Append = true
+log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout
+log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n
+
+# This file is used to override the default logger settings, and is used to remove unwanted logs from Shindig appearing on the console.
+
+# Specification of Handler used by Console Logger
+handlers=java.util.logging.ConsoleHandler
+
+# Replacing default INFO level with SEVERE
+java.util.logging.ConsoleHandler.level=SEVERE

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat b/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
new file mode 100644
index 0000000..402c7bb
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
@@ -0,0 +1,274 @@
+@echo off
+
+REM ---------------------------------------------------------------------------
+REM        Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM
+REM  Licensed under the Apache License, Version 2.0 (the "License");
+REM  you may not use this file except in compliance with the License.
+REM  You may obtain a copy of the License at
+REM
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM  Unless required by applicable law or agreed to in writing, software
+REM  distributed under the License is distributed on an "AS IS" BASIS,
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM  See the License for the specific language governing permissions and
+REM  limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Main Script for WSO2 Carbon
+rem
+rem Environment Variable Prequisites
+rem
+rem   CARBON_HOME   Home of CARBON installation. If not set I will  try
+rem                   to figure it out.
+rem
+rem   JAVA_HOME       Must point at your Java Development Kit installation.
+rem
+rem   JAVA_OPTS       (Optional) Java runtime options used when the commands
+rem                   is executed.
+rem ---------------------------------------------------------------------------
+
+rem ----- if JAVA_HOME is not set we're not happy ------------------------------
+:checkJava
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto checkServer
+
+:noJavaHome
+echo "You must set the JAVA_HOME variable before running CARBON."
+goto end
+
+rem ----- Only set CARBON_HOME if not already set ----------------------------
+:checkServer
+rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
+if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
+SET curDrive=%cd:~0,1%
+SET wsasDrive=%CARBON_HOME:~0,1%
+if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
+
+rem find CARBON_HOME if it does not exist due to either an invalid value passed
+rem by the user or the %0 problem on Windows 9x
+if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome
+
+set AXIS2_HOME=%CARBON_HOME%
+goto updateClasspath
+
+:noServerHome
+echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
+goto end
+
+rem ----- update classpath -----------------------------------------------------
+:updateClasspath
+
+setlocal EnableDelayedExpansion
+cd %CARBON_HOME%
+set CARBON_CLASSPATH=
+FOR %%C in ("%CARBON_HOME%\bin\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\%%~nC%%~xC"
+
+set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%;
+
+rem ----- Process the input command -------------------------------------------
+
+rem Slurp the command line arguments. This loop allows for an unlimited number
+rem of arguments (up to the command line limit, anyway).
+
+
+:setupArgs
+if ""%1""=="""" goto doneStart
+if ""%1""==""-start""   goto startWinService
+if ""%1""==""--start""  goto startWinService
+if ""%1""==""start""    goto startWinService
+
+if ""%1""==""-run""     goto commandLifecycle
+if ""%1""==""--run""    goto commandLifecycle
+if ""%1""==""run""      goto commandLifecycle
+
+if ""%1""==""-restart""  goto commandLifecycle
+if ""%1""==""--restart"" goto commandLifecycle
+if ""%1""==""restart""   goto commandLifecycle
+
+if ""%1""==""-stop""    goto stopWinService
+if ""%1""==""--stop""   goto stopWinService
+if ""%1""==""stop""     goto stopWinService
+
+if ""%1""==""debug""    goto commandDebug
+if ""%1""==""-debug""   goto commandDebug
+if ""%1""==""--debug""  goto commandDebug
+
+if ""%1""==""version""   goto commandVersion
+if ""%1""==""-version""  goto commandVersion
+if ""%1""==""--version"" goto commandVersion
+
+shift
+goto setupArgs
+
+rem ----- commandVersion -------------------------------------------------------
+:commandVersion
+shift
+type "%CARBON_HOME%\bin\version.txt"
+type "%CARBON_HOME%\bin\wso2carbon-version.txt"
+goto end
+
+rem ----- commandDebug ---------------------------------------------------------
+:commandDebug
+shift
+set DEBUG_PORT=%1
+if "%DEBUG_PORT%"=="" goto noDebugPort
+if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option.
+set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
+echo Please start the remote debugging client to continue...
+goto findJdk
+
+:noDebugPort
+echo Please specify the debug port after the --debug option
+goto end
+
+rem ----- commandLifecycle -----------------------------------------------------
+:commandLifecycle
+goto findJdk
+
+rem ----- doneStart ------------------------------------------------------------
+rem This label provides a place for the argument list loop to break out
+rem and for NT handling to skip to.
+
+:doneStart
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+rem ---------- Handle the SSL Issue with proper JDK version --------------------
+rem find the version of the jdk
+:findJdk
+
+set CMD=RUN %*
+
+:checkJdk16
+"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[6|7]" >NUL
+IF ERRORLEVEL 1 goto unknownJdk
+goto jdk16
+
+:unknownJdk
+echo Starting WSO2 Carbon (in unsupported JDK)
+echo [ERROR] CARBON is supported only on JDK 1.6 and 1.7
+goto jdk16
+
+:jdk16
+goto runServer
+
+rem ----------------- Execute The Requested Command ----------------------------
+
+:runServer
+cd %CARBON_HOME%
+
+rem ---------- Add jars to classpath ----------------
+
+set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
+
+set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
+
+set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -DandesConfig=qpid-config.xml -Ddisable.cassandra.server.startup=true -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\log4j.properties" -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcarbon.logs.path="%CARBON_HOME%\repository\logs" -Dcomponents.repo="%CARBON_HOME%\repos
 itory\components" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH%
+
+:runJava
+echo JAVA_HOME environment variable is set to %JAVA_HOME%
+echo CARBON_HOME environment variable is set to %CARBON_HOME%
+"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.bootstrap.Bootstrap %CMD%
+if "%ERRORLEVEL%"=="121" goto runJava
+:end
+goto endlocal
+
+:startWinService
+rem
+rem Locating Carbon Home
+rem
+rem %~dp0 is the location of this script under NT
+set _REALPATH=%~dp0..\
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_DIR=%_REALPATH%bin\native\
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+rem
+rem Locating wrapper.conf
+rem
+:conf
+set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
+rem
+
+rem Starting the Carbon Windows service.
+rem
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF% 2>&1 | findstr "failed" >NUL
+if not errorlevel 1 goto install
+echo The Carbon Windows Service is now running.
+goto endlocal
+
+:install
+echo The Carbon Windows Service is not installed. Would you like to install it now? (y/n)
+set INPUT=
+set /P INPUT=Type input: %=%
+if "%INPUT%"=="" goto install
+if "%INPUT%"=="n" goto noservice
+echo Installing Windows service
+"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
+echo The Carbon Windows Service is now running.
+goto endlocal
+
+rem If we reached here, it means that the service has failed.
+echo [ERROR] Failed to start the Carbon Windows Service.
+
+:noservice
+echo Sorry. You can't use -start or -stop without installing the Windows service.
+goto endlocal
+
+:stopWinService
+rem
+rem Locating Carbon Home
+rem
+rem %~dp0 is the location of this script under NT
+set _REALPATH=%~dp0..\
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_DIR=%_REALPATH%bin\native\
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+goto :eof
+
+rem
+rem Locating wrapper.conf
+rem
+:conf
+set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
+rem
+rem Stopping the Carbon Windows service.
+rem
+"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
+echo The Carbon Windows Service is now stopped.
+goto endlocal
+
+rem If we reached here, it means that the service has failed.
+echo [ERROR] Failed to stop the Carbon Windows Service.
+
+:endlocal
+
+:END

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/css/mb-docs.css
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/css/mb-docs.css b/products/cloud_controller/modules/distribution/src/site/resources/css/mb-docs.css
new file mode 100644
index 0000000..ef45164
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/site/resources/css/mb-docs.css
@@ -0,0 +1,173 @@
+body {
+    color: #000;
+    font-size: 11px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    background-image: url( ../images/mb-docs-bg.gif );
+    background-repeat: repeat-x;
+    background-attachment: scroll;
+    background-position: left top;
+    text-decoration: none;
+    text-align: left;
+    padding: 0px;
+    list-style-type: square;
+    list-style-position: outside;
+}
+
+div#banner {
+	background-image: url(../images/mb-docs-header.gif);
+	background-repeat: no-repeat;
+	background-position: left top;
+	height: 38px;
+	padding-top: 30px;
+	padding-left: 265px;
+	border-bottom: 0px;
+}
+
+div#banner	span#bannerLeft {
+	font-size: 180%;
+	color: #A80063;
+}
+
+div#breadcrumbs {
+	background-color: transparent;
+	border-top: solid 0px;
+	border-bottom: solid 0px;
+	height: 23px;
+	padding-top: 5px;
+	padding-left: 20px;
+	padding-right: 20px;
+}
+
+div#leftColumn {
+	margin-left: 0px;
+	margin-top: 0px;
+	border-top: 0px;
+	background-color: #F7F7F7;
+	border-left: solid 0px;
+	border-right: solid 1px #A80063;
+	border-bottom: solid 1px #A80063;
+}
+
+div#leftColumn div#navcolumn {
+	padding-left: 20px;
+	padding-right: 20px;
+	padding-top: 15px;
+	background-color: #F7F7F7;
+}
+
+
+div#contentBox {
+	margin-top: 10px;
+	margin-bottom: 15px;
+	font-size: 12px;
+}
+
+div#navcolumn h5 {
+	margin-bottom: 2px;
+	padding-bottom: 2px;
+	border-bottom: solid 1px #A80063;
+	font-size: 110%;
+}
+
+#navcolumn li {
+	padding-top: 2px;
+	padding-bottom: 2px;
+}
+
+p {
+}
+
+td {
+    background-color: #f8f8f8;
+    padding: 3px 5px;
+    outline-color: gray;
+    outline-width: 0;
+}
+
+a:link {
+    color: #36c;
+}
+
+a:visited {
+}
+
+a:hover {
+    color: #7f7f7f;
+}
+
+a:active {
+}
+
+body, td, select, input, li  {
+	line-height: 18px;
+}
+
+h1 {
+    color: #333;
+    font-size: 18px;
+    font-weight: bold;
+    font-style: normal;
+    line-height: normal;
+    background-image: none;
+    background-repeat: no-repeat;
+    background-attachment: scroll;
+    background-position: left top;
+    text-decoration: none;
+    height: 30px;
+    padding-bottom: 2px;
+    border-bottom: 1px solid #A80063;
+}
+
+h2 {
+    color: black;
+    font-size: 15px;
+    font-weight: bold;
+    line-height: 24px;
+    border-bottom: 0px;
+    border-left: solid 1px #ccc;
+    border-right: solid 1px #ccc;
+    border-top: 0px;
+    background-color: #B5B5B5;
+    padding-left: 5px;
+    padding-top: 0px;
+    padding-bottom: 0px; 
+    color: #fff;
+}
+
+h3 {
+    color: #3a3a3a;
+    font-size: 12px;
+    font-weight: bold;
+    padding-top: 10px;
+    padding-bottom: 4px;
+    padding-left: 10px;
+    border-left: 0px;
+    border-right: 0px;
+    border-top: 0px;
+    border-bottom: 1px solid #ccc;
+    background-image: url(../images/table-header.gif);
+    background-position: left bottom;
+    background-repeat: repeat-x;
+    background-color: transparent;
+}
+
+table {
+    background-color: #cbcbcb;
+    margin: 0;
+    padding: 1px;
+    border-style: solid;
+    border-width: 0;
+}
+
+th {
+    padding-left: 5px;
+}
+
+img {
+    background-color: gray;
+    padding: 1px;
+}
+div#footer {
+	background-color: #ccc;
+	padding-right: 20px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/Deployment_Diagram.jpg
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/Deployment_Diagram.jpg b/products/cloud_controller/modules/distribution/src/site/resources/images/Deployment_Diagram.jpg
new file mode 100644
index 0000000..147d881
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/Deployment_Diagram.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/Login.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/Login.png b/products/cloud_controller/modules/distribution/src/site/resources/images/Login.png
new file mode 100644
index 0000000..4cc00c2
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/Login.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/MessageFlowDiagram.jpg
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/MessageFlowDiagram.jpg b/products/cloud_controller/modules/distribution/src/site/resources/images/MessageFlowDiagram.jpg
new file mode 100644
index 0000000..13c1aba
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/MessageFlowDiagram.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/MessageQueue.jpg
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/MessageQueue.jpg b/products/cloud_controller/modules/distribution/src/site/resources/images/MessageQueue.jpg
new file mode 100644
index 0000000..e790a89
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/MessageQueue.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_01.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_01.png b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_01.png
new file mode 100644
index 0000000..7c29a1e
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_01.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_04.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_04.png b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_04.png
new file mode 100644
index 0000000..1919328
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_04.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_05.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_05.png b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_05.png
new file mode 100644
index 0000000..cdd84ca
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/cluster_scenario_05.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/listMessageBoxes.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/listMessageBoxes.png b/products/cloud_controller/modules/distribution/src/site/resources/images/listMessageBoxes.png
new file mode 100644
index 0000000..ce9332e
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/listMessageBoxes.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/logs.PNG
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/logs.PNG b/products/cloud_controller/modules/distribution/src/site/resources/images/logs.PNG
new file mode 100644
index 0000000..9204327
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/logs.PNG differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/mb-docs-header.gif
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/mb-docs-header.gif b/products/cloud_controller/modules/distribution/src/site/resources/images/mb-docs-header.gif
new file mode 100644
index 0000000..aabe107
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/mb-docs-header.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/retrieveMessage.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/retrieveMessage.png b/products/cloud_controller/modules/distribution/src/site/resources/images/retrieveMessage.png
new file mode 100644
index 0000000..e6de6b2
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/retrieveMessage.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/set-java-home.jpg
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/set-java-home.jpg b/products/cloud_controller/modules/distribution/src/site/resources/images/set-java-home.jpg
new file mode 100644
index 0000000..d23d544
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/set-java-home.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/storeConfig.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/storeConfig.png b/products/cloud_controller/modules/distribution/src/site/resources/images/storeConfig.png
new file mode 100644
index 0000000..ebd4ab1
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/storeConfig.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_AddTopicFromDetails.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_AddTopicFromDetails.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_AddTopicFromDetails.png
new file mode 100644
index 0000000..6104538
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_AddTopicFromDetails.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_add.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_add.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_add.png
new file mode 100644
index 0000000..94a22e2
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_add.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser.png
new file mode 100644
index 0000000..2d113f5
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser_clicked.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser_clicked.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser_clicked.png
new file mode 100644
index 0000000..7388a28
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_browser_clicked.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_details.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_details.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_details.png
new file mode 100644
index 0000000..1933f29
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_details.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/topic_subscriptionDetails.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/topic_subscriptionDetails.png b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_subscriptionDetails.png
new file mode 100644
index 0000000..c3c5f82
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/topic_subscriptionDetails.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0ab7c4aa/products/cloud_controller/modules/distribution/src/site/resources/images/userguide_state_1.png
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/resources/images/userguide_state_1.png b/products/cloud_controller/modules/distribution/src/site/resources/images/userguide_state_1.png
new file mode 100644
index 0000000..3f81b02
Binary files /dev/null and b/products/cloud_controller/modules/distribution/src/site/resources/images/userguide_state_1.png differ