Merge pull request #30 from charithag/master

Add carbonapps to deployment
merge-requests/1/head
Charitha Goonetilleke 9 years ago
commit f535b1d9cc

@ -331,6 +331,11 @@
<include>*/**</include> <include>*/**</include>
</includes> </includes>
</fileSet> </fileSet>
<fileSet>
<directory>src/statistics/carbonapps/target</directory>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps
</outputDirectory>
</fileSet>
<fileSet> <fileSet>
<directory> <directory>
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<eventReceiver name="EventReceiver_accelerometer" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
<to streamName="org.wso2.iot.devices.accelerometer" version="1.0.0"/>
</eventReceiver>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<artifact name="Eventreceiver_accelerometer" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_accelerometer.xml</file>
</artifact>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<artifact name="Eventstore_accelerometer" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_accelerometer.xml</file>
</artifact>

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EventStoreConfiguration>
<Source>
<StreamId>org.wso2.iot.devices.accelerometer:1.0.0</StreamId>
</Source>
<RecordStoreName>EVENT_STORE</RecordStoreName>
<TableSchema>
<ColumnDefinition>
<Name>meta_owner</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceType</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceId</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_time</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>LONG</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>battery</Name>
<EnableIndexing>false</EnableIndexing>
<IsPrimaryKey>false</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>FLOAT</Type>
</ColumnDefinition>
</TableSchema>
</EventStoreConfiguration>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<artifact name="Eventstream_accelerometer" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.accelerometer_1.0.0.json</file>
</artifact>

@ -0,0 +1,20 @@
{
"name": "org.wso2.iot.devices.accelerometer",
"version": "1.0.0",
"nickName": "accelerometer Data",
"description": "accelerometer data received from the Device",
"metaData": [
{"name":"owner","type":"STRING"},
{"name":"deviceType","type":"STRING"},
{"name":"deviceId","type":"STRING"},
{"name":"time","type":"LONG"}
],
"payloadData": [
{
"name": "accelerometer","type": "FLOAT"
}
]
}

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Analytics>
<Name>Accelerometer_Sensor_Script</Name>
<Script>
CREATE TEMPORARY TABLE DeviceAccelerometerData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_DEVICES_ACCELEROMETER");
CREATE TEMPORARY TABLE DeviceAccelerometerSummaryData USING CarbonAnalytics OPTIONS (tableName "DEVICE_ACCELEROMETER_SUMMARY", schema "accelerometer FLOAT, deviceType STRING -i, deviceId STRING -i, owner STRING -i, time LONG -i",primaryKeys "deviceType, deviceId, owner, time");
insert overwrite table DeviceAccelerometerSummaryData select accelerometer, meta_deviceType as deviceType, meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from DeviceAccelerometerData group by battery, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as BIGINT);
</Script>
<CronExpression>0 * * * * ?</CronExpression>
</Analytics>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Accelerometer_Sensor_Script.xml</file>
</artifact>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<artifacts>
<artifact name="Accelerometer_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_accelerometer" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_accelerometer" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_accelerometer" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -9,6 +9,7 @@
<property name="Light_dir" value="Light"/> <property name="Light_dir" value="Light"/>
<property name="Battery_dir" value="Battery"/> <property name="Battery_dir" value="Battery"/>
<property name="Magnetic_dir" value="Magnetic"/> <property name="Magnetic_dir" value="Magnetic"/>
<property name="Accelerometer_dir" value="Accelerometer"/>
<target name="clean"> <target name="clean">
<delete dir="${target-dir}"/> <delete dir="${target-dir}"/>
</target> </target>
@ -29,8 +30,8 @@
<zip destfile="${target-dir}/${Magnetic_dir}.car"> <zip destfile="${target-dir}/${Magnetic_dir}.car">
<zipfileset dir="${Magnetic_dir}"/> <zipfileset dir="${Magnetic_dir}"/>
</zip> </zip>
<zip destfile="${target-dir}/${Accelerometer_dir}.car">
<zipfileset dir="${Accelerometer_dir}"/>
</zip>
</target> </target>
</project> </project>

@ -171,6 +171,9 @@
<featureArtifactDef> <featureArtifactDef>
org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature:${carbon.mobile.device.mgt.version} org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature:${carbon.mobile.device.mgt.version}
</featureArtifactDef> </featureArtifactDef>
<featureArtifactDef>
org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.androidsense.feature:${carbon.mobile.device.mgt.version}
</featureArtifactDef>
<featureArtifactDef> <featureArtifactDef>
org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.digitaldisplay.feature:${carbon.mobile.device.mgt.version} org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.digitaldisplay.feature:${carbon.mobile.device.mgt.version}
</featureArtifactDef> </featureArtifactDef>
@ -877,6 +880,10 @@
<id>org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature.group</id> <id>org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature.group</id>
<version>${carbon.mobile.device.mgt.version}</version> <version>${carbon.mobile.device.mgt.version}</version>
</feature> </feature>
<feature>
<id>org.wso2.carbon.device.mgt.iot.androidsense.feature.group</id>
<version>${carbon.mobile.device.mgt.version}</version>
</feature>
<feature> <feature>
<id>org.wso2.carbon.device.mgt.iot.digitaldisplay.feature.group</id> <id>org.wso2.carbon.device.mgt.iot.digitaldisplay.feature.group</id>
<version>${carbon.mobile.device.mgt.version}</version> <version>${carbon.mobile.device.mgt.version}</version>

Loading…
Cancel
Save