http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/agent.conf
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/agent.conf
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/agent.conf
new file mode 100755
index 0000000..fd3e423
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/agent.conf
@@ -0,0 +1,45 @@
+# 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.
+
+[agent]
+mb.ip                                 =localhost
+mb.port                               =1885
+listen.address                        =localhost
+thrift.receiver.ip                    =localhost
+thrift.receiver.port                  =7712
+thrift.server.admin.username          =admin
+thrift.server.admin.password          =admin
+cep.stats.publisher.enabled           =true
+lb.private.ip                         =
+lb.public.ip                          =
+enable.artifact.update                =true
+auto.commit                           =true
+auto.checkout                         =true
+artifact.update.interval              =15
+artifact.clone.retries                =5
+artifact.clone.interval               =10
+port.check.timeout                    =600000
+enable.data.publisher                 =false
+monitoring.server.ip                  =localhost
+monitoring.server.port                =7612
+monitoring.server.secure.port         =7712
+monitoring.server.admin.username      =admin
+monitoring.server.admin.password      =admin
+log.file.paths                        =/tmp/agent.screen-adc-test.log
+metadata.service.url                  =https://localhost:9443
+super.tenant.repository.path          =/repository/deployment/server/
+tenant.repository.path                =/repository/tenants/

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/jndi.properties
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/jndi.properties
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/jndi.properties
new file mode 100755
index 0000000..beefe3c
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/jndi.properties
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:61617
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/logging.ini
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/logging.ini
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/logging.ini
new file mode 100755
index 0000000..15cad9b
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/logging.ini
@@ -0,0 +1,52 @@
+# 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.
+
+
+[formatters]
+keys=default
+
+[formatter_default]
+format=[%(asctime)s] %(levelname)s {%(filename)s:%(funcName)s} - %(message)s
+class=logging.Formatter
+
+[handlers]
+keys=console, error_file, log_file
+
+[handler_console]
+class=logging.StreamHandler
+formatter=default
+args=tuple()
+
+[handler_log_file]
+class=logging.FileHandler
+level=DEBUG
+formatter=default
+args=("agent.log", "w")
+
+[handler_error_file]
+class=logging.FileHandler
+level=ERROR
+formatter=default
+args=("error.log", "w")
+
+[loggers]
+keys=root
+
+[logger_root]
+level=DEBUG
+formatter=default
+handlers=console,error_file,log_file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/payload/launch-params
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/payload/launch-params
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/payload/launch-params
new file mode 100755
index 0000000..aa4fcc3
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-2/payload/launch-params
@@ -0,0 +1 @@
+APPLICATION_ID=application1,SERVICE_NAME=tomcat,HOST_NAME=tomcat.stratos.org,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-2,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/agent.conf
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/agent.conf
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/agent.conf
new file mode 100755
index 0000000..0ee1dce
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/agent.conf
@@ -0,0 +1,45 @@
+# 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.
+
+[agent]
+mb.ip                                 =localhost
+mb.port                               =1885
+listen.address                        =localhost
+thrift.receiver.ip                    =localhost
+thrift.receiver.port                  =7712
+thrift.server.admin.username          =admin
+thrift.server.admin.password          =admin
+cep.stats.publisher.enabled           =true
+lb.private.ip                         =
+lb.public.ip                          =
+enable.artifact.update                =true
+auto.commit                           =true
+auto.checkout                         =true
+artifact.update.interval              =15
+artifact.clone.retries                =5
+artifact.clone.interval               =10
+port.check.timeout                    =600000
+enable.data.publisher                 =false
+monitoring.server.ip                  =localhost
+monitoring.server.port                =7612
+monitoring.server.secure.port         =7712
+monitoring.server.admin.username      =admin
+monitoring.server.admin.password      =admin
+log.file.paths                        =/tmp/agent.screen-adc-mt-test.log
+metadata.service.url                  =https://localhost:9443
+super.tenant.repository.path          =/repository/deployment/server/
+tenant.repository.path                =/repository/tenants/

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/jndi.properties
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/jndi.properties
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/jndi.properties
new file mode 100755
index 0000000..beefe3c
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/jndi.properties
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:61617
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/logging.ini
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/logging.ini
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/logging.ini
new file mode 100755
index 0000000..15cad9b
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/logging.ini
@@ -0,0 +1,52 @@
+# 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.
+
+
+[formatters]
+keys=default
+
+[formatter_default]
+format=[%(asctime)s] %(levelname)s {%(filename)s:%(funcName)s} - %(message)s
+class=logging.Formatter
+
+[handlers]
+keys=console, error_file, log_file
+
+[handler_console]
+class=logging.StreamHandler
+formatter=default
+args=tuple()
+
+[handler_log_file]
+class=logging.FileHandler
+level=DEBUG
+formatter=default
+args=("agent.log", "w")
+
+[handler_error_file]
+class=logging.FileHandler
+level=ERROR
+formatter=default
+args=("error.log", "w")
+
+[loggers]
+keys=root
+
+[logger_root]
+level=DEBUG
+formatter=default
+handlers=console,error_file,log_file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/payload/launch-params
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/payload/launch-params
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/payload/launch-params
new file mode 100755
index 0000000..ed8c67f
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-3/payload/launch-params
@@ -0,0 +1 @@
+APPLICATION_ID=application-3,SERVICE_NAME=tomcat-mt,HOST_NAME=tomcat.stratos.org,MULTITENANT=true,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-3,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/agent.conf
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/agent.conf
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/agent.conf
new file mode 100755
index 0000000..f945968
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/agent.conf
@@ -0,0 +1,45 @@
+# 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.
+
+[agent]
+mb.ip                                 =localhost
+mb.port                               =1885
+listen.address                        =localhost
+thrift.receiver.ip                    =localhost
+thrift.receiver.port                  =7712
+thrift.server.admin.username          =admin
+thrift.server.admin.password          =admin
+cep.stats.publisher.enabled           =true
+lb.private.ip                         =
+lb.public.ip                          =
+enable.artifact.update                =true
+auto.commit                           =true
+auto.checkout                         =true
+artifact.update.interval              =15
+artifact.clone.retries                =5
+artifact.clone.interval               =10
+port.check.timeout                    =600000
+enable.data.publisher                 =false
+monitoring.server.ip                  =localhost
+monitoring.server.port                =7612
+monitoring.server.secure.port         =7712
+monitoring.server.admin.username      =admin
+monitoring.server.admin.password      =admin
+log.file.paths                        
=/tmp/agent.screen-adc-mt-tenant-user-test.log
+metadata.service.url                  =https://localhost:9443
+super.tenant.repository.path          =/repository/deployment/server/
+tenant.repository.path                =/repository/tenants/

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/jndi.properties
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/jndi.properties
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/jndi.properties
new file mode 100755
index 0000000..beefe3c
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/jndi.properties
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:61617
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/logging.ini
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/logging.ini
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/logging.ini
new file mode 100755
index 0000000..15cad9b
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/logging.ini
@@ -0,0 +1,52 @@
+# 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.
+
+
+[formatters]
+keys=default
+
+[formatter_default]
+format=[%(asctime)s] %(levelname)s {%(filename)s:%(funcName)s} - %(message)s
+class=logging.Formatter
+
+[handlers]
+keys=console, error_file, log_file
+
+[handler_console]
+class=logging.StreamHandler
+formatter=default
+args=tuple()
+
+[handler_log_file]
+class=logging.FileHandler
+level=DEBUG
+formatter=default
+args=("agent.log", "w")
+
+[handler_error_file]
+class=logging.FileHandler
+level=ERROR
+formatter=default
+args=("error.log", "w")
+
+[loggers]
+keys=root
+
+[logger_root]
+level=DEBUG
+formatter=default
+handlers=console,error_file,log_file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/payload/launch-params
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/payload/launch-params
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/payload/launch-params
new file mode 100755
index 0000000..b701066
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/suite-4/payload/launch-params
@@ -0,0 +1 @@
+APPLICATION_ID=application-4,SERVICE_NAME=tomcat-mt,HOST_NAME=tomcat.stratos.org,MULTITENANT=true,TENANT_ID=4,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-4,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/src/test/resources/test-conf/integration-test.properties
----------------------------------------------------------------------
diff --git 
a/products/python-cartridge-agent/modules/integration/src/test/resources/test-conf/integration-test.properties
 
b/products/python-cartridge-agent/modules/integration/src/test/resources/test-conf/integration-test.properties
new file mode 100755
index 0000000..1242841
--- /dev/null
+++ 
b/products/python-cartridge-agent/modules/integration/src/test/resources/test-conf/integration-test.properties
@@ -0,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.
+
+# Stratos distribution properties added via filters during the build
+distribution.version=${project.version}
+distribution.name=${python.cartridge.agent.distribution.name}-${project.version}
+activemq.amqp.bind.address=tcp://localhost:61617
+activemq.mqtt.bind.address=mqtt://localhost:1885
+cep.port=7712
+stratos.endpoint=http://localhost:9763
+stratos.admin.username=admin
+stratos.admin.password=admin
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/pom.xml 
b/products/python-cartridge-agent/pom.xml
index 7178ead..c46bcb8 100755
--- a/products/python-cartridge-agent/pom.xml
+++ b/products/python-cartridge-agent/pom.xml
@@ -32,7 +32,7 @@
     <description>Apache Stratos Python Cartridge Agent Product</description>
 
     <modules>
-        <module>distribution</module>
-        <module>integration</module>
+        <module>modules/distribution</module>
+        <module>modules/integration</module>
     </modules>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/assembly/bin.xml 
b/products/stratos/modules/distribution/src/assembly/bin.xml
index 64c5b3e..09ed4e1 100755
--- a/products/stratos/modules/distribution/src/assembly/bin.xml
+++ b/products/stratos/modules/distribution/src/assembly/bin.xml
@@ -93,7 +93,8 @@
             <directory>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps
             </directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps
+            </outputDirectory>
             <excludes>
                 <exclude>**/publisher/**</exclude>
                 <exclude>**/store/**</exclude>
@@ -104,16 +105,9 @@
             </excludes>
         </fileSet>
         <fileSet>
-            
<directory>target/shopping-cart-global-${shoppingcart.global.version}</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/samples/bin</outputDirectory>
-            <includes>
-                <include>**/*.car</include>
-                <include>**/*.properties</include>
-            </includes>
-        </fileSet>
-        <fileSet>
             
<directory>../../../../components/org.apache.stratos.manager.console/console</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps/console
+            <outputDirectory>
+                
${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps/console
             </outputDirectory>
             <excludes>
                 <exclude>**/README</exclude>
@@ -121,29 +115,14 @@
         </fileSet>
         <fileSet>
             
<directory>../../../../components/org.apache.stratos.manager.console/sso</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps/sso
+            <outputDirectory>
+                
${stratos.distribution.name}-${project.version}/repository/deployment/server/jaggeryapps/sso
             </outputDirectory>
         </fileSet>
         <fileSet>
             
<directory>../../../../components/org.apache.stratos.manager.console/modules/console</directory>
             
<outputDirectory>${stratos.distribution.name}-${project.version}/modules/console</outputDirectory>
         </fileSet>
-        <fileSet>
-            
<directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}</outputDirectory>
-            <excludes>
-                <exclude>**/daemon.sh</exclude>
-                <exclude>**/log4j.properties</exclude>
-                <exclude>**/repository/conf/log4j.properties</exclude>
-                <exclude>**/wso2server.sh</exclude>
-                <exclude>**/wso2server.bat</exclude>
-            </excludes>
-            <includes>
-                <include>**/*.sh</include>
-                <include>**/native/*</include>
-            </includes>
-            <fileMode>755</fileMode>
-        </fileSet>
 
         <!-- Copying themes, cloud icons-->
         <fileSet>
@@ -190,7 +169,8 @@
         <fileSet>
             
<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/
             </directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/multitenancy/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/multitenancy/
+            </outputDirectory>
             <includes>
                 <include>**/multitenancy-packages.xml</include>
                 <include>**/stratos.xml</include>
@@ -242,40 +222,39 @@
         </fileSet>
         <fileSet>
             <directory>src/main/conf/multitenancy</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/multitenancy</outputDirectory>
-        </fileSet>
-
-        <!-- copy the billing h2 db -->
-        <fileSet>
-            <directory>target/database</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/database</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/multitenancy
+            </outputDirectory>
         </fileSet>
 
         <!-- Apply Kernel Patches-->
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.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>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.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>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.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>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
@@ -285,21 +264,24 @@
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0005</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <includes>
                 <include>**/patch0005/*.*</include>
             </includes>
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0006</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <includes>
                 <include>**/patch0006/*.*</include>
             </includes>
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0007</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
@@ -309,14 +291,16 @@
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0008</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <includes>
                 <include>**/patch0008/*.*</include>
             </includes>
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0009</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
@@ -326,7 +310,8 @@
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0010</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
@@ -336,7 +321,8 @@
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0011</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui-4.2.0.jar</exclude>
             </excludes>
@@ -346,7 +332,8 @@
         </fileSet>
         <fileSet>
             
<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0012</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/patches
+            </outputDirectory>
             <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
@@ -411,14 +398,16 @@
         </fileSet>
         <fileSet>
             <directory>src/main/temp-artifacts</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins
+            </outputDirectory>
             <includes>
                 <include>org.wso2.store.sso.common_1.0.0.jar</include>
             </includes>
         </fileSet>
         <fileSet>
             <directory>src/main/temp-artifacts</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins
+            </outputDirectory>
             <includes>
                 
<include>org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</include>
             </includes>
@@ -426,7 +415,8 @@
         <!-- autoscaler -->
         <fileSet>
             <directory>src/main/temp-artifacts</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/plugins
+            </outputDirectory>
             <includes>
                 
<include>org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</include>
             </includes>
@@ -436,13 +426,15 @@
         <!--creating an empty input event adaptors directory-->
         <fileSet>
             
<directory>../../../../extensions/cep/modules/artifacts/inputeventadaptors</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/inputeventadaptors
+            <outputDirectory>
+                
${stratos.distribution.name}-${project.version}/repository/deployment/server/inputeventadaptors
             </outputDirectory>
         </fileSet>
         <!--creating an empty output event adaptors directory-->
         <fileSet>
             
<directory>../../../../extensions/cep/modules/artifacts/outputeventadaptors</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/outputeventadaptors
+            <outputDirectory>
+                
${stratos.distribution.name}-${project.version}/repository/deployment/server/outputeventadaptors
             </outputDirectory>
         </fileSet>
         <!--creating an empty event builders directory-->
@@ -454,7 +446,8 @@
         <!--creating an empty event formatters directory-->
         <fileSet>
             
<directory>../../../../extensions/cep/modules/artifacts/eventformatters</directory>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/eventformatters
+            <outputDirectory>
+                
${stratos.distribution.name}-${project.version}/repository/deployment/server/eventformatters
             </outputDirectory>
         </fileSet>
         <!--creating an empty execution plans directory-->
@@ -486,14 +479,16 @@
             </includes>
         </dependencySet>
         <dependencySet>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/axis2/client/lib</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/axis2/client/lib
+            </outputDirectory>
             <includes>
                 <include>bouncycastle:bcprov-jdk15:jar</include>
             </includes>
             
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
         </dependencySet>
         <dependencySet>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/client/modules</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/client/modules
+            </outputDirectory>
             <includes>
                 <include>org.apache.rampart:rampart:mar</include>
             </includes>
@@ -520,7 +515,8 @@
             </includes>
         </dependencySet>
         <dependencySet>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/dropins</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/components/dropins
+            </outputDirectory>
             <includes>
                 <include>org.apache.stratos:org.wso2.carbon.ui:jar</include>
             </includes>
@@ -649,7 +645,8 @@
         </file>
         <file>
             <source>src/main/conf/security/client-truststore.jks</source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/resources/security/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/resources/security/
+            </outputDirectory>
             <filtered>false</filtered>
             <fileMode>600</fileMode>
         </file>
@@ -779,7 +776,8 @@
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/security/userRP.jks
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/resources/security/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/resources/security/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <!-- Including logging-config.xml file -->
@@ -790,13 +788,13 @@
             
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/etc/</outputDirectory>
         </file>
         <file>
-            <source>src/bin/stratos.sh</source>
+            <source>src/main/bin/stratos.sh</source>
             
<outputDirectory>apache-stratos-${project.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
         <file>
-            <source>src/bin/stratos.bat</source>
+            <source>src/main/bin/stratos.bat</source>
             
<outputDirectory>apache-stratos-${project.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
@@ -819,7 +817,8 @@
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/api.war
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <!-- Mock iaas webapp -->
@@ -827,7 +826,8 @@
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/mock-iaas.war
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <!--oauth2.war and authenticationendpoint.war is related to oAuth 
feature  -->
@@ -835,14 +835,16 @@
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/oauth2.war
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <file>
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/authenticationendpoint.war
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <!-- End of REST endpoint webapp -->
@@ -851,18 +853,21 @@
             <source>
                 
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/metadata.war
             </source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/deployment/server/webapps/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <!-- End of Meta data service webapp -->
         <file>
             <source>src/main/conf/data-bridge/data-bridge-config.xml</source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/data-bridge/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/data-bridge/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <file>
             <source>src/main/conf/data-bridge/thrift-agent-config.xml</source>
-            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/data-bridge/</outputDirectory>
+            
<outputDirectory>${stratos.distribution.name}-${project.version}/repository/conf/data-bridge/
+            </outputDirectory>
             <fileMode>644</fileMode>
         </file>
         <file>
@@ -871,4 +876,4 @@
             <fileMode>644</fileMode>
         </file>
     </files>
-</assembly>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh 
b/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
deleted file mode 100644
index c9593e0..0000000
--- a/products/stratos/modules/distribution/src/bin/add_entry_zone_file.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/git-folder-structure.sh
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/bin/git-folder-structure.sh 
b/products/stratos/modules/distribution/src/bin/git-folder-structure.sh
deleted file mode 100644
index 2088713..0000000
--- a/products/stratos/modules/distribution/src/bin/git-folder-structure.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/manage-git-repo.sh
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/bin/manage-git-repo.sh 
b/products/stratos/modules/distribution/src/bin/manage-git-repo.sh
deleted file mode 100644
index 0d70b9a..0000000
--- a/products/stratos/modules/distribution/src/bin/manage-git-repo.sh
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh 
b/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
deleted file mode 100644
index c36e539..0000000
--- a/products/stratos/modules/distribution/src/bin/remove_entry_zone_file.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/set-mysql-password.sh
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/bin/set-mysql-password.sh 
b/products/stratos/modules/distribution/src/bin/set-mysql-password.sh
deleted file mode 100644
index 477e0c7..0000000
--- a/products/stratos/modules/distribution/src/bin/set-mysql-password.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/stratos.bat
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/bin/stratos.bat 
b/products/stratos/modules/distribution/src/bin/stratos.bat
deleted file mode 100644
index bfa7665..0000000
--- a/products/stratos/modules/distribution/src/bin/stratos.bat
+++ /dev/null
@@ -1,172 +0,0 @@
-@echo off
-
-REM ---------------------------------------------------------------------------
-REM  Licensed to the Apache Software Foundation (ASF) under one
-REM  or more contributor license agreements. See the NOTICE file
-REM  distributed with this work for additional information
-REM  regarding copyright ownership. The ASF licenses this file
-REM  to you under the Apache License, Version 2.0 (the
-REM  "License"); you may not use this file except in compliance
-REM  with the License. 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,
-REM  software distributed under the License is distributed on an
-REM  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM  specific language governing permissions and limitations
-REM  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 
-Dstratos.component.startup.synchronizer.enabled=true"
-
-: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/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/stratos.sh
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/bin/stratos.sh 
b/products/stratos/modules/distribution/src/bin/stratos.sh
deleted file mode 100755
index 1eb48a4..0000000
--- a/products/stratos/modules/distribution/src/bin/stratos.sh
+++ /dev/null
@@ -1,307 +0,0 @@
-#!/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 > /dev/null ; 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 \
-    -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 \
-    -Ddisable.cassandra.server.startup=true \
-    -Djndi.properties.dir="$CARBON_HOME/repository/conf" \
-    
-Dthrift.client.config.file.path="$CARBON_HOME/repository/conf/thrift-client-config.xml"
 \
-    -Dstratos.component.startup.synchronizer.enabled=true \
-    -Dread.write.lock.monitor.enabled=false \
-    org.wso2.carbon.bootstrap.Bootstrap $*
-    status=$?
-done

http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/stratos/modules/distribution/src/bin/update-instance.sh
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/bin/update-instance.sh 
b/products/stratos/modules/distribution/src/bin/update-instance.sh
deleted file mode 100644
index 4effb49..0000000
--- a/products/stratos/modules/distribution/src/bin/update-instance.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/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

Reply via email to