Added default values for input and output adapters

application-manager-new
ayyoob 8 years ago
parent b7eac182c2
commit afde45b2f0

@ -0,0 +1,29 @@
<processor>
<!-- Add input event adapter config element -->
<add>
<after>inputEventAdaptersConfig/adapterConfig[@type="jms"]</after>
<value><![CDATA[<adapterConfig type="oauth-http">
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="maximumHttpConnectionPerHost">2</property>
<property key="maximumTotalHttpConnection">100</property>
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
<property key="username">admin</property>
<property key="password">admin</property>
</adapterConfig>
<adapterConfig type="oauth-mqtt">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="connectionKeepAliveInterval">60</property>
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
</adapterConfig>]]></value>
</add>
</processor>

@ -0,0 +1,40 @@
<processor>
<!-- Add outpu event adapter config element -->
<add>
<after>/outputEventAdaptersConfig/adapterConfig[@type="websocket"]</after>
<value><![CDATA[<adapterConfig type="oauth-mqtt">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="connectionKeepAliveInterval">60</property>
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
</adapterConfig>
<adapterConfig type="secured-websocket">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<!--Authorizer holds the information of the authorizer that is used authorize a connection.-->
<property key="authenticator">org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator</property>
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
<property key="maximumHttpConnectionPerHost">2</property>
<property key="maximumTotalHttpConnection">100</property>
<property key="authorizer">org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="deviceMgtServerUrl">https://${iot.core.host}:${iot.core.https.port}</property>
<property key="username">admin</property>
<property key="password">admin</property>
<property key="scopes"></property>
<!--websocket connection permissions which are validated for grouping (can have multiple permission.)-->
<property key="statsPermission">/permission/device-mgt/realtime_analytics</property>
<!--offset time from expiry time to trigger refresh call (in seconds)-->
<property key="tokenRefreshTimeOffset">100</property>
</adapterConfig>]]></value>
</add>
</processor>

@ -102,6 +102,40 @@
</transformations> </transformations>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>init-input-adapter-config</id>
<phase>prepare-package</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<failOnMissingXpath>true</failOnMissingXpath>
<transformations>
<transformation>
<input>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml</input>
<output>../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml</output>
<config>input-adapter-change.xml</config>
</transformation>
</transformations>
</configuration>
</execution>
<execution>
<id>init-output-adapter-config</id>
<phase>prepare-package</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<failOnMissingXpath>true</failOnMissingXpath>
<transformations>
<transformation>
<input>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml</input>
<output>../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml</output>
<config>output-adapter-change.xml</config>
</transformation>
</transformations>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>

@ -196,7 +196,7 @@ set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Analytics" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Analytics" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gatway.host="localhost" -Diot.gateway.https.port="8243" -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8
:runJava :runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME% echo JAVA_HOME environment variable is set to %JAVA_HOME%

@ -326,6 +326,10 @@ do
-Dmqtt.broker.port="1886" \ -Dmqtt.broker.port="1886" \
-Diot.core.host="localhost" \ -Diot.core.host="localhost" \
-Diot.core.https.port="9443" \ -Diot.core.https.port="9443" \
-Diot.keymanager.host="localhost" \
-Diot.keymanager.https.port="9443" \
-Diot.gateway.host="localhost" \
-Diot.gateway.https.port="8243" \
$NODE_PARAMS \ $NODE_PARAMS \
org.wso2.carbon.bootstrap.Bootstrap $* org.wso2.carbon.bootstrap.Bootstrap $*
status=$? status=$?

@ -0,0 +1,29 @@
<processor>
<!-- Add input event adapter config element -->
<add>
<after>inputEventAdaptersConfig/adapterConfig[@type="jms"]</after>
<value><![CDATA[<adapterConfig type="oauth-http">
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="maximumHttpConnectionPerHost">2</property>
<property key="maximumTotalHttpConnection">100</property>
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
<property key="username">admin</property>
<property key="password">admin</property>
</adapterConfig>
<adapterConfig type="oauth-mqtt">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="connectionKeepAliveInterval">60</property>
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
</adapterConfig>]]></value>
</add>
</processor>

@ -0,0 +1,40 @@
<processor>
<!-- Add outpu event adapter config element -->
<add>
<after>/outputEventAdaptersConfig/adapterConfig[@type="websocket"]</after>
<value><![CDATA[<adapterConfig type="oauth-mqtt">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<property key="connectionKeepAliveInterval">60</property>
<property key="dcrUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
</adapterConfig>
<adapterConfig type="secured-websocket">
<!-- Thread Pool Related Properties -->
<property key="minThread">8</property>
<property key="maxThread">100</property>
<property key="keepAliveTimeInMillis">20000</property>
<property key="jobQueueSize">10000</property>
<!--Authorizer holds the information of the authorizer that is used authorize a connection.-->
<property key="authenticator">org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator</property>
<property key="keymanagerUrl">https://${iot.keymanager.host}:${iot.keymanager.https.port}</property>
<property key="maximumHttpConnectionPerHost">2</property>
<property key="maximumTotalHttpConnection">100</property>
<property key="authorizer">org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer</property>
<property key="tokenUrl">https://${iot.gateway.host}:${iot.gateway.https.port}/token</property>
<property key="deviceMgtServerUrl">https://${iot.core.host}:${iot.core.https.port}</property>
<property key="username">admin</property>
<property key="password">admin</property>
<property key="scopes"></property>
<!--websocket connection permissions which are validated for grouping (can have multiple permission.)-->
<property key="statsPermission">/permission/device-mgt/realtime_analytics</property>
<!--offset time from expiry time to trigger refresh call (in seconds)-->
<property key="tokenRefreshTimeOffset">100</property>
</adapterConfig>]]></value>
</add>
</processor>

@ -90,6 +90,49 @@
</executions> </executions>
</plugin> </plugin>
<!-- Add the input and output adapter configs to the file -->
<plugin>
<groupId>com.google.code.maven-config-processor-plugin</groupId>
<artifactId>config-processor-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>init-input-adapter-config</id>
<phase>prepare-package</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<failOnMissingXpath>false</failOnMissingXpath>
<transformations>
<transformation>
<input>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml</input>
<output>../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml</output>
<config>input-adapter-change.xml</config>
</transformation>
</transformations>
</configuration>
</execution>
<execution>
<id>init-output-adapter-config</id>
<phase>prepare-package</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<failOnMissingXpath>false</failOnMissingXpath>
<transformations>
<transformation>
<input>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml</input>
<output>../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml</output>
<config>output-adapter-change.xml</config>
</transformation>
</transformations>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>

@ -162,7 +162,7 @@ set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gateway.host="localhost" -Diot.gateway.https.port="8243"
:runJava :runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME% echo JAVA_HOME environment variable is set to %JAVA_HOME%

@ -307,6 +307,14 @@ do
-DworkerNode=false \ -DworkerNode=false \
-Dorg.wso2.ignoreHostnameVerification=true \ -Dorg.wso2.ignoreHostnameVerification=true \
-Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \
-Dmqtt.broker.host="localhost" \
-Dmqtt.broker.port="1886" \
-Diot.core.host="localhost" \
-Diot.core.https.port="9443" \
-Diot.keymanager.host="localhost" \
-Diot.keymanager.https.port="9443" \
-Diot.gateway.host="localhost" \
-Diot.gateway.https.port="8243" \
org.wso2.carbon.bootstrap.Bootstrap $* org.wso2.carbon.bootstrap.Bootstrap $*
status=$? status=$?
done done

Loading…
Cancel
Save