You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/03/26 07:14:20 UTC
[05/10] Added puppet modules for stratos components
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/conf/stream-manager-config.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/conf/stream-manager-config.xml b/tools/puppet/modules/cep/files/configs/repository/conf/stream-manager-config.xml
new file mode 100755
index 0000000..8010362
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/conf/stream-manager-config.xml
@@ -0,0 +1,269 @@
+<streamManagerConfiguration xmlns="http://wso2.org/carbon/streammanager">
+ <!-- in-flight requests stream definitions start -->
+ <streamDefinition name="in_flight_requests" version="1.0.0">
+ <description>in-flight request count</description>
+ <nickName>in-flight requests</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="in_flight_request_count" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="gradient_in_flight_requests" version="1.0.0">
+ <description>gradient of in flight request count</description>
+ <nickName>gradient in flight requests</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="count" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="average_in_flight_requests" version="1.0.0">
+ <description>average of in-flight request count</description>
+ <nickName>average in-flight requests</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="count" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="second_derivative_in_flight_requests" version="1.0.0">
+ <description>second derivative of in-flight request count</description>
+ <nickName>second derivative in-flight requests</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="count" type="double"/>
+ </payloadData>
+ </streamDefinition>
+ <!-- in-flight requests stream definitions end -->
+
+ <!-- cartridge agent health stats stream definitions start -->
+ <streamDefinition name="cartridge_agent_health_stats" version="1.0.0">
+ <description>agent health stats</description>
+ <nickName>agent health stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_id" type="String" />
+ <property name="partition_id" type="String" />
+ <property name="health_description" type="String"/>
+ <property name="value" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="average_load_average_stats" version="1.0.0">
+ <description>average load average stats</description>
+ <nickName>average load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="average_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="average_memory_consumption_stats" version="1.0.0">
+ <description>average memory consumption stats</description>
+ <nickName>average memory consumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="average_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="gradient_load_average_stats" version="1.0.0">
+ <description>gradient load average stats</description>
+ <nickName>gradient load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="gradient_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="gradient_memory_consumption_stats" version="1.0.0">
+ <description>gradient memoryconsumption stats</description>
+ <nickName>gradient memoryconsumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="gradient_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="second_derivative_memory_consumption_stats" version="1.0.0">
+ <description>second derivative memory consumption stats</description>
+ <nickName>second derivative memory consumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="second_derivative_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="second_derivative_load_average_stats" version="1.0.0">
+ <description>second derivative load average stats</description>
+ <nickName>second derivative load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="second_derivative_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="fault_message" version="1.0.0">
+ <description>fault message</description>
+ <nickName>fault message</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="member_id" type="String"/>
+ <property name="partition_id" type="String"/>
+ </payloadData>
+ </streamDefinition>
+ <!-- cartridge agent health stats stream definitions end -->
+
+ <!-- This is for member_id wise grouping-->
+ <streamDefinition name="member_average_load_average_stats" version="1.0.0">
+ <description>average load average stats</description>
+ <nickName>average load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String" />
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_average_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="member_average_memory_consumption_stats" version="1.0.0">
+ <description>average memory consumption stats</description>
+ <nickName>average memory consumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String"/>
+ <property name="cluster_id" type="String"/>
+ <property name="network_partition_id" type="String"/>
+ <property name="member_average_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="member_gradient_load_average_stats" version="1.0.0">
+ <description>gradient load average stats</description>
+ <nickName>gradient load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String" />
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_gradient_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="member_gradient_memory_consumption_stats" version="1.0.0">
+ <description>gradient memoryconsumption stats</description>
+ <nickName>gradient memoryconsumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String" />
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_gradient_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="member_second_derivative_memory_consumption_stats" version="1.0.0">
+ <description>second derivative memory consumption stats</description>
+ <nickName>second derivative memory consumption stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String" />
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_second_derivative_memory_consumption" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+ <streamDefinition name="member_second_derivative_load_average_stats" version="1.0.0">
+ <description>second derivative load average stats</description>
+ <nickName>second derivative load average stats</nickName>
+ <metaData>
+ </metaData>
+ <correlationData>
+ </correlationData>
+ <payloadData>
+ <property name="member_id" type="String" />
+ <property name="cluster_id" type="String" />
+ <property name="network_partition_id" type="String"/>
+ <property name="member_second_derivative_load_average" type="double"/>
+ </payloadData>
+ </streamDefinition>
+
+</streamManagerConfiguration>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/HealthStatisticsEventBuilder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/HealthStatisticsEventBuilder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/HealthStatisticsEventBuilder.xml
new file mode 100755
index 0000000..763f7d8
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/HealthStatisticsEventBuilder.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventBuilder name="HealthStatisticsEventBuilder" statistics="disable"
+ trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
+ <from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
+ <property name="stream">cartridge_agent_health_stats</property>
+ <property name="version">1.0.0</property>
+ </from>
+ <mapping customMapping="disable" type="wso2event"/>
+ <to streamName="cartridge_agent_health_stats" version="1.0.0"/>
+</eventBuilder>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/InstanceStatusStatisticsBuilder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/InstanceStatusStatisticsBuilder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/InstanceStatusStatisticsBuilder.xml
new file mode 100755
index 0000000..ed133c9
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/InstanceStatusStatisticsBuilder.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventBuilder name="InstanceStatusStatisticsBuilder"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventbuilder">
+ <from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
+ <property name="stream">stratos.instance.stats</property>
+ <property name="version">1.0.0</property>
+ </from>
+ <mapping customMapping="disable" type="wso2event"/>
+ <to streamName="stratos.instance.stats" version="1.0.0"/>
+</eventBuilder>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/LoadBalancerStatisticsEventBuilder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/LoadBalancerStatisticsEventBuilder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/LoadBalancerStatisticsEventBuilder.xml
new file mode 100755
index 0000000..a3bf644
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventbuilders/LoadBalancerStatisticsEventBuilder.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventBuilder name="LoadBalancerStatisticsEventBuilder"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
+ <from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
+ <property name="stream">in_flight_requests</property>
+ <property name="version">1.0.0</property>
+ </from>
+ <mapping customMapping="disable" type="wso2event"/>
+ <to streamName="in_flight_requests" version="1.0.0"/>
+</eventBuilder>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageInFlightRequestsEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageInFlightRequestsEventFormatter.xml
new file mode 100755
index 0000000..bf18f7d
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="AverageRequestsInflightEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="average_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.AverageRequestsInFlightEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{count}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..7e4cbc6
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="AverageLoadAverageEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="average_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.AverageLoadAverageEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{average_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..7a69ac4
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/AverageMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="AverageMemoryConsumptionEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="average_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.AverageMemoryConsumptionEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{average_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/FaultMessageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/FaultMessageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/FaultMessageEventFormatter.xml
new file mode 100755
index 0000000..639332d
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/FaultMessageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="FaultMessageEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="fault_message" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberFaultEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","memberId":"{{member_id}}","partitionId":"{{partition_id}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientInFlightRequestsEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientInFlightRequestsEventFormatter.xml
new file mode 100755
index 0000000..18b482e
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="GradientInFlightRequestsEventFormatter" statistics="disable"
+ trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="gradient_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.GradientOfRequestsInFlightEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{count}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..d44d033
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="GradientLoadAverageEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="gradient_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.GradientOfLoadAverageEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{gradient_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..f91d85e
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/GradientMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="GradientMemoryConsumptionEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="gradient_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.GradientOfMemoryConsumptionEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{gradient_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..18e3fe3
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberAverageLoadAverageEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_average_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberAverageLoadAverageEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_average_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..7189b69
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberAverageMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberAverageMemoryConsumptionEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_average_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberAverageMemoryConsumptionEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_average_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..aaeba57
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberGradientLoadAverageEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_gradient_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberGradientOfLoadAverageEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_gradient_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..120d78f
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberGradientMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberGradientMemoryConsumptionEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_gradient_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberGradientOfMemoryConsumptionEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_gradient_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..6b4ab66
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberSecondDerivativeLoadAverageEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_second_derivative_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberSecondDerivativeOfLoadAverageEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_second_derivative_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..9dc967a
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="MemberSecondDerivativeMemoryConsumptionEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="member_second_derivative_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.MemberSecondDerivativeOfMemoryConsumptionEvent":{"message":{"memberId":"{{member_id}}","clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{member_second_derivative_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeInFlightRequestsEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeInFlightRequestsEventFormatter.xml
new file mode 100755
index 0000000..18bba84
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="SecondDerivativeEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="second_derivative_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.SecondDerivativeOfRequestsInFlightEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{count}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeLoadAverageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeLoadAverageEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeLoadAverageEventFormatter.xml
new file mode 100755
index 0000000..9312bd9
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeLoadAverageEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="SecondDerivativeLoadAverageEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="second_derivative_load_average_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.SecondDerivativeOfLoadAverageEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{second_derivative_load_average}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeMemoryConsumptionEventFormatter.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeMemoryConsumptionEventFormatter.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeMemoryConsumptionEventFormatter.xml
new file mode 100755
index 0000000..4c2f13e
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/eventformatters/SecondDerivativeMemoryConsumptionEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="SecondDerivativeMemoryConsumptionEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="second_derivative_memory_consumption_stats" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"org.apache.stratos.messaging.event.health.stat.SecondDerivativeOfMemoryConsumptionEvent":{"message":{"clusterId":"{{cluster_id}}","networkPartitionId":"{{network_partition_id}}","value":"{{second_derivative_memory_consumption}}"}}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageHeathRequest.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageHeathRequest.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageHeathRequest.xml
new file mode 100755
index 0000000..56c9545
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageHeathRequest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="AverageHeathRequest" statistics="disable"
+ trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will average health stats of an instance over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="healthStats1" name="cartridge_agent_health_stats" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[from healthStats1 [health_description == 'ports_not_open'] select cluster_id, network_partition_id, member_id, partition_id insert into fault_message;
+ from healthStats1 [health_description == 'load_average'] #window.timeBatch(1 min) select cluster_id, network_partition_id, avg(value) as average_load_average group by cluster_id, network_partition_id insert into average_load_average_stats;
+ from healthStats1 [health_description == 'load_average'] #window.timeBatch(1 min) select member_id, cluster_id, network_partition_id, avg(value) as member_average_load_average group by member_id insert into member_average_load_average_stats;
+ from healthStats1 [health_description == 'memory_consumption'] #window.timeBatch(1 min) select member_id, cluster_id, network_partition_id, avg(value) as member_average_memory_consumption group by member_id insert into member_average_memory_consumption_stats;
+ from healthStats1 [health_description == 'memory_consumption'] #window.timeBatch(1 min) select cluster_id, network_partition_id, avg(value) as average_memory_consumption group by cluster_id, network_partition_id insert into average_memory_consumption_stats;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="average_load_average_stats" passthroughFlow="disable"
+ valueOf="average_load_average_stats" version="1.0.0"/>
+ <stream name="member_average_load_average_stats" passthroughFlow="disable"
+ valueOf="member_average_load_average_stats" version="1.0.0"/>
+ <stream name="member_average_memory_consumption_stats" passthroughFlow="disable"
+ valueOf="member_average_memory_consumption_stats" version="1.0.0"/>
+ <stream name="average_memory_consumption_stats" passthroughFlow="disable"
+ valueOf="average_memory_consumption_stats" version="1.0.0"/>
+ <stream name="fault_message" passthroughFlow="disable"
+ valueOf="fault_message" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageInFlightRequestsFinder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageInFlightRequestsFinder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageInFlightRequestsFinder.xml
new file mode 100755
index 0000000..5022bde
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/AverageInFlightRequestsFinder.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="AverageInFlightRequestsFinder" statistics="disable"
+ trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will average the number of requests in flight over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="lbStats1" name="in_flight_requests" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+from lbStats1#window.timeBatch(1 min)
+select cluster_id,network_partition_id, avg(in_flight_request_count) as count group by cluster_id,network_partition_id insert into average_in_flight_requests;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="average_in_flight_requests"
+ valueOf="average_in_flight_requests" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfHealthRequest.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfHealthRequest.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfHealthRequest.xml
new file mode 100755
index 0000000..75406f9
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfHealthRequest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="GradientOfHealthRequest" statistics="disable"
+ trace="disable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will find the gradient of the heath request over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="healthStats2" name="cartridge_agent_health_stats" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+ from healthStats2 #window.stratos:faultHandling(1min, member_id) select cluster_id, network_partition_id, member_id, partition_id group by cluster_id, network_partition_id insert into fault_message;
+ from healthStats2 [health_description == 'load_average'] #window.stratos:gradient(1 min, value) select cluster_id, network_partition_id, value as gradient_load_average group by cluster_id, network_partition_id insert into gradient_load_average_stats;
+ from healthStats2 [health_description == 'load_average'] #window.stratos:gradient(1 min, value) select member_id, cluster_id, network_partition_id, value as member_gradient_load_average group by member_id insert into member_gradient_load_average_stats;
+ from healthStats2 [health_description == 'memory_consumption'] #window.stratos:gradient(1 min, value) select member_id, cluster_id, network_partition_id, value as member_gradient_memory_consumption group by member_id insert into member_gradient_memory_consumption_stats;
+ from healthStats2 [health_description == 'memory_consumption'] #window.stratos:gradient(1 min, value) select cluster_id, network_partition_id, value as gradient_memory_consumption group by cluster_id, network_partition_id insert into gradient_memory_consumption_stats;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="gradient_load_average_stats"
+ valueOf="gradient_load_average_stats" version="1.0.0"/>
+ <stream name="gradient_memory_consumption_stats"
+ valueOf="gradient_memory_consumption_stats" version="1.0.0"/>
+ <stream name="member_gradient_load_average_stats"
+ valueOf="member_gradient_load_average_stats" version="1.0.0"/>
+ <stream name="member_gradient_memory_consumption_stats"
+ valueOf="member_gradient_memory_consumption_stats" version="1.0.0"/>
+ <stream name="fault_message" passthroughFlow="disable"
+ valueOf="fault_message" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfRequestsInFlightFinder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfRequestsInFlightFinder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfRequestsInFlightFinder.xml
new file mode 100755
index 0000000..507fdbe
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/GradientOfRequestsInFlightFinder.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="GradientOfRequestsInFlightFinder"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will find the gradient of the number of requests in flight over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="lbStats2" name="in_flight_requests" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+from lbStats2#window.stratos:gradient(1 min, in_flight_request_count)
+select cluster_id,network_partition_id,in_flight_request_count as count group by cluster_id,network_partition_id insert into gradient_in_flight_requests;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="gradient_in_flight_requests" valueOf="gradient_in_flight_requests" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfHealthRequest.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfHealthRequest.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfHealthRequest.xml
new file mode 100755
index 0000000..fefa306
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfHealthRequest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="SecondDerivativeOfHealthRequest"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will find the second derivative of health stats over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="healthStats3" name="cartridge_agent_health_stats" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+ from healthStats3 [health_description == 'memory_consumption'] #window.stratos:secondDerivative(1 min, value) select cluster_id, network_partition_id, value as second_derivative_memory_consumption group by cluster_id,network_partition_id insert into second_derivative_memory_consumption_stats;
+ from healthStats3 [health_description == 'memory_consumption'] #window.stratos:secondDerivative(1 min, value) select member_id, cluster_id, network_partition_id, value as member_second_derivative_memory_consumption group by member_id insert into member_second_derivative_memory_consumption_stats;
+ from healthStats3 [health_description == 'load_average'] #window.stratos:secondDerivative(1 min, value) select member_id, cluster_id, network_partition_id, value as member_second_derivative_load_average group by member_id insert into member_second_derivative_load_average_stats;
+ from healthStats3 [health_description == 'load_average'] #window.stratos:secondDerivative(1 min, value) select cluster_id, network_partition_id, value as second_derivative_load_average group by cluster_id,network_partition_id insert into second_derivative_load_average_stats;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="second_derivative_memory_consumption_stats"
+ valueOf="second_derivative_memory_consumption_stats" version="1.0.0"/>
+ <stream name="second_derivative_load_average_stats"
+ valueOf="second_derivative_load_average_stats" version="1.0.0"/>
+ <stream name="member_second_derivative_memory_consumption_stats"
+ valueOf="member_second_derivative_memory_consumption_stats" version="1.0.0"/>
+ <stream name="member_second_derivative_load_average_stats"
+ valueOf="member_second_derivative_load_average_stats" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfRequestsInFlightFinder.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfRequestsInFlightFinder.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfRequestsInFlightFinder.xml
new file mode 100755
index 0000000..a576657
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/executionplans/SecondDerivativeOfRequestsInFlightFinder.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="SecondDerivativeOfRequestsInFlightFinder"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will find the second derivative of the number of requests in flight over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="lbStats3" name="in_flight_requests" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+from lbStats3#window.stratos:secondDerivative(1 min, in_flight_request_count)
+select cluster_id,network_partition_id,in_flight_request_count as count group by cluster_id,network_partition_id insert into second_derivative_in_flight_requests;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="second_derivative_in_flight_requests"
+ valueOf="second_derivative_in_flight_requests" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/inputeventadaptors/DefaultWSO2EventInputAdaptor.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/inputeventadaptors/DefaultWSO2EventInputAdaptor.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/inputeventadaptors/DefaultWSO2EventInputAdaptor.xml
new file mode 100755
index 0000000..8cc5e89
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/inputeventadaptors/DefaultWSO2EventInputAdaptor.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<inputEventAdaptor name="DefaultWSO2EventInputAdaptor"
+ statistics="disable" trace="enable" type="wso2event" xmlns="http://wso2.org/carbon/eventadaptormanager"/>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/DefaultWSO2EventOutputAdaptor.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/DefaultWSO2EventOutputAdaptor.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/DefaultWSO2EventOutputAdaptor.xml
new file mode 100755
index 0000000..59ba20d
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/DefaultWSO2EventOutputAdaptor.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outputEventAdaptor name="DefaultWSO2EventOutputAdaptor"
+ statistics="disable" trace="disable" type="wso2event" xmlns="http://wso2.org/carbon/eventadaptormanager">
+ <property name="username">admin</property>
+ <property name="receiverURL">tcp://localhost:7661</property>
+ <property name="password">admin</property>
+ <property name="authenticatorURL">ssl://localhost:7761</property>
+</outputEventAdaptor>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/JMSOutputAdaptor.xml
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/JMSOutputAdaptor.xml b/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/JMSOutputAdaptor.xml
new file mode 100755
index 0000000..b1e0a7f
--- /dev/null
+++ b/tools/puppet/modules/cep/files/configs/repository/deployment/server/outputeventadaptors/JMSOutputAdaptor.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<outputEventAdaptor name="JMSOutputAdaptor" statistics="disable"
+ trace="enable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
+ <property name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property>
+ <property name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</property>
+ <property name="transport.jms.ConnectionFactoryJNDIName">topicConnectionfactory</property>
+ <property name="transport.jms.DestinationType">topic</property>
+</outputEventAdaptor>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/clean.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/clean.pp b/tools/puppet/modules/cep/manifests/clean.pp
new file mode 100755
index 0000000..fa5ee91
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/clean.pp
@@ -0,0 +1,45 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Cleans the previous deployment. If the maintenance mode is set to true, this will only kill the running service.
+
+define cep::clean ($mode, $target) {
+ if $mode == 'refresh' {
+ exec{
+ "Remove_lock_file_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ onlyif => "test -f ${target}/wso2carbon.lck",
+ command => "rm ${target}/wso2carbon.lck";
+
+ "Stop_process_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ command => "kill -9 `cat ${target}/wso2carbon.pid` ; /bin/echo Killed",
+ require => Exec["Remove_lock_file_${name}"];
+ }
+ }
+ elsif $mode == 'new' {
+ exec { "Stop_process_and_remove_CARBON_HOME_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ command => "kill -9 `cat ${target}/wso2carbon.pid` ; rm -rf ${target}";
+ }
+ }
+ elsif $mode == 'zero' {
+ exec { "Stop_process_remove_CARBON_HOME_and_pack_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ command => "kill -9 `cat ${target}/wso2carbon.pid` ; rm -rf ${target} ; rm -f ${::local_package_dir}/wso2${cep::service_code}-${cep::version}.zip";
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/deploy.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/deploy.pp b/tools/puppet/modules/cep/manifests/deploy.pp
new file mode 100755
index 0000000..90798b4
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/deploy.pp
@@ -0,0 +1,43 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Executes the deployment by pushing all necessary configurations and patches
+
+define cep::deploy ($service, $security, $target, $owner, $group) {
+ file { "/tmp/${cep::deployment_code}":
+ ensure => present,
+ owner => $owner,
+ group => $group,
+ sourceselect => all,
+ ignore => '.svn',
+ recurse => true,
+ source => [
+ "puppet:///modules/${service}/configs/",
+ "puppet:///modules/${service}/patches/"]
+ }
+
+ exec {
+ "Copy_${name}_modules_to_carbon_home":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ command => "cp -r /tmp/${cep::deployment_code}/* ${target}/; chown -R ${owner}:${owner} ${target}/; chmod -R 755 ${target}/",
+ require => File["/tmp/${cep::deployment_code}"];
+
+ "Remove_${name}_temporory_modules_directory":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ command => "rm -rf /tmp/${cep::deployment_code}",
+ require => Exec["Copy_${name}_modules_to_carbon_home"];
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/init.pp b/tools/puppet/modules/cep/manifests/init.pp
new file mode 100755
index 0000000..30992a8
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/init.pp
@@ -0,0 +1,101 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Class: cep
+#
+# This class installs wso2 complex event processor
+#
+#
+# Actions:
+# - Install wso2 complex event processor
+#
+# Requires:
+#
+# Sample Usage:
+#
+
+class cep (
+ $sub_cluster_domain = undef,
+ $version = '3.0.0',
+ $offset = 0,
+ $hazelcast_port = 4000,
+ $config_db = 'governance',
+ $maintenance_mode = true,
+ $depsync = false,
+ $clustering = false,
+ $members = {},
+ $owner = 'root',
+ $group = 'root',
+ $target = '/mnt',
+) inherits params {
+
+
+ $deployment_code = 'cep'
+ $carbon_version = $version
+ $service_code = 'cep'
+ $carbon_home = "${target}/wso2${service_code}-${carbon_version}"
+
+ $service_templates = [
+ 'conf/axis2/axis2.xml',
+ 'conf/carbon.xml',
+ 'conf/jndi.properties',
+ 'deployment/server/outputeventadaptors/JMSOutputAdaptor.xml',
+ ]
+
+ tag($service_code)
+
+ cep::clean { $deployment_code:
+ mode => $maintenance_mode,
+ target => $carbon_home,
+ }
+
+ cep::initialize { $deployment_code:
+ repo => $package_repo,
+ version => $carbon_version,
+ service => $service_code,
+ local_dir => $local_package_dir,
+ target => $target,
+ mode => $maintenance_mode,
+ owner => $owner,
+ require => Cep::Clean[$deployment_code],
+ }
+
+ cep::deploy { $deployment_code:
+ service => $deployment_code,
+ security => true,
+ owner => $owner,
+ group => $group,
+ target => $carbon_home,
+ require => Cep::Initialize[$deployment_code],
+ }
+
+ cep::push_templates {
+ $service_templates:
+ target => $carbon_home,
+ directory => $deployment_code,
+ require => Cep::Deploy[$deployment_code];
+ }
+
+ cep::start { $deployment_code:
+ owner => $owner,
+ target => $carbon_home,
+ require => [
+ Cep::Initialize[$deployment_code],
+ Cep::Deploy[$deployment_code],
+ Cep::Push_templates[$service_templates],
+ ],
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/initialize.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/initialize.pp b/tools/puppet/modules/cep/manifests/initialize.pp
new file mode 100755
index 0000000..2ab2258
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/initialize.pp
@@ -0,0 +1,59 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Initializing the deployment
+
+define cep::initialize ($repo, $version, $service, $local_dir, $target, $mode, $owner,) {
+ exec {
+ "creating_target_for_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ command => "mkdir -p ${target}";
+
+ "creating_local_package_repo_for_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ unless => "test -d ${local_dir}",
+ command => "mkdir -p ${local_dir}";
+
+ "downloading_wso2${service}-${version}.zip_for_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ cwd => $local_dir,
+ unless => "test -f ${local_dir}/wso2${service}-${version}.zip",
+ command => "wget -q ${repo}/wso2${service}-${version}.zip",
+ logoutput => 'on_failure',
+ creates => "${local_dir}/wso2${service}-${version}.zip",
+ timeout => 0,
+ require => Exec["creating_local_package_repo_for_${name}", "creating_target_for_${name}"];
+
+ "extracting_wso2${service}-${version}.zip_for_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ cwd => $target,
+ unless => "test -d ${target}/wso2${service}-${version}/repository",
+ command => "unzip ${local_dir}/wso2${service}-${version}.zip",
+ logoutput => 'on_failure',
+ creates => "${target}/wso2${service}-${version}/repository",
+ timeout => 0,
+ require => Exec["downloading_wso2${service}-${version}.zip_for_${name}"];
+
+ "setting_permission_for_${name}":
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
+ cwd => $target,
+ command => "chown -R ${owner}:${owner} ${target}/wso2${service}-${version} ;
+ chmod -R 755 ${target}/wso2${service}-${version}",
+ logoutput => 'on_failure',
+ timeout => 0,
+ require => Exec["extracting_wso2${service}-${version}.zip_for_${name}"];
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/params.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/params.pp b/tools/puppet/modules/cep/manifests/params.pp
new file mode 100755
index 0000000..0bf5b84
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/params.pp
@@ -0,0 +1,69 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Class cep::params
+#
+# This class manages cep parameters
+#
+# Parameters:
+#
+# Usage: Uncomment the variable and assign a value to override the nodes.pp value
+#
+#
+
+class cep::params {
+# $package_repo = 'http://downloads.wso2.com'
+# $local_package_dir = '/mnt/packs'
+#
+# # Service subdomains
+# $domain = 'wso2.com'
+# $as_subdomain = 'cep'
+# $management_subdomain = 'management'
+#
+# $admin_username = 'admin'
+# $admin_password = 'admin123'
+#
+# $mb_ip = '192.168.18.103'
+# $mb_port = '5672'
+#
+# # MySQL server configuration details
+# $mysql_server = 'mysql.wso2.com'
+# $mysql_port = '3306'
+# $max_connections = '100000'
+# $max_active = '150'
+# $max_wait = '360000'
+#
+# # Database details
+# $registry_user = 'registry'
+# $registry_password = 'ycJaCboyUo'
+# $registry_database = 'governance'
+#
+# $userstore_user = 'userstore'
+# $userstore_password = 'sUAKn09o5J'
+# $userstore_database = 'userstore'
+#
+# # Depsync settings
+# $svn_user = 'wso2'
+# $svn_password = 'wso2123'
+#
+# #LDAP settings
+# $ldap_connection_uri = 'ldap://localhost:10389'
+# $bind_dn = 'uid=admin,ou=system'
+# $bind_dn_password = 'adminpassword'
+# $user_search_base = 'ou=system'
+# $group_search_base = 'ou=system'
+# $sharedgroup_search_base = 'ou=SharedGroups,dc=wso2,dc=org'
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/push_templates.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/push_templates.pp b/tools/puppet/modules/cep/manifests/push_templates.pp
new file mode 100755
index 0000000..7746a0d
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/push_templates.pp
@@ -0,0 +1,26 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Apply the templates
+define cep::push_templates ($directory, $target) {
+ file { "${target}/repository/${name}":
+ ensure => present,
+ owner => $cep::owner,
+ group => $cep::group,
+ mode => '0755',
+ content => template("${directory}/${name}.erb"),
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9e9a7f97/tools/puppet/modules/cep/manifests/start.pp
----------------------------------------------------------------------
diff --git a/tools/puppet/modules/cep/manifests/start.pp b/tools/puppet/modules/cep/manifests/start.pp
new file mode 100755
index 0000000..28d5170
--- /dev/null
+++ b/tools/puppet/modules/cep/manifests/start.pp
@@ -0,0 +1,27 @@
+# ----------------------------------------------------------------------------
+# Copyright 2005-2013 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+#
+# Starts the service once the deployment is successful.
+
+define cep::start ($target, $owner) {
+ exec { "starting_${name}":
+ user => $owner,
+ path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/java/bin/',
+ unless => "test -f ${target}/wso2carbon.lck",
+ command => "touch ${target}/wso2carbon.lck; ${target}/bin/wso2server.sh > /dev/null 2>&1 &",
+ creates => "${target}/repository/wso2carbon.log",
+ }
+}