Repository: incubator-unomi Updated Branches: refs/heads/master b873b35a2 -> c569f6396
UNOMI-216 Centralize configuration in unomi.properties - Simplify configuration by just using a system properties file instead of a custom.properties file 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/c569f639 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c569f639 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c569f639 Branch: refs/heads/master Commit: c569f6396c284660bf634d490f12d2f3d390a1b6 Parents: b873b35 Author: Serge Huber <shu...@apache.org> Authored: Thu Dec 13 20:28:30 2018 +0100 Committer: Serge Huber <shu...@apache.org> Committed: Thu Dec 13 20:28:30 2018 +0100 ---------------------------------------------------------------------- manual/src/main/asciidoc/configuration.adoc | 16 +- .../src/main/resources/etc/custom.properties | 1 - .../main/resources/etc/custom.system.properties | 289 +++++++++++++++++ package/src/main/resources/etc/unomi.properties | 309 ------------------- 4 files changed, 297 insertions(+), 318 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/manual/src/main/asciidoc/configuration.adoc ---------------------------------------------------------------------- diff --git a/manual/src/main/asciidoc/configuration.adoc b/manual/src/main/asciidoc/configuration.adoc index 3a73c7f..3b628fc 100644 --- a/manual/src/main/asciidoc/configuration.adoc +++ b/manual/src/main/asciidoc/configuration.adoc @@ -15,9 +15,12 @@ ==== Changing the default configuration -If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc directory. +If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc/unomi.custom.system.properties file. +By default this file does not exist and is designed to be a file that will contain only your custom modifications to the +default configuration. -If you want to change the HTTP ports that the server is listening on, you will need to add/change the following lines in the $MY_KARAF_HOME/etc/custom.properties file: +For example, if you want to change the HTTP ports that the server is listening on, you will need to add/change the +following lines in the $MY_KARAF_HOME/etc/unomi.custom.system.properties file: [source] ---- @@ -25,15 +28,12 @@ org.osgi.service.http.port.secure=9443 org.osgi.service.http.port=8181 ---- -If you change these ports, also make sure you adjust the following file in the cluster configuration. - -The context server configuration is kept in the $MY_KARAF_HOME/etc/org.apache.unomi.cluster.cfg . It defines the -addresses where it can be found : +If you change these ports, also make sure you adjust the following settings in the same file : [source] ---- -contextserver.publicAddress=https://localhost:9443 -contextserver.internalAddress=http://127.0.0.1:8181 +org.apache.unomi.public.address=http://localhost:8181 +org.apache.unomi.internal.address=https://localhost:9443 ---- If you need to specify an Elasticsearch cluster name, or a host and port that are different than the default, http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/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 7db6f03..9cc6a7d 100644 --- a/package/src/main/resources/etc/custom.properties +++ b/package/src/main/resources/etc/custom.properties @@ -21,7 +21,6 @@ # All the values specified here will override the default values given # in config.properties. # -${includes}=unomi.properties karaf.systemBundlesStartLevel=50 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/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 index 98f5da4..3e3dfeb 100644 --- a/package/src/main/resources/etc/custom.system.properties +++ b/package/src/main/resources/etc/custom.system.properties @@ -32,3 +32,292 @@ 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 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/c569f639/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 deleted file mode 100644 index 466bc5f..0000000 --- a/package/src/main/resources/etc/unomi.properties +++ /dev/null @@ -1,309 +0,0 @@ -################################################################################ -# -# 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}