Repository: incubator-unomi Updated Branches: refs/heads/master 099abb02b -> b873b35a2
UNOMI-216 Centralize configuration in unomi.properties - In this commit we centralize all configuration in the unomi.properties and custom.system.properties file, and use placeholders that reference environment properties to be able to read values from environment properties if they are setup. Users should not modify these files however, and should create a unomi.custom.properties and a unomi.custom.system.properties files to override the default values or use the new environment variables to modify any settings. - Upgraded to Karaf 4.1.7 because we need a bugfix to be able to use placeholders in the system properties configuration files (this was fixed in Karaf 4.1.6 but we moved to the latest minor update). Signed-off-by: Serge Huber <shu...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b873b35a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b873b35a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b873b35a Branch: refs/heads/master Commit: b873b35a208a53b607d3e0928ec46c975d2024ff Parents: 099abb0 Author: Serge Huber <shu...@apache.org> Authored: Thu Dec 13 18:07:17 2018 +0100 Committer: Serge Huber <shu...@apache.org> Committed: Thu Dec 13 18:07:17 2018 +0100 ---------------------------------------------------------------------- .../resources/org.apache.unomi.geonames.cfg | 6 +- .../main/resources/org.apache.unomi.router.cfg | 30 +- .../main/resources/org.apache.unomi.sfdc.cfg | 24 +- .../org.apache.unomi.mailchimpconnector.cfg | 8 +- .../org.apache.unomi.weatherUpdate.cfg | 6 +- .../java/org/apache/unomi/itests/BaseIT.java | 6 +- .../src/main/resources/etc/custom.properties | 7 +- .../main/resources/etc/custom.system.properties | 34 ++ .../main/resources/etc/org.apache.cxf.osgi.cfg | 2 +- .../resources/etc/org.apache.karaf.jaas.cfg | 63 ++++ .../resources/etc/org.apache.karaf.shell.cfg | 20 +- .../resources/etc/org.ops4j.pax.logging.cfg | 14 +- .../main/resources/etc/org.ops4j.pax.web.cfg | 20 ++ package/src/main/resources/etc/unomi.properties | 309 +++++++++++++++++++ package/src/main/resources/etc/users.properties | 33 ++ ...g.apache.unomi.persistence.elasticsearch.cfg | 30 +- .../resources/org.apache.unomi.plugins.mail.cfg | 10 +- .../org.apache.unomi.plugins.request.cfg | 18 +- pom.xml | 2 +- services/src/main/resources/hazelcast.xml | 9 +- .../main/resources/org.apache.unomi.cluster.cfg | 8 +- .../resources/org.apache.unomi.services.cfg | 22 +- .../resources/org.apache.unomi.thirdparty.cfg | 6 +- wab/src/main/resources/org.apache.unomi.web.cfg | 8 +- 24 files changed, 576 insertions(+), 119 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg ---------------------------------------------------------------------- diff --git a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg b/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg index 625e535..f512d38 100644 --- a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg +++ b/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg @@ -15,8 +15,8 @@ # limitations under the License. # -request.geonamesDatabase.location=${karaf.etc}/allCountries.zip -request.geonamesDatabase.forceImport=false +request.geonamesDatabase.location=${org.apache.unomi.geonames.location:-${karaf.etc}/allCountries.zip} +request.geonamesDatabase.forceImport=${org.apache.unomi.geonames.forceImport:-false} # The interval in milliseconds to use to check if the database is ready to be loaded -service.geonames.refresh.interval=5000 +service.geonames.refresh.interval=${org.apache.unomi.geonames.refresh.interval:-5000} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg ---------------------------------------------------------------------- diff --git a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg b/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg index 6d5f985..7a87050 100644 --- a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg +++ b/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg @@ -16,28 +16,26 @@ # #Configuration Type values {'nobroker', 'kafka'} -router.config.type=nobroker +router.config.type=${org.apache.unomi.router.config.type:-nobroker} -#Uncomment and update Kafka settings to use Kafka as a broker - -#Kafka -#kafka.host=localhost -#kafka.port=9092 -#kafka.import.topic=import-deposit -#kafka.export.topic=export-deposit -#kafka.import.groupId=unomi-import-group -#kafka.export.groupId=unomi-import-group -#kafka.consumerCount=10 -#kafka.autoCommit=true +#Kafka (only used if configuration type is set to kafka +kafka.host=${org.apache.unomi.router.kafka.host:-localhost} +kafka.port=${org.apache.unomi.router.kafka.port:-9092} +kafka.import.topic=${org.apache.unomi.router.kafka.import.topic:-import-deposit} +kafka.export.topic=${org.apache.unomi.router.kafka.export.topic:-export-deposit} +kafka.import.groupId=${org.apache.unomi.router.kafka.import.groupId:-unomi-import-group} +kafka.export.groupId=${org.apache.unomi.router.kafka.export.groupId:-unomi-import-group} +kafka.consumerCount=${org.apache.unomi.router.kafka.consumerCount:-10} +kafka.autoCommit=${org.apache.unomi.router.kafka.autoCommit:-true} #Import One Shot upload directory -import.oneshot.uploadDir=${karaf.data}/tmp/unomi_oneshot_import_configs/ +import.oneshot.uploadDir=${org.apache.unomi.router.import.oneshot.uploadDir:-${karaf.data}/tmp/unomi_oneshot_import_configs/} #Import/Export executions history size -executionsHistory.size=5 +executionsHistory.size=${org.apache.unomi.router.executionsHistory.size:-5} #errors report size -executions.error.report.size=200 +executions.error.report.size=${org.apache.unomi.router.executions.error.report.size:-200} #Allowed source endpoints -config.allowedEndpoints=file,ftp,sftp,ftps \ No newline at end of file +config.allowedEndpoints=${org.apache.unomi.router.config.allowedEndpoints:-file,ftp,sftp,ftps} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg ---------------------------------------------------------------------- diff --git a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg b/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg index 59ed0d9..c4d6aaa 100644 --- a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg +++ b/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg @@ -14,17 +14,17 @@ # See the License for the specific language governing permissions and # limitations under the License. # -sfdc.login.endpoint=https://login.salesforce.com -sfdc.user.username= -sfdc.user.password= -sfdc.user.securityToken= -sfdc.consumer.key= -sfdc.consumer.secret= -sfdc.channel=/topic/LeadUpdates +sfdc.login.endpoint=${org.apache.unomi.sfdc.login.endpoint:-https://login.salesforce.com} +sfdc.user.username=${org.apache.unomi.sfdc.user.username:-} +sfdc.user.password=${org.apache.unomi.sfdc.user.password:-} +sfdc.user.securityToken=${org.apache.unomi.sfdc.user.securityToken:-} +sfdc.consumer.key=${org.apache.unomi.sfdc.consumer.key:-} +sfdc.consumer.secret=${org.apache.unomi.sfdc.consumer.secret:-} +sfdc.channel=${org.apache.unomi.sfdc.channel:-/topic/LeadUpdates} # Property Mapping Example: unomiPropertyId<=>SFDCPropertyId -sfdc.fields.mappings=email<=>Email,firstName<=>FirstName,lastName<=>LastName,company<=>Company,phoneNumber<=>Phone,jobTitle<=>Title,city<=>City,zipCode<=>PostalCode,address<=>Street,sfdcStatus<=>Status,sfdcRating<=>Rating -sfdc.fields.mappings.identifier=email<=>Email -sfdc.checkIfContactExistBeforeLeadCreation=false -sfdc.session.timeout=900000 +sfdc.fields.mappings=${org.apache.unomi.sfdc.fields.mappings:-email<=>Email,firstName<=>FirstName,lastName<=>LastName,company<=>Company,phoneNumber<=>Phone,jobTitle<=>Title,city<=>City,zipCode<=>PostalCode,address<=>Street,sfdcStatus<=>Status,sfdcRating<=>Rating} +sfdc.fields.mappings.identifier=${org.apache.unomi.sfdc.fields.mappings.identifier:-email<=>Email} +sfdc.checkIfContactExistBeforeLeadCreation=${org.apache.unomi.sfdc.checkIfContactExistBeforeLeadCreation:-false} +sfdc.session.timeout=${org.apache.unomi.sfdc.session.timeout:-900000} # Consent Mapping Example: unomiConsentId<=>SFDCPropertyId -sfdc.fields.consents= +sfdc.fields.consents=${org.apache.unomi.sfdc.fields.consents:-} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg ---------------------------------------------------------------------- diff --git a/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg b/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg index d0c2c0c..ce82526 100644 --- a/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg +++ b/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg @@ -14,13 +14,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -mailChimpConnector.apiKey=yourApiKey -mailChimpConnector.url.subDomain=us16 +mailChimpConnector.apiKey=${org.apache.unomi.mailchimp.apiKey:-yourApiKey} +mailChimpConnector.url.subDomain=${org.apache.unomi.mailchimp.url.subDomain:-us16} # MC address type mapping format # unomiId<=>mcTagName<=>mcSubTagName # MC other type mapping format # unomiId<=>mcTagName # The following is a complete example of mapping if you wish to use it please make sure to create/replace MailChimp tag name -mailChimpConnector.list.merge-fields.mapping=firstName<=>FNAME,lastName<=>LNAME,company<=>COMPANY,phoneNumber<=>PHONE,jobTitle<=>JOBTITLE,address<=>ADDRESS<=>addr1,city<=>ADDRESS<=>city,zipCode<=>ADDRESS<=>zip,countryName<=>ADDRESS<=>country,birthDate<=>BIRTHDATE,income<=>NUMBER +mailChimpConnector.list.merge-fields.mapping=${org.apache.unomi.mailchimp.list.merge-fields.mapping:-firstName<=>FNAME,lastName<=>LNAME,company<=>COMPANY,phoneNumber<=>PHONE,jobTitle<=>JOBTITLE,address<=>ADDRESS<=>addr1,city<=>ADDRESS<=>city,zipCode<=>ADDRESS<=>zip,countryName<=>ADDRESS<=>country,birthDate<=>BIRTHDATE,income<=>NUMBER} # If you wish you can stop the mapping by setting the following property to false -mailChimpConnector.list.merge-fields.activate=true +mailChimpConnector.list.merge-fields.activate=${org.apache.unomi.mailchimp.list.merge-fields.activate:-true} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/weather-update/core/src/main/resources/org.apache.unomi.weatherUpdate.cfg ---------------------------------------------------------------------- diff --git a/extensions/weather-update/core/src/main/resources/org.apache.unomi.weatherUpdate.cfg b/extensions/weather-update/core/src/main/resources/org.apache.unomi.weatherUpdate.cfg index aa85dc0..a8dd9ff 100644 --- a/extensions/weather-update/core/src/main/resources/org.apache.unomi.weatherUpdate.cfg +++ b/extensions/weather-update/core/src/main/resources/org.apache.unomi.weatherUpdate.cfg @@ -14,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -weatherUpdate.apiKey=YOUR_WEATHER_APIKEY -weatherUpdate.url.base=http://api.openweathermap.org -weatherUpdate.url.attributes=data/2.5/weather +weatherUpdate.apiKey=${org.apache.unomi.weatherUpdate.apiKey:-YOUR_WEATHER_APIKEY} +weatherUpdate.url.base=${org.apache.unomi.weatherUpdate.url.base:-http://api.openweathermap.org} +weatherUpdate.url.attributes=${org.apache.unomi.weatherUpdate.url.attributes:-data/2.5/weather} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java ---------------------------------------------------------------------- diff --git a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java index 82e1c57..eede503 100644 --- a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java @@ -26,7 +26,6 @@ import org.ops4j.pax.exam.options.MavenArtifactUrlReference; import org.ops4j.pax.exam.options.MavenUrlReference; import java.io.File; -import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; @@ -127,6 +126,11 @@ public abstract class BaseIT { systemProperty("org.apache.unomi.itests.elasticsearch.cluster.name").value("contextElasticSearchITests"), systemProperty("org.apache.unomi.itests.elasticsearch.http.port").value("9400"), systemProperty("org.apache.unomi.itests.elasticsearch.bootstrap.seccomp").value("false"), + systemProperty("org.apache.unomi.hazelcast.group.name").value("cellar"), + systemProperty("org.apache.unomi.hazelcast.group.password").value("pass"), + systemProperty("org.apache.unomi.hazelcast.network.port").value("5701"), + systemProperty("org.apache.unomi.hazelcast.tcp-ip.members").value("127.0.0.1"), + systemProperty("org.apache.unomi.hazelcast.tcp-ip.interface").value("127.0.0.1"), systemProperty("unomi.autoStart").value("true"), features(karafCxfRepo, "cxf"), features(karafCellarRepo, "cellar"), http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/custom.properties ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/custom.properties b/package/src/main/resources/etc/custom.properties index 06e70ff..7db6f03 100644 --- a/package/src/main/resources/etc/custom.properties +++ b/package/src/main/resources/etc/custom.properties @@ -21,6 +21,7 @@ # All the values specified here will override the default values given # in config.properties. # +${includes}=unomi.properties karaf.systemBundlesStartLevel=50 @@ -28,10 +29,4 @@ karaf.systemBundlesStartLevel=50 # You can place any customized configuration here. # -org.osgi.service.http.secure.enabled = true -org.ops4j.pax.web.ssl.keystore=${karaf.etc}/keystore -org.ops4j.pax.web.ssl.password=changeme -org.ops4j.pax.web.ssl.keypassword=changeme -org.osgi.service.http.port.secure=9443 - org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,org.apache.karaf.jaas.boot.principal,sun.*,com.sun.*,javax.transaction,javax.transaction.*,javax.xml.crypto,javax.xml.crypto.*,org.apache.xerces.jaxp.datatype,org.apache.xerces.stax,org.apache.xerces.parsers,org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,org.apache.xerces.dom,javax.management.remote.rmi,com.yourkit.* http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/custom.system.properties ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/custom.system.properties b/package/src/main/resources/etc/custom.system.properties new file mode 100644 index 0000000..98f5da4 --- /dev/null +++ b/package/src/main/resources/etc/custom.system.properties @@ -0,0 +1,34 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# This following file is used to customize system properties for the Apache Unomi application running in Apache Karaf. +${optionals}=unomi.custom.system.properties +####################################################################################################################### +## Hazelcast clustering settings ## +####################################################################################################################### +org.apache.unomi.hazelcast.group.name=${env:UNOMI_HAZELCAST_GROUP_NAME:-cellar} +org.apache.unomi.hazelcast.group.password=${env:UNOMI_HAZELCAST_GROUP_PASSWORD:-pass} +# This list can be comma separated and use ranges such as 192.168.1.0-7,192.168.1.21 +org.apache.unomi.hazelcast.tcp-ip.members=${env:UNOMI_HAZELCAST_TCPIP_MEMBERS:-127.0.0.1} +org.apache.unomi.hazelcast.tcp-ip.interface=${env:UNOMI_HAZELCAST_TCPIP_INTERFACE:-127.0.0.1} +org.apache.unomi.hazelcast.network.port=${env:UNOMI_HAZELCAST_NETWORK_PORT:-5701} + +####################################################################################################################### +## Security settings ## +####################################################################################################################### +org.apache.unomi.security.root.password=${env:UNOMI_ROOT_PASSWORD:-karaf} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/org.apache.cxf.osgi.cfg ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/org.apache.cxf.osgi.cfg b/package/src/main/resources/etc/org.apache.cxf.osgi.cfg index 9254c95..5cf8e8f 100644 --- a/package/src/main/resources/etc/org.apache.cxf.osgi.cfg +++ b/package/src/main/resources/etc/org.apache.cxf.osgi.cfg @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.cxf.servlet.context=/cxs \ No newline at end of file +org.apache.cxf.servlet.context=${org.apache.unomi.admin.servlet.context:-/cxs} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/org.apache.karaf.jaas.cfg ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/org.apache.karaf.jaas.cfg b/package/src/main/resources/etc/org.apache.karaf.jaas.cfg new file mode 100644 index 0000000..11bba6a --- /dev/null +++ b/package/src/main/resources/etc/org.apache.karaf.jaas.cfg @@ -0,0 +1,63 @@ + +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +# +# Boolean enabling / disabling encrypted passwords +# +encryption.enabled = ${org.apache.unomi.security.encryption.enabled:-false} + +# +# Encryption Service name +# the default one is 'basic' +# a more powerful one named 'jasypt' is available +# when installing the encryption feature +# +encryption.name = ${org.apache.unomi.security.encryption.name:-} + +# +# Encryption prefix +# +encryption.prefix = {CRYPT} + +# +# Encryption suffix +# +encryption.suffix = {CRYPT} + +# +# Set the encryption algorithm to use in Karaf JAAS login module +# Supported encryption algorithms follow: +# MD2 +# MD5 +# SHA-1 +# SHA-256 +# SHA-384 +# SHA-512 +# +encryption.algorithm = ${org.apache.unomi.security.encryption.algorithm:-SHA-512} + +# +# Encoding of the encrypted password. +# Can be: +# hexadecimal +# base64 +# +encryption.encoding = ${org.apache.unomi.security.encryption.encoding:-hexadecimal} + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/org.apache.karaf.shell.cfg ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/org.apache.karaf.shell.cfg b/package/src/main/resources/etc/org.apache.karaf.shell.cfg index 5630c9a..0211155 100644 --- a/package/src/main/resources/etc/org.apache.karaf.shell.cfg +++ b/package/src/main/resources/etc/org.apache.karaf.shell.cfg @@ -25,41 +25,41 @@ # # Via sshPort and sshHost you define the address you can login into Karaf. # -sshPort = 8102 -sshHost = 0.0.0.0 +sshPort = ${org.apache.unomi.shell.sshPort:-8102} +sshHost = ${org.apache.unomi.shell.sshHost:-0.0.0.0} # # The sshIdleTimeout defines the inactivity timeout to logout the SSH session. # The sshIdleTimeout is in milliseconds, and the default is set to 30 minutes. # -sshIdleTimeout = 1800000 +sshIdleTimeout = ${org.apache.unomi.shell.sshIdleTimeOut:-1800000} # # sshRealm defines which JAAS domain to use for password authentication. # -sshRealm = karaf +sshRealm = ${org.apache.unomi.shell.sshRealm:-karaf} # # Defines if the SFTP system is enabled or not in the SSH server # -sftpEnabled=true +sftpEnabled=${org.apache.unomi.shell.sftpEnabled:-true} # # The location of the hostKey file defines where the private/public key of the server # is located. If no file is at the defined location it will be ignored. # -hostKey = ${karaf.etc}/host.key +hostKey = ${org.apache.unomi.shell.hostKey:-${karaf.etc}/host.key} # # The format used for hostKey. # Possible values are simple (Karaf internal), or PEM (OpenSSH format) # -hostKeyFormat = simple +hostKeyFormat = ${org.apache.unomi.shell.hostKeyFormat:-simple} # # shRole defines the role required to access the console through ssh # -sshRole = ssh +sshRole = ${org.apache.unomi.shell.sshRole:-ssh} # # Self defined key size in 1024, 2048, 3072, or 4096 @@ -85,7 +85,7 @@ sshRole = ssh # # Specify an additional welcome banner to be displayed when a user logs into the server. # -# welcomeBanner = +welcomeBanner = ${org.apache.unomi.shell.welcomeBanner:-} # # Defines the completion mode on the Karaf shell console. The possible values are: @@ -98,6 +98,7 @@ sshRole = ssh # This property define the default value when you use the Karaf shell console. # You can change the completion mode directly in the shell console, using shell:completion command. # +completionMode = ${org.apache.unomi.shell.completionMode:-GLOBAL} # # Override allowed SSH cipher algorithms. @@ -123,5 +124,4 @@ sshRole = ssh # # moduli-url = external moduli-url users wanna use -completionMode = GLOBAL http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/org.ops4j.pax.logging.cfg ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/org.ops4j.pax.logging.cfg b/package/src/main/resources/etc/org.ops4j.pax.logging.cfg index 543c181..cdd0165 100644 --- a/package/src/main/resources/etc/org.ops4j.pax.logging.cfg +++ b/package/src/main/resources/etc/org.ops4j.pax.logging.cfg @@ -21,7 +21,7 @@ log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n # Root logger -log4j2.rootLogger.level = INFO +log4j2.rootLogger.level = ${org.apache.unomi.logs.root.level:-INFO} # uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library #log4j2.rootLogger.type = asyncRoot #log4j2.rootLogger.includeLocation = false @@ -35,7 +35,7 @@ log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.conso # SSHD logger log4j2.logger.sshd.name = org.apache.sshd -log4j2.logger.sshd.level = INFO +log4j2.logger.sshd.level = ${org.apache.unomi.logs.sshd.level:-INFO} # Spifly logger log4j2.logger.spifly.name = org.apache.aries.spifly @@ -58,8 +58,8 @@ log4j2.appender.console.layout.pattern = ${log4j2.pattern} # Rolling file appender log4j2.appender.rolling.type = RollingRandomAccessFile log4j2.appender.rolling.name = RollingFile -log4j2.appender.rolling.fileName = ${karaf.data}/log/karaf.log -log4j2.appender.rolling.filePattern = ${karaf.data}/log/karaf.log.%i +log4j2.appender.rolling.fileName = ${org.apache.unomi.logs.fileName:-${karaf.data}/log/karaf.log} +log4j2.appender.rolling.filePattern = ${org.apache.unomi.logs.filePattern:-${karaf.data}/log/karaf.log.%i} # uncomment to not force a disk flush #log4j2.appender.rolling.immediateFlush = false log4j2.appender.rolling.append = true @@ -72,8 +72,8 @@ log4j2.appender.rolling.policies.size.size = 16MB # Audit file appender log4j2.appender.audit.type = RollingRandomAccessFile log4j2.appender.audit.name = AuditRollingFile -log4j2.appender.audit.fileName = ${karaf.data}/security/audit.log -log4j2.appender.audit.filePattern = ${karaf.data}/security/audit.log.%i +log4j2.appender.audit.fileName = ${org.apache.unomi.logs.audit.fileName:-${karaf.data}/security/audit.log} +log4j2.appender.audit.filePattern = ${org.apache.unomi.logs.audit.filePattern:-${karaf.data}/security/audit.log.%i} log4j2.appender.audit.append = true log4j2.appender.audit.layout.type = PatternLayout log4j2.appender.audit.layout.pattern = ${log4j2.pattern} @@ -95,4 +95,4 @@ log4j2.appender.osgi.filter = * #log4j2.logger.maven.level = TRACE log4j2.logger.cxfInterceptor.name = org.apache.cxf.interceptor -log4j2.logger.cxfInterceptor.level = WARN +log4j2.logger.cxfInterceptor.level = ${org.apache.unomi.logs.cxf.level:-WARN} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/org.ops4j.pax.web.cfg ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/org.ops4j.pax.web.cfg b/package/src/main/resources/etc/org.ops4j.pax.web.cfg new file mode 100644 index 0000000..3b4a6ee --- /dev/null +++ b/package/src/main/resources/etc/org.ops4j.pax.web.cfg @@ -0,0 +1,20 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# org.osgi.service.http.port=8181 +javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp +org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/unomi.properties ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/unomi.properties b/package/src/main/resources/etc/unomi.properties new file mode 100644 index 0000000..466bc5f --- /dev/null +++ b/package/src/main/resources/etc/unomi.properties @@ -0,0 +1,309 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# The following file is used to customize system properties for the Apache Unomi application running in Apache Karaf. +${optionals}=unomi.custom.properties + +####################################################################################################################### +## HTTP Settings ## +####################################################################################################################### +org.ops4j.pax.web.ssl.keystore=${env:UNOMI_SSL_KEYSTORE:-${karaf.etc}/keystore} +org.ops4j.pax.web.ssl.password=${env:UNOMI_SSL_PASSWORD:-changeme} +org.ops4j.pax.web.ssl.keypassword=${env:UNOMI_SSL_KEYPASSWORD:-changeme} + +org.osgi.service.http.secure.enabled = true +org.osgi.service.http.port=${env:UNOMI_HTTP_PORT:-8181} +org.osgi.service.http.port.secure=${env:UNOMI_SECURE_HTTP_PORT:-9443} +org.apache.unomi.admin.servlet.context=${env:UNOMI_ADMIN_CONTEXT:-/cxs} + +####################################################################################################################### +## Cluster Settings ## +####################################################################################################################### +org.apache.unomi.cluster.group=${env:UNOMI_CLUSTER_GROUP:-default} +# To simplify testing we set the public address to use HTTP, but for production environments it is highly recommended +# to switch to using HTTPS with a proper SSL certificate installed. +org.apache.unomi.cluster.public.address=${env:UNOMI_CLUSTER_PUBLIC_ADDRESS:-http://localhost:8181} +org.apache.unomi.cluster.internal.address=${env:UNOMI_CLUSTER_INTERNAL_ADDRESS:-https://localhost:9443} +# The nodeStatisticsUpdateFrequency controls the frequency of the update of system statistics such as CPU load, +# system load average and uptime. This value is set in milliseconds and is set to 10 seconds by default. Each node +# will retrieve the local values and broadcast them through a cluster event to all the other nodes to update +# the global cluster statistics. +org.apache.unomi.cluster.nodeStatisticsUpdateFrequency=${env:UNOMI_CLUSTER_NODESTATISTICS_UPDATEFREQUENCY:-10000} + +####################################################################################################################### +## ElasticSearch settings ## +####################################################################################################################### +org.apache.unomi.elasticsearch.cluster.name=${env:UNOMI_ELASTICSEARCH_CLUSTERNAME:-contextElasticSearch} +# The elasticSearchAddresses may be a comma seperated list of host names and ports such as +# hostA:9300,hostB:9300 +# Note: the port number must be repeated for each host. +org.apache.unomi.elasticsearch.addresses=${env:UNOMI_ELASTICSEARCH_ADDRESSES:-localhost:9300} +org.apache.unomi.elasticsearch.index.name=${env:UNOMI_ELASTICSEARCH_INDEXNAME:-context} +org.apache.unomi.elasticsearch.monthlyIndex.nbShards=${env:UNOMI_ELASTICSEARCH_MONTHLYINDEX_SHARDS:-5} +org.apache.unomi.elasticsearch.monthlyIndex.nbReplicas=${env:UNOMI_ELASTICSEARCH_MONTHLYINDEX_REPLICAS:-0} +org.apache.unomi.elasticsearch.defaultIndex.nbShards=${env:UNOMI_ELASTICSEARCH_DEFAULTINDEX_SHARDS:-5} +org.apache.unomi.elasticsearch.defaultIndex.nbReplicas=${env:UNOMI_ELASTICSEARCH_DEFAULTINDEX_REPLICAS:-0} +org.apache.unomi.elasticsearch.defaultQueryLimit=${env:UNOMI_ELASTICSEARCH_DEFAULTQUERYLIMIT:-10} +org.apache.unomi.elasticsearch.aggregateQueryBucketSize=${env:UNOMI_ELASTICSEARCH_AGGREGATEBUCKETSIZE:-5000} +org.apache.unomi.elasticsearch.maximumIdsQueryCount=${env:UNOMI_ELASTICSEARCH_MAXIMUMIDSQUERYCOUNT:-5000} +# The following settings control the behavior of the BulkProcessor API. You can find more information about these +# settings and their behavior here : https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.4/java-docs-bulk-processor.html +# The values used here are the default values of the API +org.apache.unomi.elasticsearch.bulkProcessor.concurrentRequests=${env:UNOMI_ELASTICSEARCH_BULK_CONCURRENTREQUESTS:-1} +org.apache.unomi.elasticsearch.bulkProcessor.bulkActions=${env:UNOMI_ELASTICSEARCH_BULK_ACTIONS:-1000} +org.apache.unomi.elasticsearch.bulkProcessor.bulkSize=${env:UNOMI_ELASTICSEARCH_BULK_SIZE:-5MB} +org.apache.unomi.elasticsearch.bulkProcessor.flushInterval=${env:UNOMI_ELASTICSEARCH_BULK_FLUSHINTERVAL:-5s} +org.apache.unomi.elasticsearch.bulkProcessor.backoffPolicy=${env:UNOMI_ELASTICSEARCH_BULK_BACKOFFPOLICY:-exponential} + +####################################################################################################################### +## Service settings ## +####################################################################################################################### + +# Purge job interval (in days) +org.apache.unomi.profile.purge.interval=${env:UNOMI_PROFILE_PURGE_INTERVAL:-1} +# Purge profiles that have been inactive for a specific number of days +org.apache.unomi.profile.purge.inactiveTime=${env:UNOMI_PROFILE_PURGE_INACTIVETIME:-180} +# Purge profiles that have been created for a specific number of days +org.apache.unomi.profile.purge.existTime=${env:UNOMI_PROFILE_PURGE_EXISTTIME:--1} +# Purge all sessions/events that have been created for a specific number of months +org.apache.unomi.event.purge.existTime=${env:UNOMI_EVENT_PURGE_EXISTTIME:-12} +# When performing segment updates, this controls the size of the scrolling query size used to iterate over all the +# profiles that need updating +org.apache.unomi.segment.update.batchSize=${env:UNOMI_SEGMENT_UPDATE_BATCHSIZE:-1000} +# The interval in milliseconds to use to reload the definitions (condition types and action types) +org.apache.unomi.definitions.refresh.interval=${env:UNOMI_DEFINITIONS_REFRESH_INTERVAL:-10000} +# The interval in milliseconds to use to reload the property types +org.apache.unomi.properties.refresh.interval=${env:UNOMI_PROPERTIES_REFRESH_INTERVAL:-10000} +# The interval in milliseconds to use to reload the segments and scoring plans +org.apache.unomi.segment.refresh.interval=${env:UNOMI_SEGMENT_REFRESH_INTERVAL:-1000} +# The interval in days to use to recalculate segments/scoring plans on profile +org.apache.unomi.segment.recalculate.period=${env:UNOMI_SEGMENT_RECALCULATE_PERIOD:-1} +# The interval in milliseconds to use to reload the rules +org.apache.unomi.rules.refresh.interval=${env:UNOMI_RULES_REFRESH_INTERVAL:-1000} +# The interval in milliseconds to use to reload the rules statistics +org.apache.unomi.rules.statistics.refresh.interval=${env:UNOMI_RULES_STATISTICS_REFRESH_INTERVAL:-10000} + +####################################################################################################################### +## Third Party server settings ## +####################################################################################################################### +# Define secured events and the thirdparty servers which are allowed to send +# them. + +# Example : provider1 is allowed to send login and download events from +# localhost , with key provided in X-Unomi-Peer +# +org.apache.unomi.thirdparty.provider1.key=${env:UNOMI_THIRDPARTY_PROVIDER1_KEY:-670c26d1cc413346c3b2fd9ce65dab41} +org.apache.unomi.thirdparty.provider1.ipAddresses=${env:UNOMI_THIRDPARTY_PROVIDER1_IPADDRESSES:-127.0.0.1,::1} +org.apache.unomi.thirdparty.provider1.allowedEvents=${env:UNOMI_THIRDPARTY_PROVIDER1_ALLOWEDEVENTS:-login,updateProperties} + +####################################################################################################################### +## Profile cookie & download settings ## +####################################################################################################################### +# Configure here the domain to use the for cookies setup by the Apache Unomi context servlet +# by default the current request will be used to set the domain. +org.apache.unomi.profile.cookie.domain=${env:UNOMI_PROFILE_COOKIE_DOMAIN:-} +# This setting controls the name of the cookie use to track profiles using Apache Unomi +org.apache.unomi.profile.cookie.name=${env:UNOMI_PROFILE_COOKIE_NAME:-context-profile-id} +# This setting controls the maximum age of the profile cookie. By default it is set to a year. +org.apache.unomi.profile.cookie.maxAgeInSeconds=${env:UNOMI_PROFILE_COOKIE_MAXAGEINSECONDS:-31536000} +#Allowed profile download formats, actually only csv (horizontal and vertical), json, text and yaml are allowed. +org.apache.unomi.profile.download.formats=${env:UNOMI_PROFILE_DOWNLOAD_FORMATS:-csv,yaml,json,text} + +####################################################################################################################### +## SSH Server settings ## +####################################################################################################################### +# These properties are used to configure Karaf's ssh shell. +# +# Via sshPort and sshHost you define the address you can login into Karaf. +# +org.apache.unomi.shell.sshPort=${env:UNOMI_SHELL_SSHPORT:-8102} +org.apache.unomi.shell.sshHost=${env:UNOMI_SHELL_SSHHOST:-0.0.0.0} +# +# The sshIdleTimeout defines the inactivity timeout to logout the SSH session. +# The sshIdleTimeout is in milliseconds, and the default is set to 30 minutes. +# +org.apache.unomi.shell.sshIdleTimeOut=${env:UNOMI_SHELL_SSHIDLETIMEOUT:-1800000} +# +# The location of the hostKey file defines where the private/public key of the server +# is located. If no file is at the defined location it will be ignored. +# +org.apache.unomi.shell.hostKey=${env:UNOMI_SHELL_HOSTKEY:-${karaf.etc}/host.key} +# +# The format used for hostKey. +#�Possible values are simple (Karaf internal), or PEM (OpenSSH format) +# +org.apache.unomi.shell.hostKeyFormat=${env:UNOMI_SHELL_HOSTKEYFORMAT:-simple} + +# +# shRole defines the role required to access the console through ssh +# +org.apache.unomi.shell.sshRole=${env:UNOMI_SHELL_SSHROLE:-ssh} +# +# Specify an additional welcome banner to be displayed when a user logs into the server. +# +org.apache.unomi.shell.welcomeBanner=${env:UNOMI_SHELL_WELCOMEBANNER:-} +# +# Defines the completion mode on the Karaf shell console. The possible values are: +# - GLOBAL: it's the same behavior as in previous Karaf releases. The completion displays all commands and all aliases +# ignoring if you are in a subshell or not. +# - FIRST: the completion displays all commands and all aliases only when you are not in a subshell. When you are +# in a subshell, the completion displays only the commands local to the subshell. +# - SUBSHELL: the completion displays only the subshells on the root level. When you are in a subshell, the completion +# displays only the commands local to the subshell. +# This property define the default value when you use the Karaf shell console. +# You can change the completion mode directly in the shell console, using shell:completion command. +# +org.apache.unomi.shell.completionMode=${env:UNOMI_SHELL_COMPLETIONMODE:-GLOBAL} + +####################################################################################################################### +## Log settings ## +####################################################################################################################### +org.apache.unomi.logs.root.level=${env:UNOMI_LOGS_ROOT_LEVEL:-INFO} +org.apache.unomi.logs.sshd.level=${env:UNOMI_LOGS_SSHD_LEVEL:-INFO} +org.apache.unomi.logs.cxf.level=${env:UNOMI_LOGS_CXF_LEVEL:-WARN} +org.apache.unomi.logs.fileName=${env:UNOMI_LOGS_FILENAME:-${karaf.data}/log/karaf.log} +org.apache.unomi.logs.filePattern=${env:UNOMI_LOGS_FILEPATTERN:-${karaf.data}/log/karaf.log.%i} +org.apache.unomi.logs.audit.fileName=${env:UNOMI_LOGS_AUDIT_FILENAME:-${karaf.data}/security/audit.log} +org.apache.unomi.logs.audit.filePattern=${env:UNOMI_LOGS_AUDIT_FILEPATTERN:-${karaf.data}/security/audit.log.%i} + +####################################################################################################################### +## GeoNames Database settings ## +####################################################################################################################### +org.apache.unomi.geonames.location=${env:UNOMI_GEONAMES_DB:-${karaf.etc}/allCountries.zip} +org.apache.unomi.geonames.forceImport=${env:UNOMI_GEONAMES_FORCEIMPORT:-false} +# The interval in milliseconds to use to check if the database is ready to be loaded +org.apache.unomi.geonames.refresh.interval=${env:UNOMI_GEONAMES_REFRESH_INTERVAL:-5000} + +####################################################################################################################### +## MaxMind IP Database settings ## +####################################################################################################################### +org.apache.unomi.ip.database.location=${env:UNOMI_IP_DB:-${karaf.etc}/GeoLite2-City.mmdb} +org.apache.unomi.ip.default.countryCode=${env:UNOMI_IP_DEFAULT_COUNTRYCODE:-CH} +org.apache.unomi.ip.default.countryName=${env:UNOMI_IP_DEFAULT_COUNTRYNAME:-Switzerland} +org.apache.unomi.ip.default.city=${env:UNOMI_IP_DEFAULT_CITY:-Geneva} +org.apache.unomi.ip.default.subdiv1=${env:UNOMI_IP_DEFAULT_SUBDIV1:-2660645} +org.apache.unomi.ip.default.subdiv2=${env:UNOMI_IP_DEFAULT_SUBDIV2:-6458783} +org.apache.unomi.ip.default.isp=${env:UNOMI_IP_DEFAULT_ISP:-Cablecom} +org.apache.unomi.ip.default.latitude=${env:UNOMI_IP_DEFAULT_LATITUDE:-46.1884341} +org.apache.unomi.ip.default.longitude=${env:UNOMI_IP_DEFAULT_LONGITUDE:-6.1282508} + +####################################################################################################################### +## Mail sending settings ## +####################################################################################################################### +org.apache.unomi.mail.server.hostname=${env:UNOMI_MAIL_HOSTNAME:-smtp.gmail.com} +org.apache.unomi.mail.server.port=${env:UNOMI_MAIL_PORT:-465} +org.apache.unomi.mail.server.username=${env:UNOMI_MAIL_USERNAME:-} +org.apache.unomi.mail.server.password=${env:UNOMI_MAIL_PASSWORD:-} +org.apache.unomi.mail.server.sslOnConnect=${env:UNOMI_MAIL_SSLONCONNECT:-true} + +####################################################################################################################### +## Security settings ## +####################################################################################################################### +org.apache.unomi.security.encryption.enabled=${env:UNOMI_ENCRYPTION_ENABLED:-false} +# +# Encryption Service name +# the default one is 'basic' +# a more powerful one named 'jasypt' is available +# when installing the encryption feature +# +org.apache.unomi.security.encryption.name=${env:UNOMI_ENCRYPTION_NAME:-} +# +# Set the encryption algorithm to use in Karaf JAAS login module +# Supported encryption algorithms follow: +# MD2 +# MD5 +# SHA-1 +# SHA-256 +# SHA-384 +# SHA-512 +# +org.apache.unomi.security.encryption.algorithm=${env:UNOMI_ENCRYPTION_ALGORITHM:-SHA-512} +# +# Encoding of the encrypted password. +# Can be: +# hexadecimal +# base64 +# +org.apache.unomi.security.encryption.encoding=${env:UNOMI_ENCRYPTION_ENCODING:-hexadecimal} + +####################################################################################################################### +## Profile import/export router settings ## +####################################################################################################################### +#Configuration Type values {'nobroker', 'kafka'} +org.apache.unomi.router.config.type=${env:UNOMI_ROUTER_CONFIG_TYPE:-nobroker} + +#Kafka (only used if configuration type is set to kafka +org.apache.unomi.router.kafka.host=${env:UNOMI_ROUTER_KAFKA_HOST:-localhost} +org.apache.unomi.router.kafka.port${env:UNOMI_ROUTER_KAFKA_PORT:-9092} +org.apache.unomi.router.kafka.import.topic=${env:UNOMI_ROUTER_KAFKA_IMPORT_TOPIC:-import-deposit} +org.apache.unomi.router.kafka.export.topic=${env:UNOMI_ROUTER_KAFKA_EXPORT_TOPIC:-export-deposit} +org.apache.unomi.router.kafka.import.groupId=${env:UNOMI_ROUTER_KAFKA_IMPORT_GROUPID:-unomi-import-group} +org.apache.unomi.router.kafka.export.groupId=${env:UNOMI_ROUTER_KAFKA_EXPORT_GROUPID:-unomi-import-group} +org.apache.unomi.router.kafka.consumerCount=${env:UNOMI_ROUTER_KAFKA_CONSUMERCOUNT:-10} +org.apache.unomi.router.kafka.autoCommit=${env:UNOMI_ROUTER_KAFKA_AUTOCOMMIT:-true} + +#Import One Shot upload directory +org.apache.unomi.router.import.oneshot.uploadDir=${env:UNOMI_ROUTER_IMPORT_ONESHOT_UPLOADDIR:-${karaf.data}/tmp/unomi_oneshot_import_configs/} + +#Import/Export executions history size +org.apache.unomi.router.executionsHistory.size=${env:UNOMI_ROUTER_EXECUTIONSHISTORY_SIZE:-5} + +#errors report size +org.apache.unomi.router.executions.error.report.size=${env:UNOMI_ROUTER_EXECUTIONS_ERROR_REPORT_SIZE:-200} + +#Allowed source endpoints +org.apache.unomi.router.config.allowedEndpoints=${env:UNOMI_ROUTER_CONFIG_ALLOWEDENDPOINTS:-file,ftp,sftp,ftps} + +####################################################################################################################### +## Salesforce connector settings ## +####################################################################################################################### +org.apache.unomi.sfdc.login.endpoint=${env:UNOMI_SFDC_LOGIN_ENDPOINT:-https://login.salesforce.com} +org.apache.unomi.sfdc.user.username=${env:UNOMI_SFDC_USER_USERNAME:-} +org.apache.unomi.sfdc.user.password=${env:UNOMI_SFDC_USER_PASSWORD:-} +org.apache.unomi.sfdc.user.securityToken=${env:UNOMI_SFDC_USER_SECURITYTOKEN:-} +org.apache.unomi.sfdc.consumer.key=${env:UNOMI_SFDC_CONSUMER_KEY:-} +org.apache.unomi.sfdc.consumer.secret=${env:UNOMI_SFDC_CONSUMER_SECRET:-} +org.apache.unomi.sfdc.channel=${env:UNOMI_SFDC_CHANNEL:-/topic/LeadUpdates} +# Property Mapping Example: unomiPropertyId<=>SFDCPropertyId +org.apache.unomi.sfdc.fields.mappings=${env:UNOMI_SFDC_FIELDS_MAPPINGS:-email<=>Email,firstName<=>FirstName,lastName<=>LastName,company<=>Company,phoneNumber<=>Phone,jobTitle<=>Title,city<=>City,zipCode<=>PostalCode,address<=>Street,sfdcStatus<=>Status,sfdcRating<=>Rating} +org.apache.unomi.sfdc.fields.mappings.identifier=${env:UNOMI_SFDC_FIELDS_MAPPINGS_IDENTIFIER:-email<=>Email} +org.apache.unomi.sfdc.checkIfContactExistBeforeLeadCreation=${env:UNOMI_SFDC_CHECKIFCONTACTSEXISTS:-false} +org.apache.unomi.sfdc.session.timeout=${env:UNOMI_SFDC_SESSION_TIMEOUT:-900000} +# Consent Mapping Example: unomiConsentId<=>SFDCPropertyId +org.apache.unomi.sfdc.fields.consents=${env:UNOMI_SFDC_FIELDS_CONSENTS:-} + +####################################################################################################################### +## MailChimp connector settings ## +####################################################################################################################### +org.apache.unomi.mailchimp.apiKey=${env:UNOMI_MAILCHIMP_APIKEY:-yourApiKey} +org.apache.unomi.mailchimp.url.subDomain=${env:UNOMI_MAILCHIMP_URL_SUBDOMAIN:-us16} +# MC address type mapping format +# unomiId<=>mcTagName<=>mcSubTagName +# MC other type mapping format +# unomiId<=>mcTagName +# The following is a complete example of mapping if you wish to use it please make sure to create/replace MailChimp tag name +org.apache.unomi.mailchimp.list.merge-fields.mapping=${env:UNOMI_MAILCHIMP_LIST_MERGEFIELDS_MAPPING:-firstName<=>FNAME,lastName<=>LNAME,company<=>COMPANY,phoneNumber<=>PHONE,jobTitle<=>JOBTITLE,address<=>ADDRESS<=>addr1,city<=>ADDRESS<=>city,zipCode<=>ADDRESS<=>zip,countryName<=>ADDRESS<=>country,birthDate<=>BIRTHDATE,income<=>NUMBER} +# If you wish you can stop the mapping by setting the following property to false +org.apache.unomi.mailchimp.list.merge-fields.activate=${env:UNOMI_MAILCHIMP_LIST_MERGEFIELDS_ACTIVATE:-true} + +####################################################################################################################### +## Weather update connector settings ## +####################################################################################################################### +org.apache.unomi.weatherUpdate.apiKey=${env:UNOMI_WEATHERUPDATE_APIKEY:-YOUR_WEATHER_APIKEY} +org.apache.unomi.weatherUpdate.url.base=${env:UNOMI_WEATHERUPDATE_URL_BASE:-http://api.openweathermap.org} +org.apache.unomi.weatherUpdate.url.attributes=${env:UNOMI_WEATHERUPDATE_URL_ATTRIBUTES:-data/2.5/weather} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/package/src/main/resources/etc/users.properties ---------------------------------------------------------------------- diff --git a/package/src/main/resources/etc/users.properties b/package/src/main/resources/etc/users.properties new file mode 100644 index 0000000..1c9cf58 --- /dev/null +++ b/package/src/main/resources/etc/users.properties @@ -0,0 +1,33 @@ +################################################################################ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +# +# This file contains the users, groups, and roles. +# Each line has to be of the format: +# +# USER=PASSWORD,ROLE1,ROLE2,... +# USER=PASSWORD,_g_:GROUP,... +# _g_\:GROUP=ROLE1,ROLE2,... +# +# All users, groups, and roles entered in this file are available after Karaf startup +# and modifiable via the JAAS command group. These users reside in a JAAS domain +# with the name "karaf". +# +karaf = ${org.apache.unomi.security.root.password:-karaf},_g_:admingroup +_g_\:admingroup = group,admin,manager,viewer,systembundles,ssh http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg ---------------------------------------------------------------------- diff --git a/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg b/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg index dd0d0ec..2a47ed5 100644 --- a/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg +++ b/persistence-elasticsearch/core/src/main/resources/org.apache.unomi.persistence.elasticsearch.cfg @@ -15,26 +15,26 @@ # limitations under the License. # -cluster.name=contextElasticSearch +cluster.name=${org.apache.unomi.elasticsearch.cluster.name:-contextElasticSearch} # The elasticSearchAddresses may be a comma seperated list of host names and ports such as # hostA:9300,hostB:9300 # Note: the port number must be repeated for each host. -elasticSearchAddresses=localhost:9300 -index.name=context -monthlyIndex.numberOfShards=3 -monthlyIndex.numberOfReplicas=0 -numberOfShards=5 -numberOfReplicas=0 -defaultQueryLimit=10 +elasticSearchAddresses=${org.apache.unomi.elasticsearch.addresses:-localhost:9300} +index.name=${org.apache.unomi.elasticsearch.index.name:-context} +monthlyIndex.numberOfShards=${org.apache.unomi.elasticsearch.monthlyIndex.nbShards:-5} +monthlyIndex.numberOfReplicas=${org.apache.unomi.elasticsearch.monthlyIndex.nbReplicas:-0} +numberOfShards=${org.apache.unomi.elasticsearch.defaultIndex.nbShards:-5} +numberOfReplicas=${org.apache.unomi.elasticsearch.defaultIndex.nbReplicas:-0} +defaultQueryLimit=${org.apache.unomi.elasticsearch.defaultQueryLimit:-10} # The following settings control the behavior of the BulkProcessor API. You can find more information about these # settings and their behavior here : https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.4/java-docs-bulk-processor.html # The values used here are the default values of the API -bulkProcessor.concurrentRequests=1 -bulkProcessor.bulkActions=1000 -bulkProcessor.bulkSize=5MB -bulkProcessor.flushInterval=5s -bulkProcessor.backoffPolicy=exponential +bulkProcessor.concurrentRequests=${org.apache.unomi.elasticsearch.bulkProcessor.concurrentRequests:-1} +bulkProcessor.bulkActions=${org.apache.unomi.elasticsearch.bulkProcessor.bulkActions:-1000} +bulkProcessor.bulkSize=${org.apache.unomi.elasticsearch.bulkProcessor.bulkSize:-5MB} +bulkProcessor.flushInterval=${org.apache.unomi.elasticsearch.bulkProcessor.flushInterval:-5s} +bulkProcessor.backoffPolicy=${org.apache.unomi.elasticsearch.bulkProcessor.backoffPolicy:-exponential} # The following settings are used to perform version checks on the connected ElasticSearch cluster, to make sure that # appropriate versions are used. The check is performed like this : @@ -44,7 +44,7 @@ minimalElasticSearchVersion=5.0.0 maximalElasticSearchVersion=5.7.0 # The following setting is used to set the aggregate query bucket size -aggregateQueryBucketSize=5000 +aggregateQueryBucketSize=${org.apache.unomi.elasticsearch.aggregateQueryBucketSize:-5000} # Maximum size allowed for an elastic "ids" query -maximumIdsQueryCount=5000 \ No newline at end of file +maximumIdsQueryCount=${org.apache.unomi.elasticsearch.maximumIdsQueryCount:-5000} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/plugins/mail/src/main/resources/org.apache.unomi.plugins.mail.cfg ---------------------------------------------------------------------- diff --git a/plugins/mail/src/main/resources/org.apache.unomi.plugins.mail.cfg b/plugins/mail/src/main/resources/org.apache.unomi.plugins.mail.cfg index d1f0d27..9fc4727 100644 --- a/plugins/mail/src/main/resources/org.apache.unomi.plugins.mail.cfg +++ b/plugins/mail/src/main/resources/org.apache.unomi.plugins.mail.cfg @@ -15,8 +15,8 @@ # limitations under the License. # -mail.server.hostname=smtp.gmail.com -mail.server.port=465 -mail.server.username= -mail.server.password= -mail.server.sslOnConnect=true +mail.server.hostname=${org.apache.unomi.mail.server.hostname:-smtp.gmail.com} +mail.server.port=${org.apache.unomi.mail.server.post:-465} +mail.server.username=${org.apache.unomi.mail.server.username:-} +mail.server.password=${org.apache.unomi.mail.server.password:-} +mail.server.sslOnConnect=${org.apache.unomi.mail.server.sslOnConnect:-true} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/plugins/request/src/main/resources/org.apache.unomi.plugins.request.cfg ---------------------------------------------------------------------- diff --git a/plugins/request/src/main/resources/org.apache.unomi.plugins.request.cfg b/plugins/request/src/main/resources/org.apache.unomi.plugins.request.cfg index b32ddee..ac247ff 100644 --- a/plugins/request/src/main/resources/org.apache.unomi.plugins.request.cfg +++ b/plugins/request/src/main/resources/org.apache.unomi.plugins.request.cfg @@ -15,14 +15,14 @@ # limitations under the License. # -request.ipDatabase.location=${karaf.etc}/GeoLite2-City.mmdb +request.ipDatabase.location=${org.apache.unomi.ip.database.location:-${karaf.etc}/GeoLite2-City.mmdb} # The following settings represent the default position that is used for localhost requests -defaultSessionCountryCode=CH -defaultSessionCountryName=Switzerland -defaultSessionCity=Geneva -defaultSessionAdminSubDiv1=2660645 -defaultSessionAdminSubDiv2=6458783 -defaultSessionIsp=Cablecom -defaultLatitude=46.1884341 -defaultLongitude=6.1282508 +defaultSessionCountryCode=${org.apache.unomi.ip.default.countryCode:-CH} +defaultSessionCountryName=${org.apache.unomi.ip.default.countryName:-Switzerland} +defaultSessionCity=${org.apache.unomi.ip.default.city:-Geneva} +defaultSessionAdminSubDiv1=${org.apache.unomi.ip.default.subdiv1:-2660645} +defaultSessionAdminSubDiv2=${org.apache.unomi.ip.default.subdiv2:-6458783} +defaultSessionIsp=${org.apache.unomi.ip.default.isp:-Cablecom} +defaultLatitude=${org.apache.unomi.ip.default.latitude:-46.1884341} +defaultLongitude=${org.apache.unomi.ip.default.longitude:-6.1282508} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index acf4048..3d98a17 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ <cxf.version>3.1.10</cxf.version> <version.jackson.core>2.8.6</version.jackson.core> <version.jackson.jaxb>2.8.6</version.jackson.jaxb> - <version.karaf>4.1.5</version.karaf> + <version.karaf>4.1.7</version.karaf> <version.karaf.cellar>4.1.0</version.karaf.cellar> <version.pax.exam>4.11.0</version.pax.exam> <elasticsearch.version>5.6.3</elasticsearch.version> http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/services/src/main/resources/hazelcast.xml ---------------------------------------------------------------------- diff --git a/services/src/main/resources/hazelcast.xml b/services/src/main/resources/hazelcast.xml index df610fa..e1cc29a 100644 --- a/services/src/main/resources/hazelcast.xml +++ b/services/src/main/resources/hazelcast.xml @@ -19,15 +19,15 @@ xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <group> - <name>cellar</name> - <password>pass</password> + <name>${org.apache.unomi.hazelcast.group.name}</name> + <password>${org.apache.unomi.hazelcast.group.password}</password> </group> <management-center enabled="false">http://localhost:8080/mancenter</management-center> <properties> <property name="hazelcast.jmx">true</property> </properties> <network> - <port auto-increment="true" port-count="100">5701</port> + <port auto-increment="true" port-count="100">${org.apache.unomi.hazelcast.network.port}</port> <outbound-ports> <!-- Allowed port range when connecting to other nodes. @@ -41,7 +41,8 @@ <multicast-port>54327</multicast-port> </multicast> <tcp-ip enabled="true"> - <interface>127.0.0.1</interface> + <members>${org.apache.unomi.hazelcast.tcp-ip.members}</members> + <interface>${org.apache.unomi.hazelcast.tcp-ip.interface}</interface> </tcp-ip> <aws enabled="false"> <access-key>my-access-key</access-key> http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/services/src/main/resources/org.apache.unomi.cluster.cfg ---------------------------------------------------------------------- diff --git a/services/src/main/resources/org.apache.unomi.cluster.cfg b/services/src/main/resources/org.apache.unomi.cluster.cfg index 36cf790..bfbb189 100644 --- a/services/src/main/resources/org.apache.unomi.cluster.cfg +++ b/services/src/main/resources/org.apache.unomi.cluster.cfg @@ -14,14 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -group=default +group=${org.apache.unomi.cluster.group:-default} # To simplify testing we set the public address to use HTTP, but for production environments it is highly recommended # to switch to using HTTPS with a proper SSL certificate installed. -contextserver.publicAddress=http://localhost:8181 -contextserver.internalAddress=https://localhost:9443 +contextserver.publicAddress=${org.apache.unomi.cluster.public.address:-http://localhost:8181} +contextserver.internalAddress=${org.apache.unomi.cluster.internal.address:-https://localhost:9443} # # The nodeStatisticsUpdateFrequency controls the frequency of the update of system statistics such as CPU load, # system load average and uptime. This value is set in milliseconds and is set to 10 seconds by default. Each node # will retrieve the local values and broadcast them through a cluster event to all the other nodes to update # the global cluster statistics. -nodeStatisticsUpdateFrequency=10000 \ No newline at end of file +nodeStatisticsUpdateFrequency=${org.apache.unomi.cluster.nodeStatisticsUpdateFrequency:-10000} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/services/src/main/resources/org.apache.unomi.services.cfg ---------------------------------------------------------------------- diff --git a/services/src/main/resources/org.apache.unomi.services.cfg b/services/src/main/resources/org.apache.unomi.services.cfg index d92325c..792f990 100644 --- a/services/src/main/resources/org.apache.unomi.services.cfg +++ b/services/src/main/resources/org.apache.unomi.services.cfg @@ -16,35 +16,35 @@ # # Purge job interval (in days) -profile.purge.interval=1 +profile.purge.interval=${org.apache.unomi.profile.purge.interval:-1} # Purge profiles that have been inactive for a specific number of days -profile.purge.inactiveTime=180 +profile.purge.inactiveTime=${org.apache.unomi.profile.purge.inactiveTime:-180} # Purge profiles that have been created for a specific number of days -profile.purge.existTime=-1 +profile.purge.existTime=${org.apache.unomi.profile.purge.existTime:--1} # Purge all sessions/events that have been created for a specific number of months -event.purge.existTime=12 +event.purge.existTime=${org.apache.unomi.event.purge.existTime:-12} # When performing segment updates, this controls the size of the scrolling query size used to iterate over all the # profiles that need updating -segment.update.batchSize=1000 +segment.update.batchSize=${org.apache.unomi.segment.update.batchSize:-1000} # The interval in milliseconds to use to reload the definitions (condition types and action types) -definitions.refresh.interval=10000 +definitions.refresh.interval=${org.apache.unomi.definitions.refresh.interval:-10000} # The interval in milliseconds to use to reload the property types -properties.refresh.interval=10000 +properties.refresh.interval=${org.apache.unomi.properties.refresh.interval:-10000} # The interval in milliseconds to use to reload the segments and scoring plans -segment.refresh.interval=1000 +segment.refresh.interval=${org.apache.unomi.segment.refresh.interval:-1000} # The interval in days to use to recalculate segments/scoring plans on profile -segment.recalculate.period=1 +segment.recalculate.period=${org.apache.unomi.segment.recalculate.period:-1} # The interval in milliseconds to use to reload the rules -rules.refresh.interval=1000 +rules.refresh.interval=${org.apache.unomi.rules.refresh.interval:-1000} # The interval in milliseconds to use to reload the rules statistics -rules.statistics.refresh.interval=10000 +rules.statistics.refresh.interval=${org.apache.unomi.rules.statistics.refresh.interval:-10000} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/services/src/main/resources/org.apache.unomi.thirdparty.cfg ---------------------------------------------------------------------- diff --git a/services/src/main/resources/org.apache.unomi.thirdparty.cfg b/services/src/main/resources/org.apache.unomi.thirdparty.cfg index a4e6d5d..e0bb043 100644 --- a/services/src/main/resources/org.apache.unomi.thirdparty.cfg +++ b/services/src/main/resources/org.apache.unomi.thirdparty.cfg @@ -21,6 +21,6 @@ # Example : provider1 is allowed to send login and download events from # localhost , with key provided in X-Unomi-Peer # -thirdparty.provider1.key=670c26d1cc413346c3b2fd9ce65dab41 -thirdparty.provider1.ipAddresses=127.0.0.1,::1 -thirdparty.provider1.allowedEvents=login,updateProperties +thirdparty.provider1.key=${org.apache.unomi.thirdparty.provider1.key:-670c26d1cc413346c3b2fd9ce65dab41} +thirdparty.provider1.ipAddresses=${org.apache.unomi.thirdparty.provider1.ipAddresses:-127.0.0.1,::1} +thirdparty.provider1.allowedEvents=${org.apache.unomi.thirdparty.provider1.allowedEvents:-login,updateProperties} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/wab/src/main/resources/org.apache.unomi.web.cfg ---------------------------------------------------------------------- diff --git a/wab/src/main/resources/org.apache.unomi.web.cfg b/wab/src/main/resources/org.apache.unomi.web.cfg index 0a3c518..b786782 100644 --- a/wab/src/main/resources/org.apache.unomi.web.cfg +++ b/wab/src/main/resources/org.apache.unomi.web.cfg @@ -17,10 +17,10 @@ # Configure here the domain to use the for cookies setup by the Apache Unomi context servlet # by default the current request will be used to set the domain. -# contextserver.domain= +contextserver.domain=${org.apache.unomi.profile.cookie.domain:-} # This setting controls the name of the cookie use to track profiles using Apache Unomi -#contextserver.profileIdCookieName=context-profile-id +contextserver.profileIdCookieName=${org.apache.unomi.profile.cookie.name:-context-profile-id} # This setting controls the maximum age of the profile cookie. By default it is set to a year. -#contextserver.profileIdCookieMaxAgeInSeconds=31536000 +contextserver.profileIdCookieMaxAgeInSeconds=${org.apache.unomi.profile.cookie.maxAgeInSeconds:-31536000} #Allowed profile download formats, actually only csv (horizontal and vertical), json, text and yaml are allowed. -allowed.profile.download.formats=csv,yaml,json,text \ No newline at end of file +allowed.profile.download.formats=${org.apache.unomi.profile.download.formats:-csv,yaml,json,text} \ No newline at end of file