From: Ed Warnicke Date: Mon, 5 May 2014 18:57:41 +0000 (-0500) Subject: Breaking up 6360: Simple karaf distro X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~137^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=845caac725424c84bf32b4e36c7b25490b4ab538 Breaking up 6360: Simple karaf distro https://git.opendaylight.org/gerrit/#/c/6360/29 Change-Id: Ie2ab6f228146c5fe0db8c0caa0e99e9febe144ef Signed-off-by: Ed Warnicke --- diff --git a/opendaylight/distribution/opendaylight-karaf/pom.xml b/opendaylight/distribution/opendaylight-karaf/pom.xml new file mode 100644 index 0000000000..60f660a193 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/pom.xml @@ -0,0 +1,183 @@ + + + 4.0.0 + + org.opendaylight.controller + commons.opendaylight + 1.4.2-SNAPSHOT + ../../commons/opendaylight + + distribution.opendaylight-karaf + pom + + 3.0 + + + + + + org.apache.karaf.features + framework + ${karaf.version} + kar + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.felix + maven-bundle-plugin + [0,) + + cleanVersions + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [0,) + + copy + unpack + + + + + + + + + org.apache.karaf.tooling + karaf-maven-plugin + [0,) + + commands-generate-help + + + + + + + + + org.fusesource.scalate + maven-scalate-plugin + [0,) + + sitegen + + + + + + + + + org.apache.servicemix.tooling + depends-maven-plugin + [0,) + + generate-depends-file + + + + + + + + + + + + + + + org.apache.karaf.tooling + karaf-maven-plugin + ${karaf.version} + true + + + + standard + + + + + + process-resources + + install-kars + + process-resources + + + package + + instance-create-archive + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle.version} + + **\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/ + + + + + + scm:git:ssh://git.opendaylight.org:29418/controller.git + scm:git:ssh://git.opendaylight.org:29418/controller.git + HEAD + https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/context.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/context.xml new file mode 100644 index 0000000000..90b9ddf1c8 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/context.xml @@ -0,0 +1 @@ + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/00-netty.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/00-netty.xml new file mode 100644 index 0000000000..2365c700f9 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/00-netty.xml @@ -0,0 +1,60 @@ + + + urn:opendaylight:params:xml:ns:yang:controller:netty?module=netty&revision=2013-11-19 + urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12 + urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup?module=threadgroup&revision=2013-11-07 + urn:opendaylight:params:xml:ns:yang:controller:netty:timer?module=netty-timer&revision=2013-11-19 + + + + + + + netty:netty-threadgroup-fixed + global-boss-group + + + netty:netty-threadgroup-fixed + global-worker-group + + + netty:netty-hashed-wheel-timer + global-timer + + + netty:netty-global-event-executor + singleton + + + + + + netty:netty-threadgroup + + global-boss-group + /modules/module[type='netty-threadgroup-fixed'][name='global-boss-group'] + + + global-worker-group + /modules/module[type='netty-threadgroup-fixed'][name='global-worker-group'] + + + + netty:netty-event-executor + + global-event-executor + /modules/module[type='netty-global-event-executor'][name='singleton'] + + + + netty:netty-timer + + global-timer + /modules/module[type='netty-hashed-wheel-timer'][name='global-timer'] + + + + + + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/01-md-sal.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/01-md-sal.xml new file mode 100644 index 0000000000..619ab06d8d --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/01-md-sal.xml @@ -0,0 +1,203 @@ + + + + + + + + + prefix:schema-service-singleton + yang-schema-service + + + + + prefix:hash-map-data-store + hash-map-data-store + + + + + + + prefix:dom-broker-impl + dom-broker + + + dom:dom-data-store + + hash-map-data-store + + + + + + + + + prefix:binding-broker-impl + binding-broker-impl + + binding:binding-notification-service + binding-notification-broker + + + binding:binding-data-broker + binding-data-broker + + + + prefix:runtime-generated-mapping + runtime-mapping-singleton + + + prefix:binding-notification-broker + binding-notification-broker + + + + prefix:binding-data-broker + binding-data-broker + + dom:dom-broker-osgi-registry + dom-broker + + + binding:binding-dom-mapping-service + runtime-mapping-singleton + + + + + + + + + + dom:schema-service + + yang-schema-service + /modules/module[type='schema-service-singleton'][name='yang-schema-service'] + + + + binding:binding-notification-service + + binding-notification-broker + /modules/module[type='binding-notification-broker'][name='binding-notification-broker'] + + + + + dom:dom-data-store + + hash-map-data-store + /modules/module[type='hash-map-data-store'][name='hash-map-data-store'] + + + + + + + + binding:binding-broker-osgi-registry + + binding-osgi-broker + /modules/module[type='binding-broker-impl'][name='binding-broker-impl'] + + + + binding:binding-rpc-registry + + binding-rpc-broker + /modules/module[type='binding-broker-impl'][name='binding-broker-impl'] + + + + binding-impl:binding-dom-mapping-service + + runtime-mapping-singleton + /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] + + + + dom:dom-broker-osgi-registry + + dom-broker + /modules/module[type='dom-broker-impl'][name='dom-broker'] + + + + + binding:binding-data-broker + + binding-data-broker + + /modules/module[type='binding-data-broker'][name='binding-data-broker'] + + + + + + + + + + + + urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12 + urn:opendaylight:params:xml:ns:yang:controller:threadpool?module=threadpool&revision=2013-04-09 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28 + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/02-clustering.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/02-clustering.xml new file mode 100644 index 0000000000..7853b8681b --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/02-clustering.xml @@ -0,0 +1,27 @@ + + + + + + prefix:remote-zeromq-rpc-server + remoter + 5666 + + prefix:dom-broker-osgi-registry + dom-broker + + + + + + + + + + urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote:rpc?module=odl-sal-dom-rpc-remote-cfg&revision=2013-10-28 + + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/03-toaster-sample.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/03-toaster-sample.xml new file mode 100644 index 0000000000..c481485c92 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/initial/03-toaster-sample.xml @@ -0,0 +1,73 @@ + + + + + + + prefix:toaster-provider-impl + + toaster-provider-impl + + + binding:binding-rpc-registry + binding-rpc-broker + + + + + binding:binding-notification-service + + binding-notification-broker + + + + + + prefix:toaster-consumer-impl + + toaster-consumer-impl + + + binding:binding-rpc-registry + binding-rpc-broker + + + + + binding:binding-notification-service + + binding-notification-broker + + + + + + + toaster:toaster-provider + + toaster-provider + /modules/module[type='toaster-provider-impl'][name='toaster-provider-impl'] + + + + toaster:toaster-consumer + + toaster-consumer + /modules/module[type='toaster-consumer-impl'][name='toaster-consumer-impl'] + + + + + + + + + urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 + urn:opendaylight:params:xml:ns:yang:controller:config:toaster-consumer?module=toaster-consumer&revision=2014-01-31 + urn:opendaylight:params:xml:ns:yang:controller:config:toaster-consumer:impl?module=toaster-consumer-impl&revision=2014-01-31 + urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider?module=toaster-provider&revision=2014-01-31 + urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl?module=toaster-provider-impl&revision=2014-01-31 + + + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/logback.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/logback.xml new file mode 100644 index 0000000000..d1a5dcc416 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/logback.xml @@ -0,0 +1,97 @@ + + + + + %date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n + + + + logs/opendaylight.log + + + logs/opendaylight.%d.log.zip + 1 + + + + 10MB + + + + %date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{35} - %msg%n + + + + logs/audit.log + true + + %date{"yyyy-MM-dd HH:mm:ss.SSS z"} %msg %n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-logging.properties b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-logging.properties new file mode 100644 index 0000000000..3dbd9921b3 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-logging.properties @@ -0,0 +1,42 @@ +############################################################ +# Configuration file for tomcat logging +############################################################ +# Handlers: +# "handlers" specifies a comma separated list of log Handler +# classes. These handlers will be installed during VM startup. +# Note that these classes must be on the system classpath. +# Following line configures a ConsoleHandler and a FileHandler + +handlers= java.util.logging.FileHandler,java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties +# Describes specific configuration info for Handlers +# JUL does not support rolling file handler based on date +# For now we will keep count of files to 5 with rolling size of 10MB +############################################################ + +java.util.logging.FileHandler.pattern = logs/tomcat%g.log +java.util.logging.FileHandler.limit = 104857600 +java.util.logging.FileHandler.count = 5 +java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +java.util.logging.FileHandler.append = true +java.util.logging.FileHandler.level = INFO + +# Limit the message that are printed on the console to SEVERE and above. +java.util.logging.ConsoleHandler.level = WARNING +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + +# SimpleFormatter output format to print one-line log message like this: +# --
:: [] > +# +java.util.logging.SimpleFormatter.format=%1$tF %1$tT %1$tZ [%3$s] %4$s %2$s %5$s%6$s%n + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +# For example, set the com.xyz.foo logger to only log SEVERE +# messages +#org.apache.catalina = SEVERE diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-server.xml b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-server.xml new file mode 100644 index 0000000000..f6f923e0d2 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/configuration/tomcat-server.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/etc/custom.properties b/opendaylight/distribution/opendaylight-karaf/src/main/resources/etc/custom.properties new file mode 100644 index 0000000000..9a86866080 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/etc/custom.properties @@ -0,0 +1,114 @@ +# Extra packages to import from the boot class loader +org.osgi.framework.system.packages.extra=sun.reflect,sun.reflect.misc,sun.misc,sun.nio.ch + +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=325578 +# Extend the framework to avoid the resources to be presented with +# a URL of type bundleresource: but to be presented as file: +osgi.hook.configurators.include=org.eclipse.virgo.kernel.equinox.extensions.hooks.ExtensionsHookConfigurator + +# Embedded Tomcat configuration File +org.eclipse.gemini.web.tomcat.config.path=configuration/tomcat-server.xml +org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true + +# Use Equinox as default OSGi Framework Implementation +karaf.framework=equinox + +# Netconf startup configuration +netconf.tcp.address=127.0.0.1 +netconf.tcp.port=8383 + +netconf.tcp.client.address=127.0.0.1 +netconf.tcp.client.port=8383 + +netconf.ssh.address=0.0.0.0 +netconf.ssh.port=1830 +netconf.ssh.pk.path = ./configuration/RSA.pk + + +netconf.config.persister.active=1,2 +# read startup configuration +netconf.config.persister.1.storageAdapterClass=org.opendaylight.controller.config.persist.storage.directory.xml.XmlDirectoryStorageAdapter +netconf.config.persister.1.properties.directoryStorage=configuration/initial/ + +# include only xml files, files with other extensions will be skipped, multiple extensions are permitted e.g. netconf.config.persister.1.properties.includeExtensions=xml,cfg,config +netconf.config.persister.1.properties.includeExtensions=xml +netconf.config.persister.1.readonly=true + +netconf.config.persister.2.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter +netconf.config.persister.2.properties.fileStorage=configuration/current/controller.currentconfig.xml +netconf.config.persister.2.properties.numberOfBackups=1 + +# logback configuration +logback.configurationFile=configuration/logback.xml + +# Container configuration +container.profile = Container + +# Connection manager configuration +connection.scheme = ANY_CONTROLLER_ONE_MASTER + +# Open Flow related system parameters +# TCP port on which the controller is listening (default 6633) +# of.listenPort=6633 +# IP address of the controller (default: wild card) +# of.address = 127.0.0.1 +# The time (in milliseconds) the controller will wait for a response after sending a Barrier Request or a Statistic Request message (default 2000 msec) +# of.messageResponseTimer=2000 +# The switch liveness timeout value (default 60500 msec) +# of.switchLivenessTimeout=60500 +# The size of the queue holding pending statistics requests (default 64). For large networks of n switches, it is recommended to set the queue size to n +# of.statsQueueSize = 64 +# The flow statistics polling interval in second (default 10 sec) +# of.flowStatsPollInterval=10 +# The port statistics polling interval in second (default 5 sec) +# of.portStatsPollInterval=5 +# The description statistics polling interval in second (default 60 sec) +# of.descStatsPollInterval=60 +# The table statistics polling interval in second (default 10 sec) +# of.tableStatsPollInterval=10 +# The maximum number of asynchronous messages can be sent before sending a Barrier Request (default 100) +# of.barrierMessagePriorCount=100 +# The interval which determines how often the discovery packets should be sent (default 300 sec) +# of.discoveryInterval=300 +# The timeout multiple of discovery interval +# of.discoveryTimeoutMultiple=2 +# For newly added ports, allow one more retry if the elapsed time exceeds this threshold (default 30 sec) +# of.discoveryThreshold=30 +# The maximum number of ports handled in one discovery batch (default 512) +# of.discoveryBatchMaxPorts=512 + +# OVSDB configuration +# ovsdb plugin supports both active and passive connections. It listens on port 6640 by default for Active connections. +ovsdb.listenPort=6640 + +# ovsdb creates Openflow nodes/bridges. This configuration configures the bridge's Openflow version. +# default Openflow version = 1.0, we also support 1.3. +# ovsdb.of.version=1.3 + +# TLS configuration +# To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files. +# The Java KeyStore contains controller's private key and certificate. The Java TrustStore contains the trusted certificate +# entries, including switches' Certification Authority (CA) certificates. For example, +# secureChannelEnabled=true +# controllerKeyStore=./configuration/ctlKeyStore +# controllerKeyStorePassword=xxxxxxxx (this password should match the password used for KeyStore generation and at least 6 characters) +# controllerTrustStore=./configuration/ctlTrustStore +# controllerTrustStorePassword=xxxxxxxx (this password should match the password used for TrustStore generation and at least 6 characters) + +secureChannelEnabled=false +controllerKeyStore= +controllerKeyStorePassword= +controllerTrustStore= +controllerTrustStorePassword= + +# User Manager configurations +enableStrongPasswordCheck = false + +#Jolokia configurations +org.jolokia.listenForHttpService=false + +# Logging configuration for Tomcat-JUL logging +java.util.logging.config.file=configuration/tomcat-logging.properties + +#Hosttracker hostsdb key scheme setting +hosttracker.keyscheme=IP \ No newline at end of file diff --git a/opendaylight/distribution/opendaylight-karaf/src/main/resources/version.properties b/opendaylight/distribution/opendaylight-karaf/src/main/resources/version.properties new file mode 100644 index 0000000000..90af49dfc2 --- /dev/null +++ b/opendaylight/distribution/opendaylight-karaf/src/main/resources/version.properties @@ -0,0 +1,6 @@ +org.opendaylight.controller.version = 0.1 +org.opendaylight.controller.build.scm.version = ${buildNumber} +org.opendaylight.controller.build.user = ${env.USER} +org.opendaylight.controller.build.workspace = ********** +org.opendaylight.controller.build.timestamp = ${timestamp} +org.opendaylight.controller.build.machine = ********** diff --git a/pom.xml b/pom.xml index 792c66dbda..64ed6c7d80 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,11 @@ opendaylight/commons/opendaylight opendaylight/commons/parent opendaylight/commons/logback_settings + + + opendaylight/distribution/opendaylight-karaf scm:git:ssh://git.opendaylight.org:29418/controller.git