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

[1/5] Adding JBoss cartridge

Repository: stratos
Updated Branches:
  refs/heads/4.0.0 a7b386736 -> bdb18372d


http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/init.pp.deb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp.deb b/tools/puppet3/modules/php/manifests/init.pp.deb
deleted file mode 100755
index 8fc53c7..0000000
--- a/tools/puppet3/modules/php/manifests/init.pp.deb
+++ /dev/null
@@ -1,119 +0,0 @@
-# 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.
-
-class php ($syslog="", $docroot="/var/www", $samlalias="") {
-  $packages = [
-    'nano',
-    'zip',
-    'build-essential',
-    'mysql-client',
-    'apache2',
-    'php5',
-    'php5-cli',
-    'libapache2-mod-php5',
-    'php5-gd',
-    'php5-mysql',
-    'php-db',
-    'php-pear',
-    'php5-curl',
-    'curl',
-    'wget',
-    'php5-ldap',
-    'php5-adodb',
-    'mailutils',
-    'php5-imap',
-    'php5-sqlite',
-    'php5-xmlrpc',
-    'php5-xsl',
-    'openssl',
-    'ssl-cert',
-    'ldap-utils',
-    'php5-mcrypt',
-    'mcrypt',
-    'ufw',
-    'fail2ban',
-    'git',
-    'libboost-all-dev',
-    'ruby']
-
-#  file { '/etc/apt/apt.conf.d/90forceyes':
-#    ensure => present,
-#    source => 'puppet:///modules/php/90forceyes';
-#  }
-
-#  exec { 'update-apt':
-#    path    => ['/bin', '/usr/bin'],
-#    command => 'apt-get update > /dev/null 2>&1 &',
-#    require => File['/etc/apt/apt.conf.d/90forceyes'],
-#  }
-
-  package { $packages:
-    ensure   => installed,
-  }
-
-  # Apache
-#  file {
-#    '/etc/apache2/apache2.conf':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/apache2.conf.erb'),
-#      require => Package['apache2'];
-
-#    '/etc/apache2/sites-available/default':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default.erb'),
-#      require => Package['apache2'];
-#
-#    '/etc/apache2/sites-available/default-ssl':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default-ssl.erb'),
-#      require => Package['apache2'];
-#  }
-
-  exec {
-    'enable ssl module':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => 'a2enmod ssl',
-      notify  => Service['apache2'],
-      require => Package['apache2'];
-  }
-
-  service { 'apache2':
-    ensure    => running,
-    name      => 'apache2',
-    hasstatus => true,
-    pattern   => 'apache2',
-    require   => Package['apache2'];
-  }
-
-  # Apache end
-
-  exec { 'clone git repo': 
-    provider => shell,
-    cwd      => '/var/www',
-    command  => "git clone ${stratos_git_repo}",
-    require  => Package['apache2'];
-  }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/init.pp.rpm
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp.rpm b/tools/puppet3/modules/php/manifests/init.pp.rpm
deleted file mode 100755
index 42aba65..0000000
--- a/tools/puppet3/modules/php/manifests/init.pp.rpm
+++ /dev/null
@@ -1,95 +0,0 @@
-# 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.
-
-class php ($syslog="", $docroot="", $samlalias="") {
-  $packages = [
-    'httpd',
-    'openssl.x86_64',
-    'mod_ssl.x86_64',
-    'php',
-    'php-adodb.noarch',
-    'php-dba.x86_64',
-    'php-gd.x86_64',
-    'php-imap.x86_64',
-    'php-ldap.x86_64',
-    'php-mcrypt.x86_64',
-    'php-mysql.x86_64',
-    'php-pear.noarch',
-    'php-xml.x86_64',
-    'php-xmlrpc.x86_64',
-    'php.x86_64',
-    ]
-
-#  file { '/etc/apt/apt.conf.d/90forceyes':
-#    ensure => present,
-#    source => 'puppet:///modules/php/90forceyes';
-#  }
-
-#  exec { 'update-apt':
-#    path    => ['/bin', '/usr/bin'],
-#    command => 'apt-get update > /dev/null 2>&1 &',
-#    require => File['/etc/apt/apt.conf.d/90forceyes'],
-#  }
-
-  package { $packages:
-    ensure   => installed,
-  }
-
-  # Apache
-#  file {
-#    '/etc/apache2/apache2.conf':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/apache2.conf.erb'),
-#      require => Package['apache2'];
-#
-#    '/etc/apache2/sites-available/default':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default.erb'),
-#      require => Package['apache2'];
-#
-#    '/etc/apache2/sites-available/default-ssl':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default-ssl.erb'),
-#      require => Package['apache2'];
-#  }
-
-#  exec {
-#    'enable ssl module':
-#      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-#      command => 'a2enmod ssl',
-#      require => Package['apache2'];
-#  }
-
-  service { 'httpd':
-    ensure    => running,
-    name      => 'httpd',
-    hasstatus => true,
-    pattern   => 'httpd',
-    require   => Package['httpd'];
-  }
-
-  # Apache end
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/templates/apache2/sites-available/default-ssl.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/templates/apache2/sites-available/default-ssl.erb b/tools/puppet3/modules/php/templates/apache2/sites-available/default-ssl.erb
index 1320328..0d9c6ca 100755
--- a/tools/puppet3/modules/php/templates/apache2/sites-available/default-ssl.erb
+++ b/tools/puppet3/modules/php/templates/apache2/sites-available/default-ssl.erb
@@ -24,7 +24,7 @@
 <VirtualHost _default_:443>
 	ServerAdmin webmaster@localhost
 
-	DocumentRoot <%= docroot %>
+	DocumentRoot <%= docroot %>/www/
         Alias /simplesaml <%= samlalias %>
 	<Directory />
 		Options FollowSymLinks
@@ -71,8 +71,13 @@
 	#   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
 	#   If both key and certificate are stored in the same file, only the
 	#   SSLCertificateFile directive is needed.
-	SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
-	SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+	<%- if (@ssl_enabled == 'true' and @ssl_certificate_file and @ssl_key_file) -%>
+           SSLCertificateFile    /etc/ssl/certs/stratos-ssl-cert.pem
+           SSLCertificateKeyFile /etc/ssl/private/stratos-ssl-key.pem
+        <%- else -%>
+           SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
+	   SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+        <%- end -%>
 
 	#   Server Certificate Chain:
 	#   Point SSLCertificateChainFile at a file containing the

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/templates/apache2/sites-available/default.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/templates/apache2/sites-available/default.erb b/tools/puppet3/modules/php/templates/apache2/sites-available/default.erb
index 4b416ac..51da537 100755
--- a/tools/puppet3/modules/php/templates/apache2/sites-available/default.erb
+++ b/tools/puppet3/modules/php/templates/apache2/sites-available/default.erb
@@ -23,7 +23,7 @@
 <VirtualHost *:80>
 	ServerAdmin webmaster@localhost
 
-	DocumentRoot <%= docroot %>
+	DocumentRoot <%= docroot %>/www/
 	Alias /simplesaml <%= samlalias %>
 	<Directory />
 		Options FollowSymLinks

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/puppet.conf
----------------------------------------------------------------------
diff --git a/tools/puppet3/puppet.conf b/tools/puppet3/puppet.conf
index 4854197..7a84a97 100644
--- a/tools/puppet3/puppet.conf
+++ b/tools/puppet3/puppet.conf
@@ -16,6 +16,7 @@
 # under the License.
 
 [main]
+#server=puppet
 logdir=/var/log/puppet
 vardir=/var/lib/puppet
 ssldir=/var/lib/puppet/ssl


[3/5] git commit: Merge branch '4.0.0' of github.com:apache/stratos into jboss

Posted by ra...@apache.org.
Merge branch '4.0.0' of github.com:apache/stratos into jboss


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6ccc74c5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6ccc74c5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6ccc74c5

Branch: refs/heads/4.0.0
Commit: 6ccc74c55c36d27732dae4e318a467b1d69f0153
Parents: 8d77f9a a7b3867
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Jul 22 11:14:32 2014 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Jul 22 11:14:32 2014 +0530

----------------------------------------------------------------------
 NOTICE                                          |   2 +-
 README.md                                       |   4 +-
 .../stratos/autoscaler/PartitionContext.java    |   6 +-
 .../cloud/controller/CloudControllerClient.java |  25 +-
 .../AutoscalerTopologyEventReceiver.java        |  82 +-
 .../autoscaler/monitor/AbstractMonitor.java     |  25 +-
 .../autoscaler/monitor/ClusterMonitor.java      | 115 ++-
 .../autoscaler/monitor/LbClusterMonitor.java    |  26 +-
 .../autoscaler/rule/RuleTasksDelegator.java     |  43 +-
 .../autoscaler/util/AutoScalerConstants.java    |   6 +
 .../stratos/autoscaler/util/AutoscalerUtil.java |  26 +-
 .../cartridge/agent/ArtifactCopyTask.java       |  39 +
 .../stratos/cartridge/agent/CartridgeAgent.java | 478 ++++++---
 .../apache/stratos/cartridge/agent/Main.java    |  40 +-
 .../cartridge/agent/RepositoryFileListener.java |   8 +-
 .../synchronizer/RepositoryInformation.java     |  10 +-
 .../git/impl/GitBasedArtifactRepository.java    | 740 +++++++++-----
 .../GitDeploymentSynchronizerConstants.java     |  12 +
 .../synchronizer/git/util/Utilities.java        |   3 +
 .../config/CartridgeAgentConfiguration.java     | 348 +++++--
 .../config/configurator/JndiConfigurator.java   |  21 +-
 .../agent/data/publisher/log/Constants.java     |  13 +
 .../publisher/log/FileBasedLogPublisher.java    |   6 +-
 .../agent/data/publisher/log/LogPublisher.java  |   9 +-
 .../data/publisher/log/LogPublisherManager.java |  65 +-
 .../publisher/CartridgeAgentEventPublisher.java |  11 +-
 .../extensions/DefaultExtensionHandler.java     | 992 +++++++++++++++++++
 .../agent/extensions/ExtensionHandler.java      |  64 ++
 .../agent/util/CartridgeAgentConstants.java     |  56 +-
 .../agent/util/CartridgeAgentUtils.java         |   5 +-
 .../cartridge/agent/util/ExtensionUtils.java    | 500 +++++++++-
 .../stratos/cli/RestCommandLineService.java     | 310 +++++-
 .../apache/stratos/cli/StratosApplication.java  |   2 +-
 .../stratos/cli/beans/cartridge/Cartridge.java  |   9 +
 .../stratos/cli/commands/SubscribeCommand.java  | 347 ++++---
 .../concurrent/PartitionValidatorCallable.java  |   4 +
 .../controller/iaases/OpenstackNovaIaas.java    |   8 +-
 .../impl/CloudControllerServiceImpl.java        |  80 +-
 .../cloud/controller/pojo/Cartridge.java        |  52 +-
 .../cloud/controller/pojo/CartridgeInfo.java    |  10 +
 .../cloud/controller/pojo/MemberContext.java    |  10 +
 .../CartridgeInstanceDataPublisher.java         | 123 ++-
 .../controller/topology/TopologyBuilder.java    |  98 +-
 .../topology/TopologyEventPublisher.java        |  27 +-
 .../util/CloudControllerConstants.java          |   1 +
 .../controller/util/CloudControllerUtil.java    |   1 +
 .../validate/AWSEC2PartitionValidator.java      |  30 +-
 .../stratos/common/util/CommandUtils.java       |  30 +
 .../extension/api/LoadBalancerExtension.java    |  13 +-
 .../LoadBalancerTenantEventReceiver.java        | 199 ++--
 .../LoadBalancerTopologyEventReceiver.java      |  37 +-
 .../conf/LoadBalancerConfiguration.java         |  29 +-
 .../balancer/context/LoadBalancerContext.java   |  11 +-
 .../context/LoadBalancerContextUtil.java        | 417 +++++++-
 .../context/map/HostNameAppContextMap.java      |  51 +
 .../context/map/HostNameClusterMap.java         |   2 +-
 .../context/map/MultiTenantClusterMap.java      |  13 +-
 .../TenantAwareLoadBalanceEndpoint.java         | 398 ++++++--
 .../stratos/load/balancer/util/Constants.java   |   9 +-
 .../test/LoadBalancerConfigurationTest.java     |  26 +-
 .../console/cartridge_info.jag                  |  10 +
 .../console/cartridge_info_sg.jag               |  69 ++
 .../console/cartridges.jag                      |   3 +
 .../console/config/acl.json                     |   4 +-
 .../console/configure_stratos_wizard.jag        |   3 +
 .../controllers/cartridgeSubscribeSubmit.jag    |  60 +-
 .../controllers/cartridgeUnsubscribeSubmit.jag  |  29 +-
 .../console/controllers/loginSubmit.jag         |   1 +
 .../console/controllers/mycartridges.jag        |   2 +-
 .../console/index.jag                           |   5 +
 .../console/subscribe_cartridge.jag             |  14 +-
 .../console/tenant_management.jag               |   3 +
 .../console/themes/theme1/pages/index.hbs       |   2 +-
 .../themes/theme1/partials/cartridge_info.hbs   |   8 +-
 .../theme1/partials/cartridge_info_sg.hbs       | 125 +++
 .../themes/theme1/partials/cartridges.hbs       |  56 +-
 .../partials/configure_stratos_wizard.hbs       |  29 +-
 .../console/themes/theme1/partials/header.hbs   |   1 +
 .../themes/theme1/partials/mycartridges.hbs     |  52 +-
 .../theme1/partials/subscribe_cartridge.hbs     |  63 +-
 .../themes/theme1/renderers/cartridge_info.js   |   3 +-
 .../theme1/renderers/cartridge_info_sg.js       |  99 ++
 .../themes/theme1/renderers/cartridges.js       |   7 +-
 .../theme1/renderers/configure_stratos.js       |   1 +
 .../renderers/configure_stratos_wizard.js       |   1 +
 .../themes/theme1/renderers/dashboard.js        |   4 +-
 .../console/themes/theme1/renderers/index.js    |   5 +-
 .../theme1/renderers/subscribe_cartridge.js     |   6 +-
 .../theme1/renderers/tenant_management.js       |   4 +-
 .../themes/theme1/renderers/tenant_new.js       |   3 +-
 .../console/themes/theme1/theme.js              |  13 +
 .../console/themes/theme1/ui/css/main.css       |   9 +-
 .../console/themes/theme1/ui/img/egg-logo.png   | Bin 0 -> 8299 bytes
 .../console/themes/theme1/ui/js/mycartridges.js |   3 +-
 .../console/util/utility.jag                    |   7 +
 .../src/main/resources/META-INF/product.xml     |   6 +-
 .../behaviour/CartridgeMgtBehaviour.java        |  13 +-
 .../org/apache/stratos/manager/dao/Cluster.java |   6 +-
 .../stratos/manager/deploy/service/Service.java |   9 +-
 .../service/ServiceDeploymentManager.java       |  49 +-
 .../multitenant/lb/DefaultLBService.java        | 110 ++
 .../multitenant/lb/ExistingLBService.java       |  52 +
 .../service/multitenant/lb/LBService.java       |  69 ++
 .../multitenant/lb/ServiceAwareLBService.java   | 137 +++
 .../category/DefaultLoadBalancerCategory.java   |  13 +-
 .../ServiceLevelLoadBalancerCategory.java       |   6 +-
 .../manager/CartridgeSubscriptionManager.java   | 224 ++++-
 .../manager/payload/BasicPayloadData.java       |  15 +-
 .../InstanceNotificationPublisher.java          |   5 +-
 .../publisher/TenantSynzhronizerTask.java       |  19 +-
 .../stratos/manager/repository/Repository.java  |   9 +
 .../repository/RepositoryNotification.java      |   2 +-
 .../DataInsertionAndRetrievalManager.java       |  25 +
 .../subscription/CartridgeSubscription.java     |  34 +-
 .../InternalRepoBasedCartridgeSubscription.java |  14 +-
 .../subscription/LBCartridgeSubscription.java   |  26 +-
 .../manager/subscription/SubscriptionData.java  |  34 +
 .../subscription/SubscriptionDomain.java        |  48 +
 .../factory/CartridgeSubscriptionFactory.java   |   9 +-
 .../utils/CartridgeSubscriptionUtils.java       |  29 +-
 .../model/TopologyClusterInformationModel.java  |  19 +
 .../manager/utils/RepositoryCreator.java        |   7 +-
 components/org.apache.stratos.messaging/pom.xml |   5 +
 .../messaging/domain/tenant/Subscription.java   |  77 ++
 .../domain/tenant/SubscriptionDomain.java       |  41 +
 .../stratos/messaging/domain/tenant/Tenant.java |  29 +-
 .../messaging/domain/topology/Cluster.java      |  10 +
 .../domain/topology/ClusterStatus.java          |  36 +
 .../messaging/domain/topology/Member.java       |  68 +-
 .../messaging/domain/topology/Service.java      |  30 +-
 .../instance/notifier/ArtifactUpdatedEvent.java |   9 +
 .../tenant/SubscriptionDomainAddedEvent.java    |  67 ++
 .../tenant/SubscriptionDomainRemovedEvent.java  |  60 ++
 .../tenant/SubscriptionDomainsAddedEvent.java   |  60 ++
 .../tenant/SubscriptionDomainsRemovedEvent.java |  60 ++
 .../event/tenant/TenantSubscribedEvent.java     |   9 +-
 .../event/tenant/TenantUnSubscribedEvent.java   |  10 +-
 .../topology/ClusterMaintenanceModeEvent.java   |  58 ++
 .../event/topology/InstanceSpawnedEvent.java    |  12 +-
 .../event/topology/MemberActivatedEvent.java    |  40 +-
 .../event/topology/MemberTerminatedEvent.java   |  11 +
 .../event/topology/ServiceCreatedEvent.java     |  37 +-
 .../SubscriptionDomainsAddedEventListener.java  |  28 +
 ...SubscriptionDomainsRemovedEventListener.java |  28 +
 .../ClusterMaintenanceModeEventListener.java    |  25 +
 ...SubscriptionDomainAddedMessageProcessor.java |  95 ++
 ...bscriptionDomainRemovedMessageProcessor.java |  94 ++
 .../tenant/TenantMessageProcessorChain.java     |  12 +
 .../TenantSubscribedMessageProcessor.java       |   5 +-
 .../TenantUnSubscribedMessageProcessor.java     |   2 +-
 .../ClusterMaintenanceModeMessageProcessor.java | 115 +++
 .../InstanceSpawnedMessageProcessor.java        |   1 +
 .../topology/TopologyMessageProcessorChain.java |   6 +
 .../message/receiver/tenant/TenantManager.java  |   5 +
 .../stratos/messaging/util/Constants.java       |   2 +
 .../messaging/test/TenantDomainTest.java        |  45 +
 .../rest/endpoint/bean/CartridgeInfoBean.java   |  11 +
 .../bean/SubscriptionDomainRequest.java         |  35 +
 .../domain/SubscriptionDomainBean.java          |  29 +
 .../bean/util/converter/PojoConverter.java      |  30 +
 .../CustomThrowableExceptionMapper.java         |  39 +
 .../handlers/GenericExceptionMapper.java        |  46 +
 .../handlers/StratosAuthenticationHandler.java  |  43 +-
 .../stratos/rest/endpoint/mock/MockContext.java |  88 ++
 .../rest/endpoint/mock/StratosTestAdmin.java    |  46 +-
 .../rest/endpoint/services/ServiceUtils.java    | 130 ++-
 .../rest/endpoint/services/StratosAdmin.java    | 106 +-
 .../webapp/stratos-test/WEB-INF/cxf-servlet.xml |   2 +
 .../main/webapp/stratos/WEB-INF/cxf-servlet.xml |   4 +
 .../mgt/ui/servlets/ThemeResourceServlet.java   | 125 +++
 .../mgt/ui/servlets/ThemeResourceSevelet.java   | 125 ---
 .../src/main/resources/META-INF/component.xml   |   2 +-
 .../stratos/haproxy/extension/HAProxy.java      |   3 +
 .../haproxy/extension/HAProxyConfigWriter.java  |  84 +-
 .../extension/HAProxyStatisticsReader.java      |  38 +-
 .../src/main/templates/haproxy.cfg.template     |   9 +-
 pom.xml                                         |  26 +-
 .../distribution/src/main/assembly/bin.xml      |  12 +-
 .../distribution/src/main/bin/stratos.sh        |  31 +-
 .../distribution/src/main/conf/log4j.properties |   4 +-
 .../conf/templates/jndi.properties.template     |   6 +-
 .../src/main/extensions/artifacts-copy.sh       |  29 +
 .../src/main/extensions/artifacts-updated.sh    |   2 +-
 .../distribution/src/main/extensions/clean.sh   |   2 +-
 .../src/main/extensions/complete-tenant.sh      |  30 +
 .../src/main/extensions/complete-topology.sh    |  34 +
 .../src/main/extensions/instance-activated.sh   |   2 +-
 .../src/main/extensions/instance-started.sh     |   2 +-
 .../src/main/extensions/member-activated.sh     |  43 +
 .../src/main/extensions/member-started.sh       |  43 +
 .../src/main/extensions/member-suspended.sh     |  43 +
 .../src/main/extensions/member-terminated.sh    |  43 +
 .../src/main/extensions/mount-volumes.sh        |  87 ++
 .../src/main/extensions/start-servers.sh        |  14 +-
 .../extensions/subscription-domain-added.sh     |  37 +
 .../extensions/subscription-domain-removed.sh   |  36 +
 .../modules/distribution/README.txt             |   2 +-
 products/stratos-cli/distribution/README.txt    |   2 +-
 products/stratos/conf/tenant-mgt.xml            |  42 +
 .../modules/distribution/src/assembly/bin.xml   |  17 +-
 .../distribution/src/main/conf/autoscaler.xml   |   2 +
 .../distribution/src/main/conf/log4j.properties |   4 +-
 .../distribution/src/main/conf/mincheck.drl     |  13 +-
 .../distribution/src/main/conf/scaling.drl      |  17 +-
 .../src/main/conf/siddhi/siddhi.extension       |   1 +
 .../main/resources/CloudControllerService.wsdl  | 769 +++++++-------
 .../modules/agent/files/activemq/README.txt     |   1 +
 tools/puppet3/modules/agent/manifests/init.pp   |  25 +-
 .../modules/agent/manifests/initialize.pp       |  31 +-
 tools/puppet3/modules/agent/manifests/start.pp  |   1 +
 .../modules/agent/templates/bin/stratos.sh.erb  |  36 +-
 .../agent/templates/conf/log4j.properties.erb   |  40 +
 .../templates/extensions/artifacts-copy.sh.erb  |  29 +
 .../extensions/artifacts-updated.sh.erb         |   2 +-
 .../agent/templates/extensions/clean.sh.erb     |   2 +-
 .../templates/extensions/complete-tenant.sh.erb |  30 +
 .../extensions/complete-topology.sh.erb         |  34 +
 .../extensions/instance-activated.sh.erb        |   2 +-
 .../extensions/instance-started.sh.erb          |  11 +-
 .../extensions/member-activated.sh.erb          | 303 ++++++
 .../templates/extensions/member-started.sh.erb  |  43 +
 .../extensions/member-suspended.sh.erb          |  43 +
 .../extensions/member-terminated.sh.erb         |  43 +
 .../templates/extensions/mount-volumes.sh.erb   |  87 ++
 .../templates/extensions/start-servers.sh.erb   | 285 +++++-
 .../extensions/subscription-domain-added.sh.erb |  35 +
 .../subscription-domain-removed.sh.erb          |  34 +
 tools/puppet3/modules/haproxy/files/README.txt  |  12 +
 tools/puppet3/modules/haproxy/manifests/init.pp |  70 ++
 .../modules/haproxy/manifests/initialize.pp     |  77 ++
 .../modules/haproxy/manifests/push_templates.pp |  30 +
 .../puppet3/modules/haproxy/manifests/start.pp  |  25 +
 .../templates/bin/haproxy-extension.sh.erb      |  48 +
 .../haproxy/templates/conf/jndi.properties.erb  |  33 +
 tools/stratos-installer/README.txt              |   2 +-
 235 files changed, 10669 insertions(+), 2147 deletions(-)
----------------------------------------------------------------------



[4/5] git commit: Added artifacts updated extension for Jboss

Posted by ra...@apache.org.
Added artifacts updated extension for Jboss


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/877fa836
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/877fa836
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/877fa836

Branch: refs/heads/4.0.0
Commit: 877fa83661b48854ec6b4122240853d762343f4c
Parents: 6ccc74c
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Jul 22 12:41:01 2014 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Jul 22 12:41:01 2014 +0530

----------------------------------------------------------------------
 tools/puppet3/manifests/nodes.pp                  |  7 +++++--
 .../templates/extensions/addons/_jboss-as.erb     | 18 ++++++++++++++++++
 .../templates/extensions/artifacts-updated.sh.erb |  9 +++++----
 3 files changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/manifests/nodes.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/manifests/nodes.pp b/tools/puppet3/manifests/nodes.pp
index dae8aa1..0b4c9c4 100644
--- a/tools/puppet3/manifests/nodes.pp
+++ b/tools/puppet3/manifests/nodes.pp
@@ -28,6 +28,7 @@ node 'base' {
   $truststore_password  = 'wso2carbon'
   $java_distribution	= 'jdk-7u51-linux-x64.tar.gz'
   $java_name		= 'jdk1.7.0_51'
+  $java_home            = '/opt/java'
   $member_type_ip       = 'private'
   $lb_httpPort          = '80'
   $lb_httpsPort         = '443'
@@ -69,10 +70,12 @@ node /jboss/ inherits base {
   $product = 'jboss-as'
   $version = '7.1.1.Final'
   $docroot = "/mnt/${product}-${version}/standalone/deployments/"
+  $jboss_user    = 'jbossas1'
+  $jboss_group   = 'jboss'
   require java
   class {'jboss': 
-     user       => 'jbossas1',
-     group      => 'jboss',
+     user       => $jboss_user,
+     group      => $jboss_group,
      java_home  => $java_home,
      version    => $version,
      java_opts  => "-Xms512m -Xmx3000m",

http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb b/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
new file mode 100755
index 0000000..b6e23be
--- /dev/null
+++ b/tools/puppet3/modules/agent/templates/extensions/addons/_jboss-as.erb
@@ -0,0 +1,18 @@
+# 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.
+
+chown -R <%= @jboss_user %>:<%= @jboss_group %> <%= @docroot %>

http://git-wip-us.apache.org/repos/asf/stratos/blob/877fa836/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb b/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
index 37b7791..1735603 100755
--- a/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
+++ b/tools/puppet3/modules/agent/templates/extensions/artifacts-updated.sh.erb
@@ -27,7 +27,8 @@
 log=/var/log/apache-stratos/cartridge-agent-extensions.log
 echo `date`": Artifacts Updated Event" | tee -a $log
 
-
-<%- if @type == 'php' -%>
-<%= scope.function_template(['agent/extensions/addons/_php.erb']) -%>
-<%- end -%>
+<%-  if @type == 'php' -%>
+<%=     scope.function_template(['agent/extensions/addons/_php.erb']) -%>
+<%-  elsif @type == 'jboss-as' -%>
+<%=     scope.function_template(['agent/extensions/addons/_jboss-as.erb']) -%>
+<%-  end -%>


[2/5] git commit: Adding JBoss cartridge

Posted by ra...@apache.org.
Adding  JBoss cartridge


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8d77f9a8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8d77f9a8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8d77f9a8

Branch: refs/heads/4.0.0
Commit: 8d77f9a81aa9c40a3d3b03eae1bbc41d8a05fd83
Parents: fcc90fc
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Jul 22 10:07:39 2014 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Tue Jul 22 10:07:39 2014 +0530

----------------------------------------------------------------------
 tools/puppet3/manifests/nodes.pp                |  48 ++-
 tools/puppet3/modules/jboss/files/README.txt    |   7 +
 tools/puppet3/modules/jboss/manifests/as.pp     |  72 ++++
 tools/puppet3/modules/jboss/manifests/config.pp |  46 ++
 .../modules/jboss/manifests/extra_jars.pp       |  42 ++
 .../puppet3/modules/jboss/manifests/hornetq.pp  |  66 +++
 .../modules/jboss/manifests/importssl.pp        |  76 ++++
 tools/puppet3/modules/jboss/manifests/init.pp   |  49 +++
 .../puppet3/modules/jboss/manifests/install.pp  |  86 ++++
 .../puppet3/modules/jboss/manifests/service.pp  | 105 +++++
 tools/puppet3/modules/jboss/manifests/user.pp   |  51 +++
 .../modules/jboss/templates/hornetq/run.erb     |  18 +
 .../templates/jboss-as/jboss.properties.erb     |  23 +
 .../modules/jboss/templates/jboss-as/run.erb    |  43 ++
 .../templates/jboss-as/standalone-full.xml.erb  | 431 +++++++++++++++++++
 .../modules/lb/files/configs/bin/stratos.sh     |   1 +
 tools/puppet3/modules/lb/manifests/importssl.pp |  45 ++
 tools/puppet3/modules/lb/manifests/init.pp      |  24 +-
 tools/puppet3/modules/lb/manifests/start.pp     |   1 +
 .../modules/lb/templates/bin/stratos.sh.erb     | 308 +++++++++++++
 .../puppet3/modules/php/manifests/importssl.pp  |  40 ++
 tools/puppet3/modules/php/manifests/init.pp     |  43 +-
 .../puppet3/modules/php/manifests/init.pp.back  | 131 ------
 .../puppet3/modules/php/manifests/init.pp.cent  | 111 -----
 tools/puppet3/modules/php/manifests/init.pp.deb | 119 -----
 tools/puppet3/modules/php/manifests/init.pp.rpm |  95 ----
 .../apache2/sites-available/default-ssl.erb     |  11 +-
 .../apache2/sites-available/default.erb         |   2 +-
 tools/puppet3/puppet.conf                       |   1 +
 29 files changed, 1614 insertions(+), 481 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/manifests/nodes.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/manifests/nodes.pp b/tools/puppet3/manifests/nodes.pp
index 519de39..dae8aa1 100644
--- a/tools/puppet3/manifests/nodes.pp
+++ b/tools/puppet3/manifests/nodes.pp
@@ -20,8 +20,8 @@ node 'base' {
   #essential variables
   $package_repo         = 'http://10.4.128.7'
   $local_package_dir    = '/mnt/packs'
-  $mb_ip                = '127.0.0.1'
-  $mb_port              = '61616'
+  $mb_ip                = 'MB_IP'
+  $mb_port              = 'MB_PORT'
   $mb_type		= 'activemq' #in wso2 mb case, value should be 'wso2mb'
   $cep_ip               = '127.0.0.1'
   $cep_port             = '7611'
@@ -38,8 +38,52 @@ node 'base' {
   $bam_secure_port	= '7711'
   $bam_username		= 'admin'
   $bam_password		= 'admin'
+  $ssl_enabled          = 'false'
+  $ssl_certificate_file = ''
+  $ssl_key_file         = ''
+  $ssl_ca_cert_file     = ''
+
+  $extension_instance_started             = 'instance-started.sh'
+  $extension_start_servers                = 'start-servers.sh'
+  $extension_instance_activated           = 'instance-activated.sh'
+  $extension_artifacts_updated            = 'artifacts-updated.sh'
+  $extension_clean                        = 'clean.sh'
+  $extension_mount_volumes                = 'mount-volumes.sh'
+  $extension_member_started               = 'member-started.sh'
+  $extension_member_activated             = 'member-activated.sh'
+  $extension_member_terminated            = 'member-terminated.sh'
+  $extension_member_suspended             = 'member-suspended.sh'
+  $extension_complete_topology            = 'complete-topology.sh'
+  $extension_complete_tenant              = 'complete-tenant.sh'
+  $extension_subscription_domain_added    = 'subscription-domain-added.sh'
+  $extension_subscription_domain_removed  = 'subscription-domain-removed.sh'
+  $extension_artifacts_copy               = 'artifacts-copy.sh'
+  $extension_tenant_subscribed            = 'tenant-subscribed.sh'
+  $extension_tenant_unsubscribed          = 'tenant-unsubscribed.sh'
+  $agent_log_level = "INFO"
+  $extensions_dir = '${script_path}/../extensions'
+}
+
+# Jboss cartridge node
+node /jboss/ inherits base {
+  $product = 'jboss-as'
+  $version = '7.1.1.Final'
+  $docroot = "/mnt/${product}-${version}/standalone/deployments/"
+  require java
+  class {'jboss': 
+     user       => 'jbossas1',
+     group      => 'jboss',
+     java_home  => $java_home,
+     version    => $version,
+     java_opts  => "-Xms512m -Xmx3000m",
+     extra_jars => ['mysql-connector-java-5.1.29-bin.jar']
+  }
 
+  class {'agent':
+     type => $product
+  }
 
+  Class['jboss'] -> Class['agent']
 }
 
 # php cartridge node

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/files/README.txt
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/files/README.txt b/tools/puppet3/modules/jboss/files/README.txt
new file mode 100644
index 0000000..5be9cb1
--- /dev/null
+++ b/tools/puppet3/modules/jboss/files/README.txt
@@ -0,0 +1,7 @@
+This folder should have the following:
+
+1. JBoss binary file 
+     - jboss-as-7.1.1.Final.tar.gz  
+
+2. Extra jar files
+     - mysql-connector-java-5.1.29-bin.jar

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/as.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/as.pp b/tools/puppet3/modules/jboss/manifests/as.pp
new file mode 100644
index 0000000..ea4fb25
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/as.pp
@@ -0,0 +1,72 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss Application Server type
+
+define jboss::as (
+  $bind_address           = $::fqdn,
+  $extra_jars             = [],
+  $group                  = 'jboss',
+  $home                   = '/home',
+  $java_home              = '/usr/java/latest',
+  $java_opts              = '',
+  $version                = undef,
+  $basedir                = '/mnt',  
+) {
+
+  $user        = $title
+  $product     = 'jboss-as'
+  $product_dir = "${basedir}/${product}-${version}" 
+
+  jboss::user { $user: group => $group }
+
+  jboss::install { "${user}-${product}":
+    version     => "${product}-${version}",
+    user        => $user,
+    group       => $group,
+    basedir     => $basedir,
+    product     => $product,
+    require     => Jboss::User[$user]
+  }
+  
+  jboss::extra_jars { $extra_jars:
+    product_dir => $product_dir,
+    destination => "${product_dir}/standalone/lib/ext",
+    user        => $user,
+    require     => Jboss::Install["${user}-${product}"],
+  }  
+
+  jboss::service{ "${user}-${product}":
+    product      => $product,
+    user         => $user,
+    group        => $group,
+    version      => $version,
+    java_home    => $java_home,
+    java_opts    => $java_opts,
+    home         => $home,
+    product_dir  => $product_dir,
+    bind_address => $bind_address,
+    require      => [
+                       Jboss::Install["${user}-${product}"],
+                       Jboss::Extra_jars[$extra_jars]
+                    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/config.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/config.pp b/tools/puppet3/modules/jboss/manifests/config.pp
new file mode 100644
index 0000000..6b89023
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/config.pp
@@ -0,0 +1,46 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss configuration class
+
+class jboss::config {
+  # TODO: Find recommended values
+  augeas { 'jboss-sysctl':
+    context => '/files/etc/sysctl.conf',
+    changes => [
+      'set net.ipv4.tcp_fin_timeout 30',
+      'set fs.file-max 2097152',
+      'set net.ipv4.tcp_tw_recycle 1',
+      'set net.ipv4.tcp_tw_reuse 1',
+      'set net.core.rmem_default 524288',
+      'set net.core.wmem_default 524288',
+      'set net.core.rmem_max 67108864',
+      'set net.core.wmem_max 67108864',
+      'set net.ipv4.tcp_rmem 4096 87380 16777216',
+      'set net.ipv4.tcp_wmem 4096 65536 16777216',
+    ],
+  }
+  #limits::set { '@jboss':
+  #  item   => 'nofile',
+  #  soft   => '4096',
+  #  hard   => '65535'
+  #}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/extra_jars.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/extra_jars.pp b/tools/puppet3/modules/jboss/manifests/extra_jars.pp
new file mode 100644
index 0000000..92c6e86
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/extra_jars.pp
@@ -0,0 +1,42 @@
+#--------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#--------------------------------------------------------------
+
+# Jboss copy libraries
+
+define jboss::extra_jars (
+  $product_dir,
+  $destination,
+  $user,
+  $group = 'jboss',
+  $home  = '/home',
+) {
+
+  $jar_file = $title
+
+  file { "${destination}/${jar_file}":
+    ensure  => present,
+    owner   => $user,
+    group   => $group,
+    mode    => '0444',
+    source  => "puppet:///modules/jboss/${jar_file}",
+    require => File[$product_dir],
+  }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/hornetq.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/hornetq.pp b/tools/puppet3/modules/jboss/manifests/hornetq.pp
new file mode 100644
index 0000000..20b4ce8
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/hornetq.pp
@@ -0,0 +1,66 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss HornetQ type
+
+define jboss::hornetq (
+  $bind_address = $::fqdn,
+  $extra_jars   = [],
+  $group        = 'jboss',
+  $home         = '/home',
+  $java_home    = '/usr/java/latest',
+  $java_opts    = '',
+  $version      = undef,
+) {
+  $user        = $title
+  $product     = 'hornetq'
+  $product_dir = "${home}/${user}/${product}-${version}"
+
+  if ! defined(File["/etc/runit/${user}"]) {
+    runit::user { $user: group => $group }
+  }
+
+  jboss::install { "${user}-${product}":
+    version     => "${product}-${version}",
+    user        => $user,
+    group       => $group,
+    basedir     => "${home}/${user}",
+  }
+
+  $file_paths = prefix($extra_jars, "${product_dir}/")
+  jboss::extra_jars { $file_paths:
+    product_dir => $product_dir,
+    destination => "${product_dir}/standalone/lib/ext",
+    user        => $user,
+    require     => File[$product_dir],
+  }
+
+  jboss::service{ "${user}-${product}":
+    product      => $product,
+    user         => $user,
+    group        => $group,
+    version      => $version,
+    java_home    => $java_home,
+    java_opts    => $java_opts,
+    home         => $home,
+    bind_address => $bind_address,
+  }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/importssl.pp b/tools/puppet3/modules/jboss/manifests/importssl.pp
new file mode 100644
index 0000000..8fd6f69
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/importssl.pp
@@ -0,0 +1,76 @@
+# 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.
+
+# Imports the given self-signed SSL certificate to Jboss keystore
+
+define jboss::importssl (  
+  $stratos_ssl_key      = undef,
+  $stratos_ssl_cert     = undef,
+  $stratos_ssl_keystore = undef,    
+  $keystore_passwd      = 'changeit',
+  $keystore_alias       = 'jboss',
+  $home                 = '/home',
+  $user                 = undef,
+  $import_type          = 'native',
+  $product              = undef,
+  $java_home            = '/usr/java/latest'
+){
+
+   if $ssl_certificate_file and $ssl_key_file{
+        $crt_file = file( $ssl_certificate_file , '/dev/null' )
+        if($crt_file != '') {
+           file { "${stratos_ssl_cert}" :
+              owner     => $user,
+              content  => $crt_file,
+              mode     => 644
+           }
+        }
+       
+        $key_file = file( $ssl_key_file , '/dev/null' )
+        if($key_file != '') {
+           file { "${stratos_ssl_key}" :
+              owner     => $user,
+              content  => $key_file,
+              mode     => 600
+           }
+        }
+
+     if $import_type == 'jks' {
+
+        exec { 'create PKCS12 keystore':
+           user      => $user,
+           cwd       => "${home}/${user}/${product}",
+           path      => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',              
+           command   => "openssl pkcs12 -export -name ${keystore_alias} -in ${stratos_ssl_cert} -inkey ${stratos_ssl_key} -password pass:${keystore_passwd} -out ${home}/${user}/${product}/keystore.p12",
+           require   => [
+                           File["${stratos_ssl_cert}"],
+                           File["${stratos_ssl_key}"],
+                        ]; 
+        }
+
+        exec { 'import ssl to jks':
+           user      => $user,
+           cwd       => "${home}/${user}/${product}",
+           path      => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',              
+           command   => "${java_home}/bin/keytool -noprompt -importkeystore -destkeystore ${stratos_ssl_keystore} -srckeystore ${home}/${user}/${product}/keystore.p12 -srcstoretype pkcs12 -alias ${keystore_alias} -deststorepass ${keystore_passwd} -srcstorepass ${keystore_passwd}",
+           require   => Exec["create PKCS12 keystore"]                        
+        }
+      }
+
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/init.pp b/tools/puppet3/modules/jboss/manifests/init.pp
new file mode 100644
index 0000000..57c3a6b
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/init.pp
@@ -0,0 +1,49 @@
+#--------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#--------------------------------------------------------------
+
+# Jboss main class
+
+class jboss (
+   $user         = 'jbossas1',
+   $group        = 'jboss',
+   $java_home    = undef,
+   $java_opts    = '',
+   $version      = undef,
+   $basedir      = '/mnt',
+   $bind_address = '0.0.0.0',
+   $java_opts    = '',
+   $extra_jars   = []
+) {
+
+  include '::jboss::config'  
+
+  # Application Server
+  jboss::as { "jbossas1":
+    extra_jars     => $extra_jars,    
+    group          => $group,
+    java_home      => $java_home,
+    version        => $version,
+    basedir        => $basedir,
+    bind_address   => $bind_address,
+    java_opts      => $java_opts,
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/install.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/install.pp b/tools/puppet3/modules/jboss/manifests/install.pp
new file mode 100644
index 0000000..24ddfc0
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/install.pp
@@ -0,0 +1,86 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss install product
+
+define jboss::install (
+  $version,
+  $user,
+  $group,
+  $basedir,
+  $home = '/home',
+  $product = undef
+) {
+  $packfile = "${version}.tar.gz"
+  $subdir  = $version
+  if ! defined(Package['unzip']) {
+    package { 'unzip': ensure => installed }
+  }
+  if ! defined(Package['rsync']) {
+    package { 'rsync': ensure => installed }
+  }
+  if ! defined(Package['sed']) {
+    package { 'sed': ensure => installed }
+  }
+  if ! defined(Package['tar']) {
+    package { 'tar': ensure => installed }
+  }
+
+  # defaults
+  File {
+    owner => $user,
+    group => $group,
+  }
+
+  file { "${basedir}" :
+    ensure => directory,   
+    mode   => '0750',
+  }
+
+  file { "jboss-pack-${version}":
+    ensure  => present,
+    path    => "${basedir}/${packfile}",
+    mode    => '0444',
+    source  => "puppet:///modules/jboss/${packfile}",
+    require => File["${basedir}"],
+  }
+
+  exec { "jboss-unpack-${version}":
+    path    => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+    cwd     => $basedir,
+    command => "tar -xvzf '${basedir}/${packfile}'",
+    creates => "${basedir}/${subdir}",
+    notify  => Exec["jboss-fix-ownership-${version}"],
+    require => File["jboss-pack-${version}"],
+  }
+
+  file { "${basedir}/${subdir}":
+    ensure  => directory,
+    require => Exec["jboss-unpack-${version}"],
+  }   
+
+  exec { "jboss-fix-ownership-${version}":
+    path        => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+    command     => "chown -R ${user}:${group} ${basedir}/${subdir}",
+    refreshonly => true,
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/service.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/service.pp b/tools/puppet3/modules/jboss/manifests/service.pp
new file mode 100644
index 0000000..f4641a4
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/service.pp
@@ -0,0 +1,105 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss register service
+
+define jboss::service  (
+  $product      = undef,
+  $user         = undef,
+  $group        = undef,
+  $version      = undef,
+  $java_home    = '/usr/java/latest',
+  $java_opts    = '',
+  $home         = '/home',
+  $bind_address = $::fqdn,
+  $product_dir  = undef,
+) {
+
+  $jboss_properties = "${home}/${user}/${product}/jboss.properties"  
+  $stratos_ssl_cert = "${home}/${user}/${product}/cert.pem"
+  $stratos_ssl_key = "${home}/${user}/${product}/key.pem"
+  $stratos_ssl_keystore = "${home}/${user}/${product}/jboss.jks"
+  $keystore_passwd = "changeit"
+  $keystore_alias = "jboss"
+
+  # defaults
+  File {
+    owner => $user,
+    group => $group,
+  }
+
+  file { "${home}/${user}/${product}":
+    ensure => directory,   
+    mode   => '0750',
+  }
+
+  file { "${home}/${user}/${product}/run":
+    ensure  => present,
+    mode    => '0555',    
+    content => template("jboss/${product}/run.erb"),
+    require => File["${home}/${user}/${product}"],
+  }
+
+  file { $jboss_properties:
+    ensure  => present,
+    mode    => '755',
+    owner   => $user,
+    group   => $group,
+    content => template("jboss/${product}/jboss.properties.erb"),
+    require => File["${home}/${user}/${product}"],
+  }
+
+  file { "${product_dir}/standalone/configuration/standalone-full.xml":
+    ensure  => present,
+    mode    => '755',
+    owner   => $user,
+    group   => $group,
+    content => template("jboss/${product}/standalone-full.xml.erb"),
+    require => File["${product_dir}"],
+  } 
+
+  jboss::importssl { "${user}-${product}-ssl" :
+     user                 => $user,
+     stratos_ssl_cert     => $stratos_ssl_cert,
+     stratos_ssl_key      => $stratos_ssl_key,
+     import_type          => 'jks',
+     stratos_ssl_keystore => $stratos_ssl_keystore,
+     keystore_alias       => $keystore_alias,
+     keystore_passwd      => $keystore_passwd, 
+     product              => $product,
+     java_home            => $java_home,
+     require              => File["${home}/${user}/${product}"],
+  }
+
+  exec { "${user}-${product}-${version}":
+    path        => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+    cwd         => "${home}/${user}/${product}",
+    command     => "nohup bash run &",
+    user        => $user,
+    require     => [
+                     File["${home}/${user}/${product}/run"],
+                     File["${home}/${user}/${product}/jboss.properties"],
+                     File["${product_dir}/standalone/configuration/standalone-full.xml"],
+                     Jboss::Importssl["${user}-${product}-ssl"]
+                   ]
+  }
+ 
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/manifests/user.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/user.pp b/tools/puppet3/modules/jboss/manifests/user.pp
new file mode 100644
index 0000000..76fa424
--- /dev/null
+++ b/tools/puppet3/modules/jboss/manifests/user.pp
@@ -0,0 +1,51 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+# Jboss create user
+
+define jboss::user ( 
+  $group,  
+) {
+
+  $user = $title
+
+  file { "/home/${user}" : 
+    ensure => "directory", 
+    owner => "${user}", 
+    group => "${group}", 
+    mode => 700, 
+    require => [ User["${user}"], Group["${group}"] ], 
+  } 
+
+  group { "${group}" : 
+    ensure => "present", 
+  } 
+
+  user { "${user}" : 
+    ensure => "present", 
+    home => "/home/${user}", 
+    name => "${user}", 
+    shell => "/bin/bash", 
+    managehome => true,   
+  } 
+
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/templates/hornetq/run.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/templates/hornetq/run.erb b/tools/puppet3/modules/jboss/templates/hornetq/run.erb
new file mode 100644
index 0000000..62b9747
--- /dev/null
+++ b/tools/puppet3/modules/jboss/templates/hornetq/run.erb
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Redirect stderr so everything ends up in the log file
+exec 2>&1
+
+# Announce ourselves
+echo "<%= @product %> start"
+
+# Set environment variables
+export HORNETQ_HOME=$HOME/<%= @product %>-<%= @version %>
+export JAVA_HOME=<%= @java_home %>
+export JAVA_OPTS="<%= @java_opts %>"
+
+# Prefix the final command with exec and ensure it runs in the foreground
+unset LAUNCH_HORNETQ_IN_BACKGROUND
+exec $HORNETQ_HOME/bin/standalone.sh \
+  --properties=$HOME/configuration/hornetq.properties \
+  -b <%= bind_address %> \
+  --server-config=$HOME/configuration/standalone-full-ha.xml 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/templates/jboss-as/jboss.properties.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/templates/jboss-as/jboss.properties.erb b/tools/puppet3/modules/jboss/templates/jboss-as/jboss.properties.erb
new file mode 100644
index 0000000..f921cb4
--- /dev/null
+++ b/tools/puppet3/modules/jboss/templates/jboss-as/jboss.properties.erb
@@ -0,0 +1,23 @@
+#--------------------------------------------------------------
+#
+# 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.
+#
+#--------------------------------------------------------------
+
+jboss.bind.address.management=<%= @bind_address %>
+jboss.bind.address=<%= @bind_address %>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/templates/jboss-as/run.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/templates/jboss-as/run.erb b/tools/puppet3/modules/jboss/templates/jboss-as/run.erb
new file mode 100644
index 0000000..b0c2058
--- /dev/null
+++ b/tools/puppet3/modules/jboss/templates/jboss-as/run.erb
@@ -0,0 +1,43 @@
+#!/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.
+#
+#--------------------------------------------------------------
+
+# Redirect stderr so everything ends up in the log file
+exec 2>&1
+
+# Announce ourselves
+echo "<%= @product %> start"
+
+# Set environment variables
+export JBOSS_HOME=<%= @basedir %>/<%= @product %>-<%= @version %>
+export JAVA_HOME=<%= @java_home %>
+export JAVA_OPTS="<%= @java_opts %>"
+
+# Prefix the final command with exec
+/usr/bin/perl -pi -e 's#^(\s*eval)\s+\\#\1 exec \\#g' $JBOSS_HOME/bin/standalone.sh
+
+# and ensure it runs in the foreground
+unset LAUNCH_JBOSS_IN_BACKGROUND
+
+exec $JBOSS_HOME/bin/standalone.sh \
+  --properties=<%= @jboss_properties %> \
+  -b <%= @bind_address %> \
+  --server-config=standalone-full.xml 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/jboss/templates/jboss-as/standalone-full.xml.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/templates/jboss-as/standalone-full.xml.erb b/tools/puppet3/modules/jboss/templates/jboss-as/standalone-full.xml.erb
new file mode 100644
index 0000000..6787f4a
--- /dev/null
+++ b/tools/puppet3/modules/jboss/templates/jboss-as/standalone-full.xml.erb
@@ -0,0 +1,431 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- 
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+-->
+<server xmlns="urn:jboss:domain:1.2">
+    <extensions>
+        <extension module="org.jboss.as.clustering.infinispan"/>
+        <extension module="org.jboss.as.cmp"/>
+        <extension module="org.jboss.as.configadmin"/>
+        <extension module="org.jboss.as.connector"/>
+        <extension module="org.jboss.as.deployment-scanner"/>
+        <extension module="org.jboss.as.ee"/>
+        <extension module="org.jboss.as.ejb3"/>
+        <extension module="org.jboss.as.jacorb"/>
+        <extension module="org.jboss.as.jaxr"/>
+        <extension module="org.jboss.as.jaxrs"/>
+        <extension module="org.jboss.as.jdr"/>
+        <extension module="org.jboss.as.jmx"/>
+        <extension module="org.jboss.as.jpa"/>
+        <extension module="org.jboss.as.jsr77"/>
+        <extension module="org.jboss.as.logging"/>
+        <extension module="org.jboss.as.mail"/>
+        <extension module="org.jboss.as.messaging"/>
+        <extension module="org.jboss.as.naming"/>
+        <extension module="org.jboss.as.osgi"/>
+        <extension module="org.jboss.as.pojo"/>
+        <extension module="org.jboss.as.remoting"/>
+        <extension module="org.jboss.as.sar"/>
+        <extension module="org.jboss.as.security"/>
+        <extension module="org.jboss.as.threads"/>
+        <extension module="org.jboss.as.transactions"/>
+        <extension module="org.jboss.as.web"/>
+        <extension module="org.jboss.as.webservices"/>
+        <extension module="org.jboss.as.weld"/>
+    </extensions>
+    <management>
+        <security-realms>
+            <security-realm name="ManagementRealm">
+                <authentication>
+                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
+                </authentication>
+            </security-realm>
+            <security-realm name="ApplicationRealm">
+                <authentication>
+                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
+                </authentication>
+            </security-realm>
+        </security-realms>
+        <management-interfaces>
+            <native-interface security-realm="ManagementRealm">
+                <socket-binding native="management-native"/>
+            </native-interface>
+            <http-interface security-realm="ManagementRealm">
+                <socket-binding http="management-http"/>
+            </http-interface>
+        </management-interfaces>
+    </management>
+    <profile>
+        <subsystem xmlns="urn:jboss:domain:logging:1.1">
+            <console-handler name="CONSOLE">
+                <level name="INFO"/>
+                <formatter>
+                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                </formatter>
+            </console-handler>
+            <periodic-rotating-file-handler name="FILE">
+                <formatter>
+                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+                </formatter>
+                <file relative-to="jboss.server.log.dir" path="server.log"/>
+                <suffix value=".yyyy-MM-dd"/>
+                <append value="true"/>
+            </periodic-rotating-file-handler>
+            <logger category="com.arjuna">
+                <level name="WARN"/>
+            </logger>
+            <logger category="org.apache.tomcat.util.modeler">
+                <level name="WARN"/>
+            </logger>
+            <logger category="sun.rmi">
+                <level name="WARN"/>
+            </logger>
+            <logger category="jacorb">
+                <level name="WARN"/>
+            </logger>
+            <logger category="jacorb.config">
+                <level name="ERROR"/>
+            </logger>
+            <root-logger>
+                <level name="INFO"/>
+                <handlers>
+                    <handler name="CONSOLE"/>
+                    <handler name="FILE"/>
+                </handlers>
+            </root-logger>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+            <datasources>
+                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
+                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
+                    <driver>h2</driver>
+                    <security>
+                        <user-name>sa</user-name>
+                        <password>sa</password>
+                    </security>
+                </datasource>
+                <drivers>
+                    <driver name="h2" module="com.h2database.h2">
+                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+                    </driver>
+                </drivers>
+            </datasources>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
+            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
+            <session-bean>
+                <stateless>
+                    <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+                </stateless>
+                <stateful default-access-timeout="5000" cache-ref="simple"/>
+                <singleton default-access-timeout="5000"/>
+            </session-bean>
+            <mdb>
+                <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+                <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+            </mdb>
+            <pools>
+                <bean-instance-pools>
+                    <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+                    <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+                </bean-instance-pools>
+            </pools>
+            <caches>
+                <cache name="simple" aliases="NoPassivationCache"/>
+                <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
+            </caches>
+            <passivation-stores>
+                <file-passivation-store name="file"/>
+            </passivation-stores>
+            <async thread-pool-name="default"/>
+            <timer-service thread-pool-name="default">
+                <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+            </timer-service>
+            <remote connector-ref="remoting-connector" thread-pool-name="default"/>
+            <thread-pools>
+                <thread-pool name="default">
+                    <max-threads count="10"/>
+                    <keepalive-time time="100" unit="milliseconds"/>
+                </thread-pool>
+            </thread-pools>
+            <iiop enable-by-default="false" use-qualified-name="false"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
+            <cache-container name="hibernate" default-cache="local-query">
+                <local-cache name="entity">
+                    <transaction mode="NON_XA"/>
+                    <eviction strategy="LRU" max-entries="10000"/>
+                    <expiration max-idle="100000"/>
+                </local-cache>
+                <local-cache name="local-query">
+                    <transaction mode="NONE"/>
+                    <eviction strategy="LRU" max-entries="10000"/>
+                    <expiration max-idle="100000"/>
+                </local-cache>
+                <local-cache name="timestamps">
+                    <transaction mode="NONE"/>
+                    <eviction strategy="NONE"/>
+                </local-cache>
+            </cache-container>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jacorb:1.1">
+            <orb>
+                <initializers transactions="spec" security="on"/>
+            </orb>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jaxr:1.1">
+            <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jca:1.1">
+            <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
+            <bean-validation enabled="true"/>
+            <default-workmanager>
+                <short-running-threads>
+                    <core-threads count="50"/>
+                    <queue-length count="50"/>
+                    <max-threads count="50"/>
+                    <keepalive-time time="10" unit="seconds"/>
+                </short-running-threads>
+                <long-running-threads>
+                    <core-threads count="50"/>
+                    <queue-length count="50"/>
+                    <max-threads count="50"/>
+                    <keepalive-time time="10" unit="seconds"/>
+                </long-running-threads>
+            </default-workmanager>
+            <cached-connection-manager/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:jmx:1.1">
+            <show-model value="true"/>
+            <remoting-connector/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+            <jpa default-datasource=""/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:mail:1.0">
+            <mail-session jndi-name="java:jboss/mail/Default">
+                <smtp-server outbound-socket-binding-ref="mail-smtp"/>
+            </mail-session>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:messaging:1.1">
+            <hornetq-server>
+                <persistence-enabled>true</persistence-enabled>
+                <journal-file-size>102400</journal-file-size>
+                <journal-min-files>2</journal-min-files>
+                <connectors>
+                    <netty-connector name="netty" socket-binding="messaging"/>
+                    <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
+                        <param key="batch-delay" value="50"/>
+                    </netty-connector>
+                    <in-vm-connector name="in-vm" server-id="0"/>
+                </connectors>
+                <acceptors>
+                    <netty-acceptor name="netty" socket-binding="messaging"/>
+                    <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
+                        <param key="batch-delay" value="50"/>
+                        <param key="direct-deliver" value="false"/>
+                    </netty-acceptor>
+                    <in-vm-acceptor name="in-vm" server-id="0"/>
+                </acceptors>
+                <security-settings>
+                    <security-setting match="#">
+                        <permission type="send" roles="guest"/>
+                        <permission type="consume" roles="guest"/>
+                        <permission type="createNonDurableQueue" roles="guest"/>
+                        <permission type="deleteNonDurableQueue" roles="guest"/>
+                    </security-setting>
+                </security-settings>
+                <address-settings>
+                    <!--default for catch all-->
+                    <address-setting match="#">
+                        <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+                        <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+                        <redelivery-delay>0</redelivery-delay>
+                        <max-size-bytes>10485760</max-size-bytes>
+                        <address-full-policy>BLOCK</address-full-policy>
+                        <message-counter-history-day-limit>10</message-counter-history-day-limit>
+                    </address-setting>
+                </address-settings>
+                <jms-connection-factories>
+                    <connection-factory name="InVmConnectionFactory">
+                        <connectors>
+                            <connector-ref connector-name="in-vm"/>
+                        </connectors>
+                        <entries>
+                            <entry name="java:/ConnectionFactory"/>
+                        </entries>
+                    </connection-factory>
+                    <connection-factory name="RemoteConnectionFactory">
+                        <connectors>
+                            <connector-ref connector-name="netty"/>
+                        </connectors>
+                        <entries>
+                            <entry name="RemoteConnectionFactory"/>
+                            <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
+                        </entries>
+                    </connection-factory>
+                    <pooled-connection-factory name="hornetq-ra">
+                        <transaction mode="xa"/>
+                        <connectors>
+                            <connector-ref connector-name="in-vm"/>
+                        </connectors>
+                        <entries>
+                            <entry name="java:/JmsXA"/>
+                        </entries>
+                    </pooled-connection-factory>
+                </jms-connection-factories>
+                <jms-destinations>
+                    <jms-queue name="testQueue">
+                        <entry name="queue/test"/>
+                        <entry name="java:jboss/exported/jms/queue/test"/>
+                    </jms-queue>
+                    <jms-topic name="testTopic">
+                        <entry name="topic/test"/>
+                        <entry name="java:jboss/exported/jms/topic/test"/>
+                    </jms-topic>
+                </jms-destinations>
+            </hornetq-server>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
+        <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
+            <properties>
+                <!-- Specifies the beginning start level of the framework -->
+                <property name="org.osgi.framework.startlevel.beginning">1</property>
+            </properties>
+            <capabilities>
+                <!-- modules registered with the OSGi layer on startup -->
+                <capability name="javax.servlet.api:v25"/>
+                <capability name="javax.transaction.api"/>
+                <!-- bundles started in startlevel 1 -->
+                <capability name="org.apache.felix.log" startlevel="1"/>
+                <capability name="org.jboss.osgi.logging" startlevel="1"/>
+                <capability name="org.apache.felix.configadmin" startlevel="1"/>
+                <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
+            </capabilities>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:remoting:1.1">
+            <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+        <subsystem xmlns="urn:jboss:domain:security:1.1">
+            <security-domains>
+                <security-domain name="other" cache-type="default">
+                    <authentication>
+                        <login-module code="Remoting" flag="optional">
+                            <module-option name="password-stacking" value="useFirstPass"/>
+                        </login-module>
+                        <login-module code="RealmUsersRoles" flag="required">
+                            <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
+                            <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
+                            <module-option name="realm" value="ApplicationRealm"/>
+                            <module-option name="password-stacking" value="useFirstPass"/>
+                        </login-module>
+                    </authentication>
+                </security-domain>
+                <security-domain name="jboss-web-policy" cache-type="default">
+                    <authorization>
+                        <policy-module code="Delegating" flag="required"/>
+                    </authorization>
+                </security-domain>
+                <security-domain name="jboss-ejb-policy" cache-type="default">
+                    <authorization>
+                        <policy-module code="Delegating" flag="required"/>
+                    </authorization>
+                </security-domain>
+            </security-domains>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
+        <subsystem xmlns="urn:jboss:domain:transactions:1.1">
+            <core-environment>
+                <process-id>
+                    <uuid/>
+                </process-id>
+            </core-environment>
+            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+            <coordinator-environment default-timeout="300"/>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
+            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
+<%- if (@ssl_enabled == 'true' and @ssl_certificate_file and @ssl_key_file) -%>
+            <connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" enable-lookups="false" secure="true">
+               <ssl name="jboss-as-ssl" certificate-key-file="<%= @stratos_ssl_keystore %>" password="<%= @keystore_passwd %>" protocol="TLSv1" key-alias="<%= @keystore_alias %>" />
+            </connector>
+<%- end -%>
+            <virtual-server name="default-host" enable-welcome-root="false">
+                <alias name="localhost"/>
+                <alias name="example.com"/>
+            </virtual-server>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:webservices:1.1">
+            <modify-wsdl-address>true</modify-wsdl-address>
+            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
+            <endpoint-config name="Standard-Endpoint-Config"/>
+            <endpoint-config name="Recording-Endpoint-Config">
+                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+                </pre-handler-chain>
+            </endpoint-config>
+        </subsystem>
+        <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+    </profile>
+    <interfaces>
+        <interface name="management">
+            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
+        </interface>
+        <interface name="public">
+            <inet-address value="${jboss.bind.address:127.0.0.1}"/>
+        </interface>
+        <!-- TODO - only show this if the jacorb subsystem is added  -->
+        <interface name="unsecure">
+            <!--
+              ~  Used for IIOP sockets in the standard configuration.
+              ~                  To secure JacORB you need to setup SSL 
+              -->
+            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
+        </interface>
+    </interfaces>
+    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+        <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
+        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
+        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
+        <socket-binding name="ajp" port="8009"/>
+        <socket-binding name="http" port="8080"/>
+        <socket-binding name="https" port="8443"/>
+        <socket-binding name="jacorb" interface="unsecure" port="3528"/>
+        <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
+        <socket-binding name="messaging" port="5445"/>
+        <socket-binding name="messaging-throughput" port="5455"/>
+        <socket-binding name="osgi-http" interface="management" port="8090"/>
+        <socket-binding name="remoting" port="4447"/>
+        <socket-binding name="txn-recovery-environment" port="4712"/>
+        <socket-binding name="txn-status-manager" port="4713"/>
+        <outbound-socket-binding name="mail-smtp">
+            <remote-destination host="localhost" port="25"/>
+        </outbound-socket-binding>
+    </socket-binding-group>
+</server>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/lb/files/configs/bin/stratos.sh
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/files/configs/bin/stratos.sh b/tools/puppet3/modules/lb/files/configs/bin/stratos.sh
index 80dfe5e..00e6b0d 100755
--- a/tools/puppet3/modules/lb/files/configs/bin/stratos.sh
+++ b/tools/puppet3/modules/lb/files/configs/bin/stratos.sh
@@ -297,6 +297,7 @@ exec "$JAVACMD" \
         -Dorg.terracotta.quartz.skipUpdateCheck=true \
         -Djavax.net.ssl.trustStore=$CARBON_HOME/repository/resources/security/client-truststore.jks \
         -Djavax.net.ssl.trustStorePassword=wso2carbon \
+        -Djsse.enableSNIExtension=false \
         org.wso2.carbon.bootstrap.Bootstrap $*
 
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/lb/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/manifests/importssl.pp b/tools/puppet3/modules/lb/manifests/importssl.pp
new file mode 100644
index 0000000..92d9172
--- /dev/null
+++ b/tools/puppet3/modules/lb/manifests/importssl.pp
@@ -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.
+
+# Imports the given self-signed SSL certificate to LB client trust store
+
+define lb::importssl ($owner, $target, $ssl_certificate_file) {
+  
+   $path_suffix = '/repository/resources/security'
+   $target_cwd = "${target}${path_suffix}"
+   $dest_filename = 'stratos-ssl-cert.pem'
+   $dest_file_path = "${target_cwd}/${dest_filename}"
+
+   if $ssl_certificate_file {
+        $crt_file = file( $ssl_certificate_file , '/dev/null' )
+        if($crt_file != '') {
+          file {  $dest_file_path  :
+             content => $crt_file,
+             ensure  => present,
+             mode    => 755
+          }
+
+          exec { "import ssl certificate":
+              user    => $owner,
+              path    => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+              cwd     => $target_cwd,
+              command => 'keytool -noprompt -import -file stratos-ssl-cert.pem -keystore client-truststore.jks -storepass wso2carbon -alias stratos-cert-ks',
+              require => File[$dest_file_path]
+          }
+       }
+   }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/lb/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/manifests/init.pp b/tools/puppet3/modules/lb/manifests/init.pp
index bce052b..3a9a866 100755
--- a/tools/puppet3/modules/lb/manifests/init.pp
+++ b/tools/puppet3/modules/lb/manifests/init.pp
@@ -48,7 +48,7 @@ class lb (
   $service_templates = [
     'conf/axis2/axis2.xml',
     'conf/loadbalancer.conf',
-    'conf/templates/jndi.properties.template',
+    'conf/templates/jndi.properties.template',    
     ]
 
   tag($service_code)
@@ -85,13 +85,25 @@ class lb (
       require   => Lb::Deploy[$deployment_code];
   }
 
+  lb::importssl  { $deployment_code:
+    owner                 => $owner,
+    target                => $carbon_home,
+    ssl_certificate_file => $ssl_certificate_file,
+    require               => [
+       Lb::Initialize[$deployment_code],
+       Lb::Deploy[$deployment_code],
+       Lb::Push_templates[$service_templates]
+     ]
+  }
+
   lb::start { $deployment_code:
     owner   => $owner,
     target  => $carbon_home,
     require => [
-      Lb::Initialize[$deployment_code],
-      Lb::Deploy[$deployment_code],
-      Lb::Push_templates[$service_templates],
-      ],
-  }
+       Lb::Initialize[$deployment_code],
+       Lb::Deploy[$deployment_code],
+       Lb::Push_templates[$service_templates],
+       Lb::Importssl[$deployment_code]
+     ],
+   }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/lb/manifests/start.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/manifests/start.pp b/tools/puppet3/modules/lb/manifests/start.pp
index 0630fea..890ddd3 100755
--- a/tools/puppet3/modules/lb/manifests/start.pp
+++ b/tools/puppet3/modules/lb/manifests/start.pp
@@ -18,6 +18,7 @@
 # Starts the service once the deployment is successful.
 
 define lb::start ($target, $owner) {
+
   exec { "starting_${name}":
     user    => $owner,
     path    => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb b/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb
new file mode 100644
index 0000000..8fff18a
--- /dev/null
+++ b/tools/puppet3/modules/lb/templates/bin/stratos.sh.erb
@@ -0,0 +1,308 @@
+#!/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" \
+    -Dloadbalancer.conf.file="$CARBON_HOME/repository/conf/loadbalancer.conf" \
+    -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" \
+    -Dwso2.loadbalancer=true \
+    -Djsse.enableSNIExtension=false \
+    org.wso2.carbon.bootstrap.Bootstrap $*
+    status=$?
+done
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/importssl.pp b/tools/puppet3/modules/php/manifests/importssl.pp
new file mode 100644
index 0000000..369e8db
--- /dev/null
+++ b/tools/puppet3/modules/php/manifests/importssl.pp
@@ -0,0 +1,40 @@
+# 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.
+
+# Imports the given self-signed SSL certificate to PHP instance
+
+define php::importssl ($ssl_certificate_file, $ssl_key_file) {
+
+   if $ssl_certificate_file and $ssl_key_file{
+        $crt_file = file( $ssl_certificate_file , '/dev/null' )
+        if($crt_file != '') {
+           file { '/etc/ssl/certs/stratos-ssl-cert.pem':
+              content => $crt_file,
+              mode => 600
+           }
+        }
+       
+        $key_file = file( $ssl_key_file , '/dev/null' )
+        if($key_file != '') {
+           file { '/etc/ssl/private/stratos-ssl-key.pem':
+              content => $key_file,
+              mode => 600
+           }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp b/tools/puppet3/modules/php/manifests/init.pp
index 5c66ecc..1b2b5b0 100755
--- a/tools/puppet3/modules/php/manifests/init.pp
+++ b/tools/puppet3/modules/php/manifests/init.pp
@@ -73,6 +73,12 @@ class php () {
     require  => Exec['update-apt'],
   }
 
+  exec { 'clean sites':
+      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
+      command => 'rm -rf /etc/apache2/sites-available/*; rm -rf /etc/apache2/sites-enabled/*',
+      require => Package['apache2'];
+  }
+
   file {
    '/etc/apache2/apache2.conf':
       owner   => 'root',
@@ -86,36 +92,47 @@ class php () {
       group   => 'root',
       mode    => '0775',
       content => template('php/apache2/sites-available/default.erb'),
-      require => File['/etc/apache2/apache2.conf'];
+      require => Exec['clean sites'];
 
     '/etc/apache2/sites-available/default-ssl':
       owner   => 'root',
       group   => 'root',
       mode    => '0775',
       content => template('php/apache2/sites-available/default-ssl.erb'),
+      require => Exec['clean sites'];
+
+    '/etc/apache2/sites-enabled/default':
+      ensure  => 'link',
+      target  => '/etc/apache2/sites-available/default',
       require => File['/etc/apache2/sites-available/default'];
+
+    '/etc/apache2/sites-enabled/default-ssl':
+      ensure  => 'link',
+      target  => '/etc/apache2/sites-available/default-ssl',
+      require => File['/etc/apache2/sites-available/default-ssl'];	
+  }
+
+  php::importssl {'import ssl':
+     ssl_certificate_file => $ssl_certificate_file,
+     ssl_key_file         => $ssl_key_file,
+     require               => File['/etc/apache2/apache2.conf']
   }
 
   exec {
     'enable ssl module':
       path    => ['/bin', '/usr/bin', '/usr/sbin/'],
       command => 'a2enmod ssl',
-      require => File['/etc/apache2/sites-available/default-ssl'];
-
-    'enable ssl':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => 'a2enmod ssl',
-      require => Exec["enable ssl module"];
+      require => [ File['/etc/apache2/apache2.conf'],
+                   Php::Importssl['import ssl']
+                 ];
 
     'apache2 restart':
       path    => ['/bin', '/usr/bin', '/usr/sbin/'],
       command => "/etc/init.d/apache2 restart",
-      require => Exec["enable ssl"];
+      require => [ Exec["enable ssl module"],
+                   File['/etc/apache2/sites-enabled/default'], 
+                   File['/etc/apache2/sites-enabled/default-ssl']
+                 ];
   }
 
-#  file { "/tmp/puppet-payload":
-#    ensure  => present,
-#    content => ",MB_IP=${mb_ip},MB_PORT=${mb_port},CEP_IP=${cep_ip},CEP_PORT=${cep_port},CERT_TRUSTSTORE=${cert_truststore},TRUSTSTORE_PASSWORD=${truststore_password},APP_PATH=${docroot}",
-#    require => Exec["apache2 restart"];
-#  }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/init.pp.back
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp.back b/tools/puppet3/modules/php/manifests/init.pp.back
deleted file mode 100755
index a75297d..0000000
--- a/tools/puppet3/modules/php/manifests/init.pp.back
+++ /dev/null
@@ -1,131 +0,0 @@
-#--------------------------------------------------------------
-#
-# 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.
-#
-#--------------------------------------------------------------
-
-
-class php_cartridge (
-  syslog,
-  docroot,
-  samlalias,
-  serverport,
-  mb_ip,
-  mb_port,
-  cep_ip,
-  cep_port,
-  cert_truststore,
-  truststore_password) {
-  $packages = [
-    'nano',
-    'zip',
-    'build-essential',
-    'mysql-client',
-    'apache2',
-    'php5',
-    'php5-cli',
-    'libapache2-mod-php5',
-    'php5-gd',
-    'php5-mysql',
-    'php-db',
-    'php-pear',
-    'php5-curl',
-    'curl',
-    'wget',
-    'php5-ldap',
-    'php5-adodb',
-    'mailutils',
-    'php5-imap',
-    'php5-sqlite',
-    'php5-xmlrpc',
-    'php5-xsl',
-    'openssl',
-    'ssl-cert',
-    'ldap-utils',
-    'php5-mcrypt',
-    'mcrypt',
-    'ufw',
-    'fail2ban',
-    'git',
-    'libboost-all-dev',
-    'ruby']
-
-  file { '/etc/apt/apt.conf.d/90forceyes':
-    ensure => present,
-    source => 'puppet:///php/90forceyes';
-  }
-
-  exec { 'update-apt':
-    path      => ['/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/'],
-    command   => 'apt-get update > /dev/null 2>&1',
-    logoutput => on_failure,
-    require   => File['/etc/apt/apt.conf.d/90forceyes'];
-  }
-
-  package { $packages:
-    ensure   => installed,
-    provider => apt,
-    require  => Exec['update-apt'],
-  }
-
-#  file {
-#    '/etc/apache2/apache2.conf':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      content => template('php/apache2/apache2.conf.erb'),
-#      require => Package['apache2'];
-#
-#    '/etc/apache2/sites-available/default':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      content => template('php/apache2/sites-available/default.erb'),
-#      require => File['/etc/apache2/apache2.conf'];
-#
-#    '/etc/apache2/sites-available/default-ssl':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      content => template('php/apache2/sites-available/default-ssl.erb'),
-#      require => File['/etc/apache2/sites-available/default'];
-#  }
-
-  exec {
-    'enable ssl module':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => 'a2enmod ssl',
-      require => File['/etc/apache2/sites-available/default-ssl'];
-
-    'enable ssl':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => 'a2enmod ssl',
-      require => Exec["enable ssl module"];
-
-    'apache2 restart':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => "/etc/init.d/apache2 restart",
-      require => Exec["enable ssl"];
-  }
-
-  file { "/tmp/puppet-payload":
-    ensure  => present,
-    content => ",MB_IP=${mb_ip},MB_PORT=${mb_port},CEP_IP=${cep_ip},CEP_PORT=${cep_port},CERT_TRUSTSTORE=${cert_truststore},TRUSTSTORE_PASSWORD=${truststore_password},APP_PATH=${docroot}",
-    require => Exec["apache2 restart"];
-  }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d77f9a8/tools/puppet3/modules/php/manifests/init.pp.cent
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/init.pp.cent b/tools/puppet3/modules/php/manifests/init.pp.cent
deleted file mode 100755
index 22a5d8a..0000000
--- a/tools/puppet3/modules/php/manifests/init.pp.cent
+++ /dev/null
@@ -1,111 +0,0 @@
-# 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.
-
-class php ($syslog="", $docroot="/var/www/html", $samlalias="") {
-  $packages = [
-    'httpd',
-    'openssl.x86_64',
-    'mod_ssl.x86_64',
-    'php',
-    'php-adodb.noarch',
-    'php-dba.x86_64',
-    'php-gd.x86_64',
-    'php-imap.x86_64',
-    'php-ldap.x86_64',
-    'php-mcrypt.x86_64',
-    'php-mysql.x86_64',
-    'php-pear.noarch',
-    'php-xml.x86_64',
-    'php-xmlrpc.x86_64',
-    'php.x86_64',
-    'git-all.noarch',
-    ]
-
-#  file { '/etc/apt/apt.conf.d/90forceyes':
-#    ensure => present,
-#    source => 'puppet:///modules/php/90forceyes';
-#  }
-
-#  exec { 'update-apt':
-#    path    => ['/bin', '/usr/bin'],
-#    command => 'apt-get update > /dev/null 2>&1 &',
-#    require => File['/etc/apt/apt.conf.d/90forceyes'],
-#  }
-
-  package { $packages:
-    ensure   => installed,
-  }
-
-  # Apache
-  file {
-    '/etc/httpd/conf/httpd.conf':
-      owner   => 'root',
-      group   => 'root',
-      mode    => '0775',
-      notify  => Service['httpd'],
-      content => template('php/httpd/httpd.conf.erb'),
-      require => Package['httpd'];
-#
-#    '/etc/apache2/sites-available/default':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default.erb'),
-#      require => Package['apache2'];
-#
-#    '/etc/apache2/sites-available/default-ssl':
-#      owner   => 'root',
-#      group   => 'root',
-#      mode    => '0775',
-#      notify  => Service['apache2'],
-#      content => template('php/apache2/sites-available/default-ssl.erb'),
-#      require => Package['apache2'];
-  }
-
-#  exec {
-#    'enable ssl module':
-#      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-#      command => 'a2enmod ssl',
-#      require => Package['apache2'];
-#  }
-
-  service { 'httpd':
-    ensure    => running,
-    name      => 'httpd',
-    hasstatus => true,
-    pattern   => 'httpd',
-    require   => Package['httpd'];
-  }
-
-  exec { 'remove www contents':
-    path    => '/bin/',
-    command => "rm -rf /var/www/html/*",
-    require => Package['httpd'],
-  }
-
-  # Apache end
-#  exec { 'clone git repo': 
-#    path     => ['/bin', '/usr/bin', '/usr/sbin/'],
-#    cwd      => '/var/www',
-#    command  => "git clone ${stratos_git_repo}",
-#    require  => [
-#      Package['git-all.noarch'],
-#      Package['httpd'],
-#    ]
-#  }
-}


[5/5] git commit: fix check for ssl_enabled parameter

Posted by ra...@apache.org.
fix check for ssl_enabled parameter


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/bdb18372
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/bdb18372
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/bdb18372

Branch: refs/heads/4.0.0
Commit: bdb18372d7b7061b134818c6303439a89b8e7c27
Parents: 877fa83
Author: Akila Perera <ra...@gmail.com>
Authored: Wed Jul 23 08:25:52 2014 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Wed Jul 23 08:25:52 2014 +0530

----------------------------------------------------------------------
 tools/puppet3/modules/jboss/manifests/importssl.pp | 2 +-
 tools/puppet3/modules/lb/manifests/importssl.pp    | 2 +-
 tools/puppet3/modules/php/manifests/importssl.pp   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/bdb18372/tools/puppet3/modules/jboss/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/jboss/manifests/importssl.pp b/tools/puppet3/modules/jboss/manifests/importssl.pp
index 8fd6f69..e224678 100644
--- a/tools/puppet3/modules/jboss/manifests/importssl.pp
+++ b/tools/puppet3/modules/jboss/manifests/importssl.pp
@@ -30,7 +30,7 @@ define jboss::importssl (
   $java_home            = '/usr/java/latest'
 ){
 
-   if $ssl_certificate_file and $ssl_key_file{
+   if $ssl_enabled == 'true' and $ssl_certificate_file and $ssl_key_file{
         $crt_file = file( $ssl_certificate_file , '/dev/null' )
         if($crt_file != '') {
            file { "${stratos_ssl_cert}" :

http://git-wip-us.apache.org/repos/asf/stratos/blob/bdb18372/tools/puppet3/modules/lb/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/lb/manifests/importssl.pp b/tools/puppet3/modules/lb/manifests/importssl.pp
index 92d9172..6272c56 100644
--- a/tools/puppet3/modules/lb/manifests/importssl.pp
+++ b/tools/puppet3/modules/lb/manifests/importssl.pp
@@ -24,7 +24,7 @@ define lb::importssl ($owner, $target, $ssl_certificate_file) {
    $dest_filename = 'stratos-ssl-cert.pem'
    $dest_file_path = "${target_cwd}/${dest_filename}"
 
-   if $ssl_certificate_file {
+   if $ssl_enabled == 'true' and $ssl_certificate_file {
         $crt_file = file( $ssl_certificate_file , '/dev/null' )
         if($crt_file != '') {
           file {  $dest_file_path  :

http://git-wip-us.apache.org/repos/asf/stratos/blob/bdb18372/tools/puppet3/modules/php/manifests/importssl.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/manifests/importssl.pp b/tools/puppet3/modules/php/manifests/importssl.pp
index 369e8db..4a03f21 100644
--- a/tools/puppet3/modules/php/manifests/importssl.pp
+++ b/tools/puppet3/modules/php/manifests/importssl.pp
@@ -19,7 +19,7 @@
 
 define php::importssl ($ssl_certificate_file, $ssl_key_file) {
 
-   if $ssl_certificate_file and $ssl_key_file{
+   if $ssl_enabled == 'true' and $ssl_certificate_file and $ssl_key_file{
         $crt_file = file( $ssl_certificate_file , '/dev/null' )
         if($crt_file != '') {
            file { '/etc/ssl/certs/stratos-ssl-cert.pem':