[10/14] incubator-unomi git commit: DMF-1343 : Improvement and documentation
DMF-1343 : Improvement and documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/77fc9e44 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/77fc9e44 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/77fc9e44 Branch: refs/heads/feature-DMF-1343 Commit: 77fc9e44deb09f470cfad2ac791facd85d50cf50 Parents: 9cffa13 Author: Abdelkader MidaniAuthored: Wed May 24 17:26:14 2017 +0200 Committer: Abdelkader Midani Committed: Mon Jun 12 19:24:29 2017 +0200 -- extensions/router/README.md | 113 +++ .../ProfileImportConfigUpdateRouteBuilder.java | 2 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 6 +- .../main/resources/org.apache.unomi.router.cfg | 4 +- .../ImportConfigurationServiceEndPoint.java | 37 +++--- .../resources/OSGI-INF/blueprint/blueprint.xml | 14 ++- 6 files changed, 154 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/77fc9e44/extensions/router/README.md -- diff --git a/extensions/router/README.md b/extensions/router/README.md new file mode 100644 index 000..8fa1994 --- /dev/null +++ b/extensions/router/README.md @@ -0,0 +1,113 @@ + + +Unomi Router +== + +## Getting started +Unomi Router Extension a Karaf Feature that provide an Enterprise Application Integration tool. +It is optional so you must configure it and install it in Karaf, and can be used for Machine - Machine or Human - Machine integration with Unomi. +Mainly Unomi Router Extension aim to make it easy to import third party applications/platforms profiles into Unomi. +This extension is implemented using Apache Camel routes and is using Apache Kafka to buffer import process and make it failsafe. + +## Getting started +1. Configure your Unomi Router: +In the `etc/org.apache.unomi.sfdc.cfg` file, you might want to update the following settings: +Kafka settings +>`#Kafka settings` + +>`kafka.host=localhost` + +>`kafka.port=9092` + +>`kafka.import.topic=camel-deposit` + +>`kafka.import.groupId=unomi-import-group` + +Kafka host and port with the topic name and the groupId ti which the topic is assigned + +>`#Import One Shot upload directory` + +>`import.oneshot.uploadDir=/tmp/unomi_oneshot_import_configs/` + +Path to the folder where unomi should stock file imported for a oneshot processing + + +2. Deploy into Apache Unomi using the following commands from the Apache Karaf shell: +```sh +$ feature:repo-add mvn:org.apache.unomi/unomi-router-karaf-feature/${version}/xml/features +$ feature:install unomi-router-karaf-feature +``` + +3. Send your import configuration: + +An import configuration is nothing else than a simple JSON to describe how you want to import your data (Profiles). +To create/update an import configuration + +`POST /cxs/importConfiguration` +```json + { + "itemId": "f57f1f86-97bf-4ba0-b4e4-7d5e77e7c0bd", + "itemType": "importConfig", + "scope": "integration", + "name": "Test Recurrent", + "description": "Just test recurrent import", + "configType": "recurrent", + "properties": { + "source": "{file/ftp}://{path}?fileName={file-name}.csv=.done=2", + "mapping": { + "firstName": 0, + "lastName": 1, + ... + } + }, + "mergingProperty": "email", + "overwriteExistingProfiles": true, + "propertiesToOverwrite": ["firstName", "lastName"], + "active": true + } +``` + +Omit the `itemId` when creating new entry, `configType` can be '**recurrent**' for file/ftp/network path polling or '**oneshot**' for one time import. + +The `properties.source` attribute is an Apache Camel endpoint uri (See http://camel.apache.org/uris.html for more details). Unomi Router is designed to use **File** and **FTP** Camel components. + +The attribute `properties.mapping` is a Map of: +* Key: Profile property id in Unomi +* Value: Index of the column in the imported file to copy the in the previous property. + +The attribute `mergingProperty` is the profile property id in Unomi to use to check for duplication. + +The attribute `propertiesToOverwrite` is a list of profile properties ids to overwrite, if **null** all properties +will be overwritten. + +The attribute `active` is the flag to activate or deactivate the import configuration. + +Concerning oneshot import configuration
[15/17] incubator-unomi git commit: DMF-1343 : Improvement and documentation
DMF-1343 : Improvement and documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3c602041 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3c602041 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3c602041 Branch: refs/heads/feature-DMF-1343 Commit: 3c602041a7402dddb4ab119a7c62984149db65c1 Parents: 2f975d3 Author: Abdelkader MidaniAuthored: Wed May 24 17:26:14 2017 +0200 Committer: Abdelkader Midani Committed: Tue Jun 6 17:35:46 2017 +0200 -- extensions/router/README.md | 113 +++ .../ProfileImportConfigUpdateRouteBuilder.java | 2 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 6 +- .../main/resources/org.apache.unomi.router.cfg | 4 +- .../ImportConfigurationServiceEndPoint.java | 37 +++--- .../resources/OSGI-INF/blueprint/blueprint.xml | 14 ++- 6 files changed, 154 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3c602041/extensions/router/README.md -- diff --git a/extensions/router/README.md b/extensions/router/README.md new file mode 100644 index 000..8fa1994 --- /dev/null +++ b/extensions/router/README.md @@ -0,0 +1,113 @@ + + +Unomi Router +== + +## Getting started +Unomi Router Extension a Karaf Feature that provide an Enterprise Application Integration tool. +It is optional so you must configure it and install it in Karaf, and can be used for Machine - Machine or Human - Machine integration with Unomi. +Mainly Unomi Router Extension aim to make it easy to import third party applications/platforms profiles into Unomi. +This extension is implemented using Apache Camel routes and is using Apache Kafka to buffer import process and make it failsafe. + +## Getting started +1. Configure your Unomi Router: +In the `etc/org.apache.unomi.sfdc.cfg` file, you might want to update the following settings: +Kafka settings +>`#Kafka settings` + +>`kafka.host=localhost` + +>`kafka.port=9092` + +>`kafka.import.topic=camel-deposit` + +>`kafka.import.groupId=unomi-import-group` + +Kafka host and port with the topic name and the groupId ti which the topic is assigned + +>`#Import One Shot upload directory` + +>`import.oneshot.uploadDir=/tmp/unomi_oneshot_import_configs/` + +Path to the folder where unomi should stock file imported for a oneshot processing + + +2. Deploy into Apache Unomi using the following commands from the Apache Karaf shell: +```sh +$ feature:repo-add mvn:org.apache.unomi/unomi-router-karaf-feature/${version}/xml/features +$ feature:install unomi-router-karaf-feature +``` + +3. Send your import configuration: + +An import configuration is nothing else than a simple JSON to describe how you want to import your data (Profiles). +To create/update an import configuration + +`POST /cxs/importConfiguration` +```json + { + "itemId": "f57f1f86-97bf-4ba0-b4e4-7d5e77e7c0bd", + "itemType": "importConfig", + "scope": "integration", + "name": "Test Recurrent", + "description": "Just test recurrent import", + "configType": "recurrent", + "properties": { + "source": "{file/ftp}://{path}?fileName={file-name}.csv=.done=2", + "mapping": { + "firstName": 0, + "lastName": 1, + ... + } + }, + "mergingProperty": "email", + "overwriteExistingProfiles": true, + "propertiesToOverwrite": ["firstName", "lastName"], + "active": true + } +``` + +Omit the `itemId` when creating new entry, `configType` can be '**recurrent**' for file/ftp/network path polling or '**oneshot**' for one time import. + +The `properties.source` attribute is an Apache Camel endpoint uri (See http://camel.apache.org/uris.html for more details). Unomi Router is designed to use **File** and **FTP** Camel components. + +The attribute `properties.mapping` is a Map of: +* Key: Profile property id in Unomi +* Value: Index of the column in the imported file to copy the in the previous property. + +The attribute `mergingProperty` is the profile property id in Unomi to use to check for duplication. + +The attribute `propertiesToOverwrite` is a list of profile properties ids to overwrite, if **null** all properties +will be overwritten. + +The attribute `active` is the flag to activate or deactivate the import configuration. + +Concerning oneshot import configuration
incubator-unomi git commit: DMF-1343 : Improvement and documentation
Repository: incubator-unomi Updated Branches: refs/heads/feature-DMF-1343 5d8f1be5a -> 9203d36f4 DMF-1343 : Improvement and documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9203d36f Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9203d36f Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9203d36f Branch: refs/heads/feature-DMF-1343 Commit: 9203d36f44c6cdb15f96bccfd1fec71dbfad51c0 Parents: 5d8f1be Author: Abdelkader MidaniAuthored: Wed May 24 17:26:14 2017 +0200 Committer: Abdelkader Midani Committed: Wed May 24 17:26:14 2017 +0200 -- extensions/router/README.md | 113 +++ .../ProfileImportConfigUpdateRouteBuilder.java | 2 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 6 +- .../main/resources/org.apache.unomi.router.cfg | 4 +- .../ImportConfigurationServiceEndPoint.java | 37 +++--- .../resources/OSGI-INF/blueprint/blueprint.xml | 14 ++- 6 files changed, 154 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9203d36f/extensions/router/README.md -- diff --git a/extensions/router/README.md b/extensions/router/README.md new file mode 100644 index 000..8fa1994 --- /dev/null +++ b/extensions/router/README.md @@ -0,0 +1,113 @@ + + +Unomi Router +== + +## Getting started +Unomi Router Extension a Karaf Feature that provide an Enterprise Application Integration tool. +It is optional so you must configure it and install it in Karaf, and can be used for Machine - Machine or Human - Machine integration with Unomi. +Mainly Unomi Router Extension aim to make it easy to import third party applications/platforms profiles into Unomi. +This extension is implemented using Apache Camel routes and is using Apache Kafka to buffer import process and make it failsafe. + +## Getting started +1. Configure your Unomi Router: +In the `etc/org.apache.unomi.sfdc.cfg` file, you might want to update the following settings: +Kafka settings +>`#Kafka settings` + +>`kafka.host=localhost` + +>`kafka.port=9092` + +>`kafka.import.topic=camel-deposit` + +>`kafka.import.groupId=unomi-import-group` + +Kafka host and port with the topic name and the groupId ti which the topic is assigned + +>`#Import One Shot upload directory` + +>`import.oneshot.uploadDir=/tmp/unomi_oneshot_import_configs/` + +Path to the folder where unomi should stock file imported for a oneshot processing + + +2. Deploy into Apache Unomi using the following commands from the Apache Karaf shell: +```sh +$ feature:repo-add mvn:org.apache.unomi/unomi-router-karaf-feature/${version}/xml/features +$ feature:install unomi-router-karaf-feature +``` + +3. Send your import configuration: + +An import configuration is nothing else than a simple JSON to describe how you want to import your data (Profiles). +To create/update an import configuration + +`POST /cxs/importConfiguration` +```json + { + "itemId": "f57f1f86-97bf-4ba0-b4e4-7d5e77e7c0bd", + "itemType": "importConfig", + "scope": "integration", + "name": "Test Recurrent", + "description": "Just test recurrent import", + "configType": "recurrent", + "properties": { + "source": "{file/ftp}://{path}?fileName={file-name}.csv=.done=2", + "mapping": { + "firstName": 0, + "lastName": 1, + ... + } + }, + "mergingProperty": "email", + "overwriteExistingProfiles": true, + "propertiesToOverwrite": ["firstName", "lastName"], + "active": true + } +``` + +Omit the `itemId` when creating new entry, `configType` can be '**recurrent**' for file/ftp/network path polling or '**oneshot**' for one time import. + +The `properties.source` attribute is an Apache Camel endpoint uri (See http://camel.apache.org/uris.html for more details). Unomi Router is designed to use **File** and **FTP** Camel components. + +The attribute `properties.mapping` is a Map of: +* Key: Profile property id in Unomi +* Value: Index of the column in the imported file to copy the in the previous property. + +The attribute `mergingProperty` is the profile property id in Unomi to use to check for duplication. + +The attribute `propertiesToOverwrite` is a list of profile properties ids to overwrite, if **null** all properties +will be overwritten. + +The attribute `active` is the flag to