You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ch...@apache.org on 2015/03/27 07:53:17 UTC

[1/2] stratos git commit: PCA - Minor changes related to metadata service url parameter

Repository: stratos
Updated Branches:
  refs/heads/master caa1415e7 -> ce6831e42


PCA - Minor changes related to metadata service url parameter


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

Branch: refs/heads/master
Commit: ce6831e42ad4d2246fb33351183f2687020e8790
Parents: db0ae09
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Wed Mar 25 22:56:21 2015 +0530
Committer: Chamila de Alwis <ch...@apache.org>
Committed: Fri Mar 27 12:05:54 2015 +0530

----------------------------------------------------------------------
 .../src/main/python/cartridge.agent/cartridge.agent/agent.conf   | 2 +-
 .../src/main/python/cartridge.agent/cartridge.agent/constants.py | 2 +-
 .../python.cartridge.agent/test/PythonCartridgeAgentTest.java    | 4 ++--
 .../src/test/resources/agent.conf                                | 2 +-
 .../src/test/resources/payload/launch-params                     | 2 +-
 tools/puppet3/modules/python_agent/templates/agent.conf.erb      | 1 +
 6 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.conf b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.conf
index dc33a59..ec38d80 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.conf
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.conf
@@ -39,6 +39,6 @@ monitoring.server.admin.username      =MONITORING-SERVER-ADMIN-USERNAME
 monitoring.server.admin.password      =MONITORING-SERVER-ADMIN-PASSWORD
 log.file.paths                        =LOG_FILE_PATHS
 APPLICATION_PATH                      =APPLICATION-PATH
-METADATA_SERVICE_URL                  =METADATA-SERVICE-URL
+metadata.service.url                  =METADATA-SERVICE-URL
 super.tenant.repository.path          =/repository/deployment/server/
 tenant.repository.path                =/repository/tenants/

http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/constants.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/constants.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/constants.py
index dfab659..9f1dcc0 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/constants.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/constants.py
@@ -65,7 +65,7 @@ PROVIDER = "PROVIDER"
 INTERNAL = "INTERNAL"
 LB_PRIVATE_IP = "lb.private.ip"
 LB_PUBLIC_IP = "lb.public.ip"
-METADATA_SERVICE_URL = "METADATA_SERVICE_URL"
+METADATA_SERVICE_URL = "metadata.service.url"
 
 SERVICE_GROUP_TOPOLOGY_KEY = "payload_parameter.SERIVCE_GROUP"
 CLUSTERING_TOPOLOGY_KEY = "payload_parameter.CLUSTERING"

http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java b/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
index 8b434d9..6783b9c 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
+++ b/components/org.apache.stratos.python.cartridge.agent/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
@@ -199,7 +199,7 @@ public class PythonCartridgeAgentTest {
         ArtifactUpdatedEvent privateRepoEvent = createTestArtifactUpdatedEvent();
         privateRepoEvent.setRepoURL("https://bitbucket.org/testapache2211/testrepo.git");
         privateRepoEvent.setRepoUserName("testapache2211");
-        privateRepoEvent.setRepoPassword("iF7qT+BKKPE3PGV1TeDsJA==");
+        privateRepoEvent.setRepoPassword("RExPDGa4GkPJj4kJDzSROQ==");
 
         ArtifactUpdatedEvent privateRepoEvent2 = createTestArtifactUpdatedEvent();
         privateRepoEvent2.setRepoURL("https://testapache2211@bitbucket.org/testapache2211/testrepo.git");
@@ -256,7 +256,7 @@ public class PythonCartridgeAgentTest {
                                 log.info("Member initialized event published");
 
                                 // Simulate server socket
-                                startServerSocket(9080);
+                                startServerSocket(8080);
                             }
                             if (line.contains("Artifact repository found")) {
                                 // Send artifact updated event

http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
index f432e6f..e4719d1 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
+++ b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/agent.conf
@@ -38,7 +38,7 @@ monitoring.server.secure.port         =7711
 monitoring.server.admin.username      =admin
 monitoring.server.admin.password      =admin
 log.file.paths                        =
-METADATA_SERVICE_URL                  =https://localhost:9443
+metadata.service.url                  =https://localhost:9443
 super.tenant.repository.path          =/repository/deployment/server/
 tenant.repository.path                =/repository/tenants/
 extension.instance.started            =instance-started.sh

http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/components/org.apache.stratos.python.cartridge.agent/src/test/resources/payload/launch-params
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/payload/launch-params b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/payload/launch-params
index a909a1e..00ce19c 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/test/resources/payload/launch-params
+++ b/components/org.apache.stratos.python.cartridge.agent/src/test/resources/payload/launch-params
@@ -1 +1 @@
-APPLICATION_ID=single_group_v1,APPLICATION_PATH=/tmp/tomcat/webapps,BASH=/bin/bash,BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath,BASH_ALIASES=(),BASH_ARGC=(),BASH_ARGV=(),BASH_CMDS=(),BASH_LINENO=([0]="0"),BASH_SOURCE=([0]="/usr/local/bin/populate-user-data.sh"),BASH_VERSINFO=([0]="4" [1]="3" [2]="30" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu"),BASH_VERSION='4.3.30(1)-release',CARTRIDGE_ALIAS=mytomcat,CARTRIDGE_KEY=6abTFgRg7oCkXWCt,CATALINA_HOME=/opt/tomcat,CEP_IP=54.179.197.243,CEP_PORT=7711,CLUSTER_ID=php.php.domain,CLUSTER_INSTANCE_ID=single_group_v1-1,DEPENDENCY_CLUSTER_IDS=myphp.php.domain,DEPLOYMENT=default,DIRSTACK=(),EUID=0,GROUPS=(),GROUP_NAME=null,HOME=/root,HOSTNAME=mytomcat-tomcat-domain3bd3cd47-b95d-475a-aa11-3e3ddc089d49,HOSTTYPE=x86_64,HOST_NAME=mytomcat.tomcat.stratos.org,IFS=' 	,',INSTANCE_ID=null,INTERNAL=false,JAVA_HOME=/opt/jdk1.7.0_67,KUBERNETES_CLUSTER_ID=kubernetes-cluster-1,KUB
 ERNETES_PORT=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP_ADDR=10.100.0.2,KUBERNETES_PORT_443_TCP_PORT=443,KUBERNETES_PORT_443_TCP_PROTO=tcp,KUBERNETES_RO_PORT=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP_ADDR=10.100.0.1,KUBERNETES_RO_PORT_80_TCP_PORT=80,KUBERNETES_RO_PORT_80_TCP_PROTO=tcp,KUBERNETES_RO_SERVICE_HOST=10.100.0.1,KUBERNETES_RO_SERVICE_PORT=80,KUBERNETES_SERVICE_HOST=10.100.0.2,KUBERNETES_SERVICE_PORT=443,LB_CLUSTER_ID=null,LOG_LEVEL=DEBUG,MACHTYPE=x86_64-pc-linux-gnu,MB_IP=54.179.197.243,MB_PORT=1883,MEMBER_ID=php.member-1,METADATA_SERVICE_URL=https://54.179.197.243:9443,MIN_COUNT=1,MULTITENANT=false,MYPHP_PHP_DOMAIN_1_PORT=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.171.218,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYPHP_PHP_DOMAIN_1_SERVICE_HOST=10.
 100.171.218,MYPHP_PHP_DOMAIN_1_SERVICE_PORT=4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_HOST=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_PORT=4500,NETWORK_PARTITION_ID=network-partition-1,OPTERR=1,OPTIND=1,OSTYPE=linux-gnu,PARTITION_ID=partition-1,PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,PIPESTATUS=([0]="0"),PORTS=8080,POSIXLY_CORRECT=y,PPID=14,PRIMARY=false,PROVIDER=apache,PS4='+ ',PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_IP=127.0.0.1,PWD=/opt,REPO_URL=https://github.com/imesh/stratos-tomcat-applications.git,SERVICE_NAME=php,SHELL=/bin/bash,SHELLOPTS=braceexpand:hashall:interactive-comments:posix,SHLVL=2,TENANT_ID=-1234,TENANT_RANGE='*',TER
 M=dumb,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOi04NzI0ODEyNDEsInN1YiI6ImFkbWluIiwiYXpwIjoid3I5SllVaDNtTXd6bVhHVllqWmVIWnhCV2xFYSIsImFwcElkIjoic2luZ2xlX2dyb3VwX3YxIiwiYXVkIjpbIndyOUpZVWgzbU13em1YR1ZZalplSFp4QldsRWEiXSwiaXNzIjoiaHR0cHM6XC9cL2xvY2FsaG9zdDo5NDQzXC9vYXV0aDJlbmRwb2ludHNcL3Rva2VuIiwiaWF0IjotODcyNDgwMjQwfQ.OSa1gIXUT9amhk1YEU02Yc3JtUYqanzrXh5K1YyvRXcpSiY2Ccn2BfJO0hILF5UooRcGBihzfX3979NRcvGwcUDUvOUJ0eaGPmxFZYbu0nr3xD8lhAO3fa1QYsKAvMnMdwyu2uSgSp6R6EUdVleiwlabUoDsuEcKGkIAn_VQvG0,UID=0,_=posix
\ No newline at end of file
+APPLICATION_ID=single_group_v1,APPLICATION_PATH=/tmp/tomcat/webapps,BASH=/bin/bash,BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath,BASH_ALIASES=(),BASH_ARGC=(),BASH_ARGV=(),BASH_CMDS=(),BASH_LINENO=([0]="0"),BASH_SOURCE=([0]="/usr/local/bin/populate-user-data.sh"),BASH_VERSINFO=([0]="4" [1]="3" [2]="30" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu"),BASH_VERSION='4.3.30(1)-release',CARTRIDGE_ALIAS=mytomcat,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,CATALINA_HOME=/opt/tomcat,CEP_IP=54.179.197.243,CEP_PORT=7711,CLUSTER_ID=php.php.domain,CLUSTER_INSTANCE_ID=single_group_v1-1,DEPENDENCY_CLUSTER_IDS=myphp.php.domain,DEPLOYMENT=default,DIRSTACK=(),EUID=0,GROUPS=(),GROUP_NAME=null,HOME=/root,HOSTNAME=mytomcat-tomcat-domain3bd3cd47-b95d-475a-aa11-3e3ddc089d49,HOSTTYPE=x86_64,HOST_NAME=mytomcat.tomcat.stratos.org,IFS=' 	,',INSTANCE_ID=null,INTERNAL=false,JAVA_HOME=/opt/jdk1.7.0_67,KUBERNETES_CLUSTER_ID=kubernetes-cluster-1,KUB
 ERNETES_PORT=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP_ADDR=10.100.0.2,KUBERNETES_PORT_443_TCP_PORT=443,KUBERNETES_PORT_443_TCP_PROTO=tcp,KUBERNETES_RO_PORT=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP_ADDR=10.100.0.1,KUBERNETES_RO_PORT_80_TCP_PORT=80,KUBERNETES_RO_PORT_80_TCP_PROTO=tcp,KUBERNETES_RO_SERVICE_HOST=10.100.0.1,KUBERNETES_RO_SERVICE_PORT=80,KUBERNETES_SERVICE_HOST=10.100.0.2,KUBERNETES_SERVICE_PORT=443,LB_CLUSTER_ID=null,LOG_LEVEL=DEBUG,MACHTYPE=x86_64-pc-linux-gnu,MB_IP=54.179.197.243,MB_PORT=1883,MEMBER_ID=php.member-1,MIN_COUNT=1,MULTITENANT=false,MYPHP_PHP_DOMAIN_1_PORT=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.171.218,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYPHP_PHP_DOMAIN_1_SERVICE_HOST=10.100.171.218,MYPHP_PHP_DOMAIN_1_SERVICE_PORT=4500,
 MYTOMCAT_TOMCAT_DOMAIN_1_PORT=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_HOST=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_PORT=4500,NETWORK_PARTITION_ID=network-partition-1,OPTERR=1,OPTIND=1,OSTYPE=linux-gnu,PARTITION_ID=partition-1,PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,PIPESTATUS=([0]="0"),PORTS=8080,POSIXLY_CORRECT=y,PPID=14,PRIMARY=false,PROVIDER=apache,PS4='+ ',PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_IP=127.0.0.1,PWD=/opt,REPO_URL=https://github.com/imesh/stratos-tomcat-applications.git,SERVICE_NAME=php,SHELL=/bin/bash,SHELLOPTS=braceexpand:hashall:interactive-comments:posix,SHLVL=2,TENANT_ID=-1234,TENANT_RANGE='*',TERM=dumb,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOi04NzI
 0ODEyNDEsInN1YiI6ImFkbWluIiwiYXpwIjoid3I5SllVaDNtTXd6bVhHVllqWmVIWnhCV2xFYSIsImFwcElkIjoic2luZ2xlX2dyb3VwX3YxIiwiYXVkIjpbIndyOUpZVWgzbU13em1YR1ZZalplSFp4QldsRWEiXSwiaXNzIjoiaHR0cHM6XC9cL2xvY2FsaG9zdDo5NDQzXC9vYXV0aDJlbmRwb2ludHNcL3Rva2VuIiwiaWF0IjotODcyNDgwMjQwfQ.OSa1gIXUT9amhk1YEU02Yc3JtUYqanzrXh5K1YyvRXcpSiY2Ccn2BfJO0hILF5UooRcGBihzfX3979NRcvGwcUDUvOUJ0eaGPmxFZYbu0nr3xD8lhAO3fa1QYsKAvMnMdwyu2uSgSp6R6EUdVleiwlabUoDsuEcKGkIAn_VQvG0,UID=0,_=posix
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/ce6831e4/tools/puppet3/modules/python_agent/templates/agent.conf.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/python_agent/templates/agent.conf.erb b/tools/puppet3/modules/python_agent/templates/agent.conf.erb
index e37de56..55f420e 100644
--- a/tools/puppet3/modules/python_agent/templates/agent.conf.erb
+++ b/tools/puppet3/modules/python_agent/templates/agent.conf.erb
@@ -39,6 +39,7 @@ monitoring.server.admin.username      =<%= @bam_username %>
 monitoring.server.admin.password      =<%= @bam_password %>
 log.file.paths                        =LOG_FILE_PATHS
 APPLICATION_PATH                      =<%= @docroot %>
+metadata.service.url                  =<%= @metadata_service_url %>
 super.tenant.repository.path          =/repository/deployment/server/
 tenant.repository.path                =/repository/tenants/
 extension.instance.started            =instance-started.sh


[2/2] stratos git commit: Puppet - New manifest to copy custom plugins from modules to PCA/plugins Puppet - PHP puppet module contains the httpd restart PCA plugin

Posted by ch...@apache.org.
Puppet - New manifest to copy custom plugins from modules to PCA/plugins
Puppet - PHP puppet module contains the httpd restart PCA plugin


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

Branch: refs/heads/master
Commit: db0ae09bbb0494d860a682f38a61741b524d89b0
Parents: caa1415
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Fri Mar 6 12:32:08 2015 +0530
Committer: Chamila de Alwis <ch...@apache.org>
Committed: Fri Mar 27 12:05:54 2015 +0530

----------------------------------------------------------------------
 tools/puppet3/manifests/nodes/base.pp           |  1 +
 .../agent/plugins/PhpServerStarterPlugin.py     | 36 ++++++++++++++++++++
 .../plugins/PhpServerStarterPlugin.yapsy-plugin |  9 +++++
 tools/puppet3/modules/php/manifests/init.pp     | 16 +++++----
 .../python_agent/manifests/copy_plugins.pp      | 29 ++++++++++++++++
 .../modules/python_agent/manifests/init.pp      |  9 ++++-
 6 files changed, 92 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/tools/puppet3/manifests/nodes/base.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/manifests/nodes/base.pp b/tools/puppet3/manifests/nodes/base.pp
index afd8770..2d37cf7 100755
--- a/tools/puppet3/manifests/nodes/base.pp
+++ b/tools/puppet3/manifests/nodes/base.pp
@@ -40,6 +40,7 @@ node 'base' {
   $bam_secure_port	= '7711'
   $bam_username		= 'admin'
   $bam_password		= 'admin'
+  $metadata_service_url = 'https://127.0.0.1:9443'
 
   require stratos_base 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.py
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.py b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.py
new file mode 100644
index 0000000..13d165c
--- /dev/null
+++ b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.py
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import mdsclient
+from plugins.contracts import ICartridgeAgentPlugin
+import time
+import zipfile
+import subprocess
+from modules.util.log import LogFactory
+import os
+
+
+class PhpServerStarterPlugin(ICartridgeAgentPlugin):
+
+    def run_plugin(self, values):
+        log = LogFactory().get_log(__name__)
+        # php_start_command = "/usr/sbin/apache2ctl -D FOREGROUND"
+        php_start_command = "/etc/init.d/apache2 restart"
+        p = subprocess.Popen(php_start_command, shell=True)
+        output, errors = p.communicate()
+        log.debug("Apache server started: [command] %s, [output] %s" % (php_start_command, output))
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.yapsy-plugin
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.yapsy-plugin b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.yapsy-plugin
new file mode 100644
index 0000000..221ffd5
--- /dev/null
+++ b/tools/puppet3/modules/php/files/agent/plugins/PhpServerStarterPlugin.yapsy-plugin
@@ -0,0 +1,9 @@
+[Core]
+Name = PhpServerStarterPlugin to start Apache server with PHP
+Module = PhpServerStarterPlugin
+
+[Documentation]
+Description = ArtifactUpdatedEvent
+Author = Op1
+Version = 0.1
+Website = stratos.apache.org
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/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 e088fdd..be9f225 100755
--- a/tools/puppet3/modules/php/manifests/init.pp
+++ b/tools/puppet3/modules/php/manifests/init.pp
@@ -23,8 +23,10 @@
 class php () {
 
   $custom_agent_templates = ['extensions/artifacts-updated.sh']
+  $custom_plugins = ['plugins/PhpServerStarterPlugin.py', 'plugins/PhpServerStarterPlugin.yapsy-plugin']
   class {'python_agent':
     custom_templates => $custom_agent_templates,
+    custom_plugins => $custom_plugins,
     module=>'php'
   }
 
@@ -121,13 +123,13 @@ class php () {
                    Php::Importssl['import ssl']
                  ];
 
-    'apache2 restart':
-      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
-      command => "/etc/init.d/apache2 restart",
-      require => [ Exec["enable ssl module"],
-                   File['/etc/apache2/sites-enabled/default'], 
-                   File['/etc/apache2/sites-enabled/default-ssl']
-                 ];
+#    'apache2 restart':
+#      path    => ['/bin', '/usr/bin', '/usr/sbin/'],
+#      command => "/etc/init.d/apache2 restart",
+#      require => [ Exec["enable ssl module"],
+#                   File['/etc/apache2/sites-enabled/default'],
+#                   File['/etc/apache2/sites-enabled/default-ssl']
+#                 ];
   }
 
   #install stratos_base before java before php before agent

http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/tools/puppet3/modules/python_agent/manifests/copy_plugins.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/python_agent/manifests/copy_plugins.pp b/tools/puppet3/modules/python_agent/manifests/copy_plugins.pp
new file mode 100755
index 0000000..882741b
--- /dev/null
+++ b/tools/puppet3/modules/python_agent/manifests/copy_plugins.pp
@@ -0,0 +1,29 @@
+# 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.
+
+# Copy the plugins from the modules
+
+define python_agent::copy_plugins ($target,$plugins_dir) {
+  file { "${target}/${name}":
+    ensure  => present,
+    owner   => $agent::owner,
+    group   => $agent::group,
+    mode    => '0755',
+    source => "puppet:///modules/${plugins_dir}/${name}"
+  #content => template("${plugins_dir}/${name}"),
+  }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/db0ae09b/tools/puppet3/modules/python_agent/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/python_agent/manifests/init.pp b/tools/puppet3/modules/python_agent/manifests/init.pp
index 36fbc97..603d79b 100644
--- a/tools/puppet3/modules/python_agent/manifests/init.pp
+++ b/tools/puppet3/modules/python_agent/manifests/init.pp
@@ -26,7 +26,8 @@ class python_agent(
   $auto_checkout          = true,
   $module                 = 'undef',
   $custom_templates       = [],
-  $exclude_templates	  = []
+  $exclude_templates	    = [],
+  $custom_plugins         = []
 ){
 
   $service_code    = 'cartridge-agent'
@@ -147,6 +148,12 @@ class python_agent(
     require => File["${agent_home}/agent.conf"],
   }
 
+  python_agent::copy_plugins { $custom_plugins:
+    target => $agent_home,
+    plugins_dir => "${module}/agent",
+    require => File["${agent_home}/logging.ini"]
+  }
+
   python_agent::start { $service_code:
     owner   => $owner,
     target  => $agent_home,