You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/03/20 13:51:04 UTC

[09/33] applying Pradeep's patches for https://issues.apache.org/jira/browse/STRATOS-523 - single jvm

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/assembly/bin.xml
index 0000000,0000000..f3421b8
new file mode 100755
--- /dev/null
+++ b/products/stratos/modules/distribution/src/assembly/bin.xml
@@@ -1,0 -1,0 +1,719 @@@
++<!--
++  ~ 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.
++  -->
++<assembly>
++    <!--<id>bin</id>-->
++    <formats>
++        <format>zip</format>
++    </formats>
++    <includeBaseDirectory>false</includeBaseDirectory>
++
++    <fileSets>
++        <fileSet>
++            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <excludes>
++                <exclude>**/*.sh</exclude>
++		<exclude>**/wso2server.bat</exclude>
++                <exclude>**/axis2services/sample01.aar</exclude>
++                <exclude>**/axis2services/echo/**</exclude>
++                <exclude>**/axis2services/version/**</exclude>
++                <exclude>**/pom.xml</exclude>
++                <exclude>**/version.txt</exclude>
++                <exclude>**/INSTALL.txt</exclude>
++                <exclude>**/LICENSE.txt</exclude>
++                <exclude>**/NOTICE</exclude>
++                <exclude>**/release-notes.html</exclude>
++                <exclude>**/carbon.xml</exclude>
++                <exclude>**/README*</exclude>
++		<!--Removing relying party ui bundle to fix STRATOS-1149 -->
++                <exclude>**/org.wso2.carbon.identity.relyingparty.ui_4.1.0-SNAPSHOT.jar</exclude>
++                <exclude>**/org.wso2.carbon.identity.relyingparty.stub_4.1.0-SNAPSHOT.jar</exclude>
++		<!--Removing roles mgt ui to fix STRATOS-2114-->
++                <exclude>**/org.wso2.carbon.roles.mgt.ui_4.1.0-SNAPSHOT.jar</exclude>
++                <exclude>**/org.wso2.carbon.roles.mgt.stub_4.1.0-SNAPSHOT.jar</exclude>
++                <exclude>**/log4j.properties</exclude>
++                <exclude>**/repository/components/**</exclude>
++                <exclude>**/dbscripts/mysql.sql</exclude>
++                <exclude>**/repository/conf/security/cipher-tool.properties</exclude>
++                <exclude>**/repository/conf/security/cipher-text.properties</exclude>
++		<exclude>**/repository/conf/axis2/axis2.xml</exclude>
++		<exclude>**/repository/conf/log4j.properties</exclude>
++		<exclude>**/repository/conf/data-bridge/**</exclude>
++            </excludes>
++        </fileSet>
++	<!-- Copying p2 profile and osgi bundles-->
++	<fileSet>
++	    <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/components</directory>
++	    <outputDirectory>${pom.artifactId}-${pom.version}/repository/components</outputDirectory>
++	    <excludes>
++	        <exclude>**/eclipse.ini</exclude>
++	        <exclude>**/*.lock</exclude>
++	        <exclude>**/.data</exclude>
++	        <exclude>**/.settings</exclude>
++	        <exclude>**/org.wso2.store.sso.common_1.0.0.jar</exclude>
++	        <exclude>**/org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</exclude>
++	        <exclude>**/org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</exclude>
++	    </excludes>
++	</fileSet>
++        <fileSet>
++        <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps</directory>
++        <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps</outputDirectory>
++            <excludes>
++                <exclude>**/publisher/**</exclude>
++                <exclude>**/store/**</exclude>
++                <exclude>**/store-admin/**</exclude>
++                <exclude>**/storage/**</exclude>
++                <exclude>**/social/**</exclude>
++                <exclude>**/sso/views/login.jag</exclude>
++            </excludes>
++        </fileSet>
++        <fileSet>
++            <directory>target/shopping-cart-global-${shoppingcart.global.version}</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/samples/bin</outputDirectory>
++            <includes>
++                <include>**/*.car</include>
++                <include>**/*.properties</include>
++            </includes>
++        </fileSet>
++        <fileSet>
++            <directory>../../../../components/org.apache.stratos.manager.console/console</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/console</outputDirectory>
++            <excludes>
++                <exclude>**/README</exclude>
++            </excludes>
++	 </fileSet>
++         <fileSet>
++            <directory>../../../../components/org.apache.stratos.manager.console/sso</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso</outputDirectory>
++        </fileSet>
++         <fileSet>
++            <directory>../../../../components/org.apache.stratos.manager.console/modules/console</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/modules/console</outputDirectory>
++        </fileSet>
++        <fileSet>
++            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <excludes>
++                <exclude>**/daemon.sh</exclude>
++		<exclude>**/log4j.properties</exclude>
++		<exclude>**/wso2server.sh</exclude>
++		<exclude>**/wso2server.bat</exclude>
++            </excludes>
++            <includes>
++                <include>**/*.sh</include>
++                <include>**/native/*</include>
++            </includes>
++            <fileMode>755</fileMode>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf/synapse-configs</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/synapse-configs
++            </outputDirectory>
++        </fileSet>
++        <fileSet>
++            <directory>../../conf</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++            <includes>
++                <include>**/*</include>
++            </includes>
++            <excludes>
++                <exclude>**/samples-desc.xml</exclude>
++                <exclude>**/identity.xml</exclude>
++                <exclude>**/user-mgt.xml</exclude>
++                <exclude>**/datasources.properties</exclude>
++                <exclude>.svn</exclude>
++                <exclude>**/temp-artifacts/**</exclude>
++                <exclude>email-bill-generated.xml</exclude>
++                <exclude>email-billing-notifications.xml</exclude>
++                <exclude>email-new-tenant-activation.xml</exclude>
++                <exclude>email-new-tenant-registration.xml</exclude>
++                <exclude>email-password-reset.xml</exclude>
++                <exclude>email-payment-received-customer.xml</exclude>
++				<exclude>email-registration-payment-received-customer.xml</exclude>
++                <exclude>email-payment-received-wso2.xml</exclude>
++                <exclude>email-registration-complete.xml</exclude>
++                <exclude>email-registration-moderation.xml</exclude>
++                <exclude>email-registration.xml</exclude>
++                <exclude>email-update.xml</exclude>
++		<exclude>tenant-reg-agent.xml</exclude>
++                <exclude>features-dashboard.xml</exclude>
++                <exclude>data-bridge-config.xml</exclude>
++                <exclude>thrift-agent-config.xml</exclude>
++            </excludes>
++        </fileSet>
++        <fileSet>
++            <directory>../../conf</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/email</outputDirectory>
++            <includes>
++                <include>email-bill-generated.xml</include>
++                <include>email-billing-notifications.xml</include>
++                <include>email-new-tenant-activation.xml</include>
++                <include>email-new-tenant-registration.xml</include>
++                <include>email-password-reset.xml</include>
++                <include>email-payment-received-customer.xml</include>
++                <include>email-registration-payment-received-customer.xml</include>
++				<include>email-payment-received-wso2.xml</include>
++                <include>email-registration-complete.xml</include>
++                <include>email-registration-moderation.xml</include>
++                <include>email-registration.xml</include>
++                <include>email-update.xml</include>
++            </includes>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy</outputDirectory>
++            <includes>
++                <include>tenant-reg-agent.xml</include>
++                <include>features-dashboard.xml</include>
++            </includes>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/datasources</outputDirectory>
++            <includes>
++                <include>stratos-datasources.xml</include>
++            </includes>
++        </fileSet>
++
++        <!-- Copying themes, cloud icons-->
++         <fileSet>
++            <directory>../../resources</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/resources</outputDirectory>
++            <fileMode>755</fileMode>
++            <includes>
++                <include>allthemes/**</include>
++                <include>powerded-by-logos/**</include>
++            </includes>
++            <excludes>
++                <exclude>.svn</exclude>
++            </excludes>
++        </fileSet>
++
++        <!--start BAM related files -->
++        <!--<fileSet>
++            <directory>resources/dataservices</directory>
++            <outputDirectory>
++                ${pom.artifactId}-${pom.version}/repository/deployment/server/dataservices
++            </outputDirectory>
++            <includes>
++                <include>*.dbs</include>
++                <include>*.xml</include>
++            </includes>
++        </fileSet>
++        <fileSet>
++            <directory>resources/dataservices/bam</directory>
++            <outputDirectory>
++                ${pom.artifactId}-${pom.version}/repository/deployment/server/dataservices
++            </outputDirectory>
++            <includes>
++                <include>*.dbs</include>
++                <include>*.xml</include>
++            </includes>
++        </fileSet>-->
++
++        <fileSet>
++            <directory>resources</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources</outputDirectory>
++            <includes>
++                <include>**/*</include>
++            </includes>
++        </fileSet>
++	<!--fileSet>
++            <directory>resources/dbscripts</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/</outputDirectory>
++            <includes>
++                <include>**/*</include>
++            </includes>
++        </fileSet-->
++        <!--end BAM related files -->
++
++	<!--qpid related files -->
++	<fileSet>
++           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/advanced/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/advanced</outputDirectory>
++	   <includes>
++               <include>**/*</include>
++           </includes>
++	    <excludes>
++                <exclude>**/jmx.xml</exclude>
++		<exclude>**/tenant-axis2.xml</exclude>
++		<exclude>**/authenticators.xml</exclude>
++		<exclude>**/logging-config.xml</exclude>
++            </excludes>
++        </fileSet>
++	<!-- end of qpid related files -->
++
++	<!-- adc.mgt related files -->
++	<fileSet>
++           <!--directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory-->
++	   <directory>src/main/conf/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++	   <includes>
++               <include>cartridge-config.properties</include>
++               <include>policies.xml</include>
++           </includes>
++        </fileSet>
++        <fileSet>
++           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
++	   <includes>
++               <include>policies.xsd</include>
++           </includes>
++        </fileSet>
++	<!-- end of adc.mgt related files -->
++
++	<!-- axis2.xml -->
++	<fileSet>
++           <directory>src/main/conf/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2</outputDirectory>
++           <includes>
++               <include>axis2.xml</include>
++           </includes>
++        </fileSet>
++
++	 <fileSet>
++           <directory>../p2-profile/target/wso2carbon-core-${carbon.platform.version}/repository/conf/etc/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
++           <includes>
++               <include>**/cassandra.yaml</include>
++           </includes>
++        </fileSet>
++	<fileSet>
++           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
++	   <includes>
++       		<include>**/identity.xml</include>
++		<include>**/rule-engine-config.xml</include>
++           </includes>
++        </fileSet>
++
++	<fileSet>
++           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/</directory>
++           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy/</outputDirectory>
++           <includes>
++                <include>**/multitenancy-packages.xml</include>
++                <include>**/stratos.xml</include>
++                <include>**/eula.xml</include>
++                <include>**/usage-throttling-agent-config.xml</include>
++		<!--include>**/cloud-services-desc.xml</include-->
++           </includes>
++        </fileSet>
++
++		<!-- copy the landing page webapp -->
++        <fileSet>
++			<directory>lib/home</directory>
++			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/STRATOS_ROOT</outputDirectory>
++		</fileSet>
++
++		<fileSet>
++			<directory>../../modules/features-dashboard/target/</directory>
++			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
++			<includes>
++				<include>**/*.war</include>
++			</includes>
++		</fileSet>
++        <fileSet>
++			<directory>../../resources/cloud-services-icons/target/</directory>
++			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
++			<includes>
++				<include>**/*.war</include>
++			</includes>
++		</fileSet>
++		<fileSet>
++	        	<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/</directory>
++        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/identity</outputDirectory>
++            	<includes>
++                	<include>**/**.sql</include>
++            	</includes>
++		</fileSet>
++
++        <!-- copy cxf runtime -->
++        <fileSet>
++            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/lib/runtimes</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/lib/runtimes/</outputDirectory>
++            <includes>
++                <include>*/**</include>
++            </includes>
++        </fileSet>
++
++        <!-- copy jaggery modules -->
++        <fileSet>
++            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/modules</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/modules</outputDirectory>
++	    <excludes>
++                <exclude>**/carbon/**</exclude>
++	    </excludes>
++            <includes>
++                <include>*/**</include>
++            </includes>
++        </fileSet>
++
++		<!-- copy the billing h2 db -->
++		<fileSet>
++			<directory>target/database</directory>
++			<outputDirectory>${pom.artifactId}-${pom.version}/repository/database</outputDirectory>
++		</fileSet>
++
++        <!-- Kernel Patches-->       
++        <fileSet>
++            <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
++            <includes>
++                <include>**/patch0001/*.*</include>
++            </includes>
++        </fileSet>
++        <fileSet>
++            <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0002</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
++            <includes>
++                <include>**/patch0002/*.*</include>
++            </includes>
++        </fileSet>
++        <fileSet>
++            <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0003</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
++            <includes>
++                <include>**/patch0003/*.*</include>
++            </includes>
++        </fileSet>
++        <fileSet>
++            <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0004</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
++            <includes>
++                <include>**/patch0004/*.*</include>
++            </includes>
++        </fileSet>
++		<fileSet>
++                   <directory>../../dbscripts/</directory>
++                   <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
++                </fileSet>
++		<fileSet>
++                   <directory>../../payload</directory>
++		   <includes>
++            		<include>user-data</include>
++        	   </includes>
++                   <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources</outputDirectory>
++                </fileSet>
++                <fileSet>
++                   <directory>../../payload/user-data/</directory>
++                   <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/user-data</outputDirectory>
++                </fileSet> 
++	<fileSet>
++            <directory>../../conf/temp-artifacts/sso</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/modules/sso</outputDirectory>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf/temp-artifacts/carbon</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/modules/carbon</outputDirectory>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf/temp-artifacts</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
++            <includes>
++                <include>org.wso2.store.sso.common_1.0.0.jar</include>
++            </includes>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf/temp-artifacts</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
++            <includes>
++                <include>org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</include>
++            </includes>
++        </fileSet>
++	<fileSet>
++            <directory>../../conf/temp-artifacts</directory>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
++            <includes>
++                <include>org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</include>
++            </includes>
++        </fileSet>
++    </fileSets>
++
++    <dependencySets>
++        <dependencySet>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/lib</outputDirectory>
++            <includes>
++                <include>bouncycastle:bcprov-jdk15:jar</include>
++            </includes>
++        </dependencySet>
++	<!-- use the new tool to create a bundles -->
++        <dependencySet>
++            <outputDirectory>${pom.artifactId}-${pom.version}/lib/core/WEB-INF/lib</outputDirectory>
++            <includes>
++                <include>org.wso2.carbon:org.wso2.carbon.mediator.bridge:jar</include>
++            </includes>
++        </dependencySet>
++        <dependencySet>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/axis2/client/lib</outputDirectory>
++            <includes>
++                <include>bouncycastle:bcprov-jdk15:jar</include>
++            </includes>
++            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
++            </outputFileNameMapping>
++        </dependencySet>
++        <dependencySet>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/client/modules
++            </outputDirectory>
++            <includes>
++                <include>org.apache.rampart:rampart:mar</include>
++            </includes>
++        </dependencySet>
++    </dependencySets>
++
++    <files>
++        <file>
++            <source>INSTALL.txt</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>../../conf/samples-desc.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>src/main/notice/NOTICE</source>
++            <outputDirectory>apache-stratos-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++	 <file>
++            <source>src/main/license/LICENSE</source>
++            <outputDirectory>apache-stratos-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>../../conf/datasources.properties</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <!-- copy custome webapp classLoading files -->
++        <file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading-environments.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/context.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++
++	<!--file>
++            <source>../../conf/cartridge-config.properties</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file-->
++	<file>
++            <source>../../conf/cloud-services-desc.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>README.txt</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>LICENSE.txt</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>release-notes.html</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt</source>
++
++            <outputDirectory>${pom.artifactId}-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/version.txt</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file>
++        <!--file>
++            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.bat</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file-->
++	<!--file>
++            <source>bam-resources/bam.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>644</fileMode>
++        </file-->
++        <file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/security/userRP.jks</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/security/</outputDirectory>
++            <fileMode>644</fileMode>
++        </file>
++	<!--file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/event-broker.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++	    <filtered>true</filtered>
++	    <fileMode>644</fileMode>	
++        </file-->
++	
++	<!-- Including logging-config.xml file -->
++ 	<file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/logging-config.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc/</outputDirectory>
++        </file>
++	<file>
++            <source>src/bin/stratos.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>src/bin/stratos.bat</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>src/bin/git-folder-structure.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>src/bin/manage-git-repo.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>src/bin/set-mysql-password.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++        <file>
++            <source>src/bin/add_entry_zone_file.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++        <file>
++            <source>src/bin/remove_entry_zone_file.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>src/bin/update-instance.sh</source>
++            <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
++            <filtered>true</filtered>
++            <fileMode>755</fileMode>
++        </file>
++	<file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/claim-config.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
++	    <filtered>true</filtered>
++	    <fileMode>644</fileMode>	
++        </file>
++	<file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/tasks-config.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
++        </file>
++	<file>
++            <source>../../conf/zoo.cfg</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
++        </file>
++	<file>
++            <source>../../conf/jaas.conf</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security</outputDirectory>
++	    <destName>jaas.conf</destName>
++            <filtered>true</filtered>
++        </file>
++        <!--Application authenticators -->
++        <file>
++            <source>../../conf/application-authenticators.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
++            <fileMode>644</fileMode>
++        </file>
++        <!-- REST endpoint webapp -->
++        <file>
++            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/stratos.war</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/</outputDirectory>
++            <fileMode>644</fileMode>
++        </file>
++        <!-- End of REST endpoint webapp -->
++        <file>
++            <source>../../conf/data-bridge/data-bridge-config.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/data-bridge/</outputDirectory>
++            <fileMode>644</fileMode>
++        </file>
++        <file>
++            <source>../../conf/data-bridge/thrift-agent-config.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/data-bridge/</outputDirectory>
++            <fileMode>644</fileMode>
++        </file>
++
++   <!--Copying config files from kernel patches -->
++        <file>
++            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts/mysql.sql</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
++            <filtered>true</filtered>
++        </file>
++        <file>
++            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0002/repository/conf/security/cipher-text.properties</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
++            <filtered>true</filtered>
++        </file>
++        <file>
++            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0002/repository/conf/security/cipher-tool.properties</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
++            <filtered>true</filtered>
++        </file>
++
++
++        <file>
++            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0004/repository/conf/carbon.xml</source>
++            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
++            <filtered>true</filtered>
++        </file>
++
++    </files>
++</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/assembly/filter.properties
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/assembly/filter.properties
index 0000000,0000000..4ea7fb2
new file mode 100755
--- /dev/null
+++ b/products/stratos/modules/distribution/src/assembly/filter.properties
@@@ -1,0 -1,0 +1,26 @@@
++#
++# 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.
++#
++
++product.name=Apache Stratos Controller
++product.key=SCC
++product.version=4.0.0-SNAPSHOT
++hotdeployment=true
++hotupdate=false
++carbon.version=4.1.3
++default.server.role=Stratos Controller

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
index 0000000,0000000..c9593e0
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
@@@ -1,0 -1,0 +1,70 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++zone_file=$3
++subdomain=$1
++ip=$2
++
++# check the file
++if [ -f {$zone_file} ]; then
++	echo "Error: zone does not exist"
++	exit 1
++fi
++echo "File $zone_file exists"
++
++#appending the zone file
++echo "$subdomain IN A $ip">> $zone_file
++echo "Added subdomain to the file"
++
++# get serial number
++serial=$(grep 'Serial' $zone_file | awk '{print $1}')
++echo "Serial number " $serial
++# get serial number's date
++serialdate=$(echo $serial | cut -b 1-8)
++# get today's date in same style
++date=$(date +%Y%m%d)
++
++
++#Serial number's date
++serialdate=$(echo $serial | cut -b 1-8)
++echo "serial date" $serialdate
++# get today's date in same style
++date=$(date +%Y%m%d)
++echo "Now date" $date
++
++# compare date and serial date
++if [ $serialdate = $date ]
++	then
++		# if equal, just add 1
++		newserial=$(expr $serial + 1)
++		echo "same date"
++	else
++		# if not equal, make a new one and add 00
++		newserial=$(echo $date"00")
++fi
++
++echo "Adding subdomain $1 and ip $2 to $3"
++sed -i "s/.*Serial.*/ \t\t\t\t$newserial ; Serial./" $zone_file
++
++
++
++#reloading bind server
++/etc/init.d/bind9 reload

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/git-folder-structure.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/git-folder-structure.sh
index 0000000,0000000..2088713
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/git-folder-structure.sh
@@@ -1,0 -1,0 +1,67 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++
++tenant=""
++cartridge=""
++ads_git_url="localhost"
++
++function help {
++    echo "Usage:git-folder-structure  <mandatory arguments>"
++    echo "    Usage:"
++    echo "    	  git-folder-structure <tenant> <cartridge> [webapp=readme file description with space replace with #] "
++    echo "    eg:"
++    echo "    	  git-folder-structure tenant1 as webapp=copy#war#files#here"
++    echo ""
++}
++
++function main {
++
++if [[ (-z $tenant || -z $cartridge ) ]]; then
++    help
++    exit 1
++fi
++
++}
++
++tenant=$1
++cartridge=$2
++
++if [[ (-n $tenant && -n $cartridge) ]]; then
++	cd /tmp/
++	rm -fr ${tenant}/${cartridge}
++	git clone git@localhost:${tenant}/${cartridge}
++	cd ${cartridge}
++	git pull origin master
++	shift
++	shift
++	for IN in "$@"; do
++		IFS='=' read -ra ADDR <<< "$IN"
++		mkdir -p ${ADDR[0]}
++		echo ${ADDR[1]} | sed -e 's/#/ /g' > ${ADDR[0]}/README.txt
++		git add ${ADDR[0]}
++		git commit -a -m 'Folder structure commit'
++		git push origin master
++	done
++	rm -fr ${cartridge}	
++fi	
++
++main

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/manage-git-repo.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/manage-git-repo.sh
index 0000000,0000000..0d70b9a
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/manage-git-repo.sh
@@@ -1,0 -1,0 +1,138 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++
++user="wso2"
++action=""
++username=""
++tenant_domain=""
++cartridge=""
++tenant_key=""
++cartridge_key=""
++gitolite_admin="/home/wso2/gitolite-admin/"
++git_domain=""
++git_repo="/home/git/repositories/"
++ADC_repo_notification_url=""
++
++
++function help {
++    echo "Usage: manage-git-repo <action> <mandatory arguments>"
++    echo "    Action can be one of the following"
++    echo "        create : create git repo"
++    echo "        destroy: destroy git repo"
++    echo "        delete : delete user from a git repo"
++    echo "    Usage:"
++    echo "    	  manage-git-repo create <username> <tenant domain> <cartridge alias/name> <ADC repo notification url> <git_domain>"
++    echo "    	  manage-git-repo destroy <username> <tenant domain> <cartridge alias/name>"
++    echo "    eg:"
++    echo "    	  manage-git-repo create foo abc.com myphp https://localhost:9445/services/RepoNotificationService/"
++    echo ""
++}
++
++function main {
++
++if [[ ( -z $action || ( -n $action && $action == "help" ) ) ]]; then
++    help
++    exit 1
++fi
++if [[ (( -n $action && $action == "create") && ( -z $tenant_domain || -z $username || -z $cartridge || -z $ADC_repo_notification_url)) ]]; then
++    help
++    exit 1
++fi
++
++if [[ (( -n $action && $action == "destroy") && ( -z $tenant_domain || -z $username || -z $cartridge)) ]]; then
++    help
++    exit 1
++fi
++
++}
++
++action=$1
++username=$2
++tenant_domain=$3
++cartridge=$4
++ADC_repo_notification_url=$5
++git_domain=$6
++if [[ $action == "create" ]]; then
++
++     # hack until stratos manager support key pair for every user
++     rm -fr /tmp/${username}*
++     ssh-keygen -t rsa -N ''  -f /tmp/${username}
++     cd ${gitolite_admin}
++     git pull
++     # set public keys
++     cp -f /tmp/${username}.pub keydir/${username}.pub
++     #remove temparaly created files
++     rm /tmp/${username}.pub
++     # add repo and permission to conf 
++
++
++     echo "" > conf/repos/${tenant_domain}-${cartridge}.conf 
++     echo "repo ${tenant_domain}/${cartridge}.git" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     echo "	RW+    = ${username} ${user}  daemon" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     echo "     config  gitweb.url                  = git@${git_domain}:${tenant_domain}/${cartridge}" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     echo "     config  receive.denyNonFastforwards = true" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     echo "     config  receive.denyDeletes         = true" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     echo "" >> conf/repos/${tenant_domain}-${cartridge}.conf
++     # git operations
++     git add keydir/${username}.pub
++     git add conf/repos/${tenant_domain}-${cartridge}.conf
++     git commit -a -m "${username} keys added and ${tenant_domain}/${cartridge} repo created"
++     git pull
++     git push
++     # set git push trigger
++    
++   echo "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://org.apache.axis2/xsd\">
++   <soapenv:Header/>
++   <soapenv:Body>
++      <xsd:notifyRepoUpdate>
++         <xsd:tenantDomain>${tenant_domain}</xsd:tenantDomain>
++         <xsd:cartridgeType>${cartridge}</xsd:cartridgeType>
++      </xsd:notifyRepoUpdate>
++   </soapenv:Body>
++</soapenv:Envelope>" > /tmp/${tenant_domain}-request.xml
++   
++    echo "#!/bin/bash" > /tmp/${tenant_domain}-post-update
++    echo "curl -X POST -H \"Content-Type: text/xml\"   -d @${git_repo}${tenant_domain}/${cartridge}.git/hooks/request.xml \"${ADC_repo_notification_url}\" --insecure" >> /tmp/${tenant_domain}-post-update
++    echo "exec git update-server-info" >> /tmp/${tenant_domain}-post-update
++    
++    sudo mv /tmp/${tenant_domain}-request.xml ${git_repo}${tenant_domain}/${cartridge}.git/hooks/request.xml
++    sudo mv /tmp/${tenant_domain}-post-update ${git_repo}${tenant_domain}/${cartridge}.git/hooks/post-update
++    sudo chown git:git ${git_repo}${tenant_domain}/${cartridge}.git/hooks/post-update
++    sudo chmod 700 ${git_repo}${tenant_domain}/${cartridge}.git/hooks/post-update
++fi
++if [[ $action == "destroy" ]]; then
++ 
++     cd ${gitolite_admin}
++     # remove user keys
++     git rm keydir/${username}.pub
++     # remove repo from config
++     git rm conf/repos/${tenant_domain}-${cartridge}.conf
++     # git push to execute
++     git pull
++     git push
++     # remove repo from repository. ** this should done from above. but it doesnt happend. So removing manualy.
++     sudo rm -fr /home/git/repositories/${tenant_domain}/${cartridge}.git
++
++fi
++
++
++main

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
index 0000000,0000000..c36e539
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
@@@ -1,0 -1,0 +1,75 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++zone_file=$2
++subdomain=$1
++
++# check the file
++if [ -f {$zone_file} ]; then
++	echo "Error: zone does not exist"
++	exit 1
++fi
++echo "File $zone_file exists"
++
++# find entry to delete
++entry=$(grep $subdomain $zone_file)
++#sed "/$entry/d" $zone_file 
++
++sed "/$entry/d" $zone_file >tmp
++mv tmp $zone_file
++
++echo "entry to delete  $entry"
++
++
++# get serial number
++serial=$(grep 'Serial' $zone_file | awk '{print $1}')
++echo "Serial number " $serial
++# get serial number's date
++serialdate=$(echo $serial | cut -b 1-8)
++# get today's date in same style
++date=$(date +%Y%m%d)
++
++
++#Serial number's date
++serialdate=$(echo $serial | cut -b 1-8)
++echo "serial date" $serialdate
++# get today's date in same style
++date=$(date +%Y%m%d)
++echo "Now date" $date
++
++# compare date and serial date
++if [ $serialdate = $date ]
++	then
++		# if equal, just add 1
++		newserial=$(expr $serial + 1)
++		echo "same date"
++	else
++		# if not equal, make a new one and add 00
++		newserial=$(echo $date"00")
++fi
++
++echo "Adding subdomain $1 and ip $2 to $3"
++sed -i "s/.*Serial.*/ \t\t\t\t$newserial ; Serial./" $zone_file
++
++
++
++#reloading bind server
++/etc/init.d/bind9 reload

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/set-mysql-password.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/set-mysql-password.sh
index 0000000,0000000..477e0c7
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/set-mysql-password.sh
@@@ -1,0 -1,0 +1,65 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++
++user="ubuntu"
++instance_ip=""
++cartridge_private_key=""
++password=""
++
++
++function help {
++    echo "Usage: set-mysql-password <mandatory arguments>"
++    echo "    Usage:"
++    echo "    	  set-mysql-password <instance ip> <cartridge private key> <password>"
++    echo "    eg:"
++    echo "    	  set-mysql-password 172.17.1.2 /tmp/foo-php qazxsw"
++    echo ""
++}
++
++function main {
++
++if [[ (-z $password || -z $instance_ip) ]]; then
++    help
++    exit 1
++fi
++
++}
++
++instance_ip=$1
++cartridge_private_key=$2
++password=$3
++
++echo "#!/bin/bash
++echo \"GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'   IDENTIFIED BY '${password}' WITH GRANT OPTION;flush privileges;\" | mysql -uroot -p${password}
++" > /tmp/${password}.sh
++
++if [[ (-n $password && -n $instance_ip) ]]; then
++	ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} mysqladmin -u root password "${password}"
++#	ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'   IDENTIFIED BY '${password}' WITH GRANT OPTION;flush privileges;" | mysql -u root -p"${password}"
++	scp -i ${cartridge_private_key} /tmp/${password}.sh ${user}@${instance_ip}:
++	ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} chmod 755 /home/${user}/${password}.sh
++	ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} /home/${user}/${password}.sh
++	ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} rm /home/${user}/${password}.sh
++fi
++rm /tmp/${password}.sh
++
++main

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/stratos.bat
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/stratos.bat
index 0000000,0000000..05a8e87
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/stratos.bat
@@@ -1,0 -1,0 +1,170 @@@
++@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%;
++
++FOR %%D in ("%CARBON_HOME%\lib\commons-lang*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\lib\%%~nD%%~xD"
++
++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""==""-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""==""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
++
++
++: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 -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof"  -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -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" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository
 \conf" -Djndi.properties.dir="%CARBON_HOME%/repository/conf" -Dcarbon.logs.path="%CARBON_HOME%\repository\logs" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -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% -Dfile.encoding=UTF8 -Dloadbalancer.conf="%CARBON_HOME%\repository\conf\loadbalancer.conf"
++
++: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
++
++:endlocal
++
++:END

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/stratos.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/stratos.sh
index 0000000,0000000..77f7a91
new file mode 100755
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/stratos.sh
@@@ -1,0 -1,0 +1,304 @@@
++#!/bin/sh
++# ----------------------------------------------------------------------------
++#  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.
++# ----------------------------------------------------------------------------
++# Main Script for the Apache Stratos (incubating)
++#
++# Environment Variable Prerequisites
++#
++#   CARBON_HOME   Home of WSO2 Carbon installation. If not set I will  try
++#                   to figure it out.
++#
++#   JAVA_HOME       Must point at your Java Development Kit installation.
++#
++#   JAVA_OPTS       (Optional) Java runtime options used when the commands
++#                   is executed.
++#
++# NOTE: Borrowed generously from Apache Tomcat startup scripts.
++# -----------------------------------------------------------------------------
++
++# OS specific support.  $var _must_ be set to either true or false.
++#ulimit -n 100000
++
++cygwin=false;
++darwin=false;
++os400=false;
++mingw=false;
++case "`uname`" in
++CYGWIN*) cygwin=true;;
++MINGW*) mingw=true;;
++OS400*) os400=true;;
++Darwin*) darwin=true
++        if [ -z "$JAVA_VERSION" ] ; then
++             JAVA_VERSION="CurrentJDK"
++           else
++             echo "Using Java version: $JAVA_VERSION"
++           fi
++           if [ -z "$JAVA_HOME" ] ; then
++             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
++           fi
++           ;;
++esac
++
++# resolve links - $0 may be a softlink
++PRG="$0"
++
++while [ -h "$PRG" ]; do
++  ls=`ls -ld "$PRG"`
++  link=`expr "$ls" : '.*-> \(.*\)$'`
++  if expr "$link" : '.*/.*' > /dev/null; then
++    PRG="$link"
++  else
++    PRG=`dirname "$PRG"`/"$link"
++  fi
++done
++
++# Get standard environment variables
++PRGDIR=`dirname "$PRG"`
++
++# Only set CARBON_HOME if not already set
++[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
++
++# Set AXIS2_HOME. Needed for One Click JAR Download
++AXIS2_HOME=$CARBON_HOME
++
++# For Cygwin, ensure paths are in UNIX format before anything is touched
++if $cygwin; then
++  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
++  [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
++  [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
++fi
++
++# For OS400
++if $os400; then
++  # Set job priority to standard for interactive (interactive - 6) by using
++  # the interactive priority - 6, the helper threads that respond to requests
++  # will be running at the same priority as interactive jobs.
++  COMMAND='chgjob job('$JOBNAME') runpty(6)'
++  system $COMMAND
++
++  # Enable multi threading
++  QIBM_MULTI_THREADED=Y
++  export QIBM_MULTI_THREADED
++fi
++
++# For Migwn, ensure paths are in UNIX format before anything is touched
++if $mingw ; then
++  [ -n "$CARBON_HOME" ] &&
++    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
++  [ -n "$JAVA_HOME" ] &&
++    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
++  [ -n "$AXIS2_HOME" ] &&
++    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
++  # TODO classpath?
++fi
++
++if [ -z "$JAVACMD" ] ; then
++  if [ -n "$JAVA_HOME"  ] ; then
++    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
++      # IBM's JDK on AIX uses strange locations for the executables
++      JAVACMD="$JAVA_HOME/jre/sh/java"
++    else
++      JAVACMD="$JAVA_HOME/bin/java"
++    fi
++  else
++    JAVACMD=java
++  fi
++fi
++
++if [ ! -x "$JAVACMD" ] ; then
++  echo "Error: JAVA_HOME is not defined correctly."
++  echo " CARBON cannot execute $JAVACMD"
++  exit 1
++fi
++
++# if JAVA_HOME is not set we're not happy
++if [ -z "$JAVA_HOME" ]; then
++  echo "You must set the JAVA_HOME variable before running CARBON."
++  exit 1
++fi
++
++if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then
++  PID=`cat "$CARBON_HOME"/wso2carbon.pid`
++fi
++
++# ----- Process the input command ----------------------------------------------
++args=""
++for c in $*
++do
++    if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
++          CMD="--debug"
++          continue
++    elif [ "$CMD" = "--debug" ]; then
++          if [ -z "$PORT" ]; then
++                PORT=$c
++          fi
++    elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
++          CMD="stop"
++    elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
++          CMD="start"
++    elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
++          CMD="version"
++    elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
++          CMD="restart"
++    elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
++          CMD="test"
++    else
++        args="$args $c"
++    fi
++done
++
++if [ "$CMD" = "--debug" ]; then
++  if [ "$PORT" = "" ]; then
++    echo " Please specify the debug port after the --debug option"
++    exit 1
++  fi
++  if [ -n "$JAVA_OPTS" ]; then
++    echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
++  fi
++  CMD="RUN"
++  JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
++  echo "Please start the remote debugging client to continue..."
++elif [ "$CMD" = "start" ]; then
++  if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then
++    if  ps -p $PID >&- ; then
++      echo "Process is already running"
++      exit 0
++    fi
++  fi
++  export CARBON_HOME=$CARBON_HOME
++# using nohup bash to avoid erros in solaris OS.TODO
++  nohup bash $CARBON_HOME/bin/stratos.sh $args > /dev/null 2>&1 &
++  exit 0
++elif [ "$CMD" = "stop" ]; then
++  export CARBON_HOME=$CARBON_HOME
++  kill -term `cat $CARBON_HOME/wso2carbon.pid`
++  exit 0
++elif [ "$CMD" = "restart" ]; then
++  export CARBON_HOME=$CARBON_HOME
++  kill -term `cat $CARBON_HOME/wso2carbon.pid`
++  process_status=0
++  pid=`cat $CARBON_HOME/wso2carbon.pid`
++  while [ "$process_status" -eq "0" ]
++  do
++        sleep 1;
++        ps -p$pid 2>&1 > /dev/null
++        process_status=$?
++  done
++
++# using nohup bash to avoid erros in solaris OS.TODO
++  nohup bash $CARBON_HOME/bin/stratos.sh $args > /dev/null 2>&1 &
++  exit 0
++elif [ "$CMD" = "test" ]; then
++    JAVACMD="exec "$JAVACMD""
++elif [ "$CMD" = "version" ]; then
++  cat $CARBON_HOME/bin/version.txt
++  cat $CARBON_HOME/bin/wso2carbon-version.txt
++  exit 0
++fi
++
++# ---------- Handle the SSL Issue with proper JDK version --------------------
++jdk_16=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[6|7]"`
++if [ "$jdk_16" = "" ]; then
++   echo " Starting WSO2 Carbon (in unsupported JDK)"
++   echo " [ERROR] CARBON is supported only on JDK 1.6 and 1.7"
++fi
++
++CARBON_XBOOTCLASSPATH=""
++for f in "$CARBON_HOME"/lib/xboot/*.jar
++do
++    if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then
++        CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
++    fi
++done
++
++JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
++
++CARBON_CLASSPATH=""
++if [ -e "$JAVA_HOME/lib/tools.jar" ]; then
++    CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
++fi
++for f in "$CARBON_HOME"/bin/*.jar
++do
++    if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
++        CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
++    fi
++done
++for t in "$CARBON_HOME"/lib/commons-lang*.jar
++do
++    CARBON_CLASSPATH="$CARBON_CLASSPATH":$t
++done
++# For Cygwin, switch paths to Windows format before running java
++if $cygwin; then
++  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
++  CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
++  AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
++  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
++  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
++  CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
++  CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
++fi
++
++# ----- Execute The Requested Command -----------------------------------------
++
++echo JAVA_HOME environment variable is set to $JAVA_HOME
++echo CARBON_HOME environment variable is set to $CARBON_HOME
++
++cd "$CARBON_HOME"
++
++START_EXIT_STATUS=121
++status=$START_EXIT_STATUS
++
++#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
++#   -Djava.rmi.server.hostname="your.IP.goes.here"
++
++while [ "$status" = "$START_EXIT_STATUS" ]
++do
++    $JAVACMD \
++    -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
++    -Xms256m -Xmx1024m -XX:MaxPermSize=256m \
++    -server \
++    -XX:+HeapDumpOnOutOfMemoryError \
++    -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \
++    $JAVA_OPTS \
++    -Dcom.sun.management.jmxremote \
++    -classpath "$CARBON_CLASSPATH" \
++    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
++    -Djava.io.tmpdir="$CARBON_HOME/tmp" \
++    -Dcatalina.base="$CARBON_HOME/lib/tomcat" \
++    -Dwso2.server.standalone=true \
++    -Dcarbon.registry.root=/ \
++    -Djava.command="$JAVACMD" \
++    -Dcarbon.home="$CARBON_HOME" \
++    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
++    -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \
++    -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \
++    -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \
++    -Dconf.location="$CARBON_HOME/repository/conf"\
++    -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 \
++    -Djava.security.egd=file:/dev/./urandom \
++    -Dfile.encoding=UTF8 \
++    -Djndi.properties.dir="$CARBON_HOME/repository/conf" \
++    org.wso2.carbon.bootstrap.Bootstrap $*
++    status=$?
++done

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/429144b8/products/stratos/modules/distribution/src/bin/update-instance.sh
----------------------------------------------------------------------
diff --cc products/stratos/modules/distribution/src/bin/update-instance.sh
index 0000000,0000000..4effb49
new file mode 100644
--- /dev/null
+++ b/products/stratos/modules/distribution/src/bin/update-instance.sh
@@@ -1,0 -1,0 +1,54 @@@
++#!/bin/bash
++#
++#
++# 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.
++#
++#
++
++user="ubuntu"
++instance_ip=""
++app_path=""
++cartridge_private_key=""
++
++function help {
++    echo "Usage: update-instance <mandatory arguments>"
++    echo "    Usage:"
++    echo "    	  update-instance <instance_ip> <app path> <cartridge_private_key>"
++    echo "    eg:"
++    echo "    	  update-instance 172.17.1.1 /var/www/myapp /tmp/foo-php"
++    echo ""
++}
++
++function main {
++
++if [[ (-z $instance_ip || -z $app_path || -z $cartridge_private_key ) ]]; then
++    help
++    exit 1
++fi
++
++}
++
++instance_ip=$1
++app_path=$2
++cartridge_private_key=$3
++
++if [[ (-n $instance_ip && -n $app_path && -n $cartridge_private_key ) ]]; then
++    ssh -o "BatchMode yes" -i ${cartridge_private_key} ${user}@${instance_ip} /opt/git.sh
++fi
++
++main