Commit cbf5ec52 authored by zhi.wang's avatar zhi.wang

Update alfstream-sync docs

parent b7166881
......@@ -4,6 +4,25 @@ This is the change log for Parashift's [AlfStream Sync Module](../paramodules/al
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [1.2.2] 2017-9-07
### Fixed
* Site authority groups was not synced correctly, which cause the site creation failed when trying to create a same site on the other end
### Changed
* Wrapping camel related files into KAR archive
* Two way blue print file now contains persist file as parameter that is used for recording lastest sync status
* Merge authority (user and group) sync route to two way blue print route
## [1.2.1] 2017-7-14
### Fixed
* Invalid cron expression causes multiple running of retry sync
## [1.2.0] 2017-6-27
### Added
......
......@@ -7,15 +7,22 @@
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 ">
<cm:property-placeholder persistent-id="com.parashift" />
<cm:property-placeholder persistent-id="com.parashift" >
<cm:default-properties>
<cm:property name="alfresco.local.url" value="http://localhost:8080/alfresco"/>
<cm:property name="alfresco.local.username" value="admin"/>
<cm:property name="alfresco.local.password" value="admin"/>
<cm:property name="alfstream.sync.persist.file" value="persist/alfstream-sync" />
</cm:default-properties>
</cm:property-placeholder>
<bean id="preventEcho" class="com.parashift.alfstream.PreventEcho" />
<bean id="debugLog" class="com.parashift.alfstream.DebugLog" />
<bean id="debugLog" class="com.parashift.alfstreamsync.DebugLog" />
<camelContext id="twoWayAlfStream" xmlns="http://camel.apache.org/schema/blueprint">
<route id="remoteToLocal">
<from uri="alfs://{{alfstream.local.url}}?aspects=alfs_sync&amp;username={{alfstream.local.username}}&amp;password={{alfstream.local.password}}" />
<route id="localToRemote">
<from uri="alfs://{{alfstream.local.url}}?aspects=alfs_sync&amp;username={{alfstream.local.username}}&amp;password={{alfstream.local.password}}&amp;persistFile={{alfstream.sync.persist.file}}" />
<onException id="syncFailureNotification">
<exception>java.lang.Exception</exception>
<handled>
......@@ -39,7 +46,7 @@
</javaScript>
</setHeader>
<bean ref="debugLog" />
<to uri="alfs://{{alfstream.remote.url}}?username={{alfstream.remote.username}}&amp;password={{alfstream.remote.password}}" />
<to uri="alfs://{{alfstream.remote.url}}?aspects=alfs_sync&amp;username={{alfstream.remote.username}}&amp;password={{alfstream.remote.password}}" />
<filter>
<javaScript>
request.headers.get('alfs_syncState') == 'Not Synced'
......@@ -82,13 +89,6 @@
<to uri="alfs://{{alfstream.local.url}}?skipCheck=true&amp;username={{alfstream.local.username}}&amp;password={{alfstream.local.password}}" />
</route>
<route id="authoritySync">
<from uri="alfs://{{alfstream.local.url}}?username={{alfstream.local.username}}&amp;password={{alfstream.local.password}}&amp;types=cm_person,cm_authorityContainer" />
<bean ref="debugLog" />
<to uri="alfs://{{alfstream.remote.url}}?username={{alfstream.remote.username}}&amp;password={{alfstream.remote.password}}&amp;types=cm_person,cm_authorityContainer" />
</route>
</camelContext>
</blueprint>
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 ">
<cm:property-placeholder persistent-id="com.parashift" />
<bean id="preventEcho" class="com.parashift.alfstream.PreventEcho" />
<bean id="debugLog" class="com.parashift.alfstream.DebugLog" />
<camelContext id="twoWayAlfStream" xmlns="http://camel.apache.org/schema/blueprint">
<route id="demoToStream">
<from uri="alfs://http://{{alfstream.remote.url}}?username={{alfstream.remote.username}}&amp;password={{alfstream.remote.password}}" />
<filter>
<javaScript>
request.headers.get('NodeEventType') == 'DELETE' ||
request.headers.get('Path').startsWith('/Company Home/Sites/test/')
</javaScript>
<filter>
<method ref="preventEcho"/>
<bean ref="debugLog" />
<to uri="alfs://{{alfstream.local.url}}/alfresco?username={{alfstream.local.username}}&amp;password={{alfstream.local.password}}" />
</filter>
</filter>
</route>
</camelContext>
</blueprint>
......@@ -13,7 +13,7 @@ The following features are added based on the existing alfstream module:
* Synchronise site folders and files
* Synchronise 'My files'
* Synchronise user Groups
* If there is a failure to synchronise between instances due to environmental reasons, site managers are notified via email. Users can retry syncing by:
* If there is a failure to synchronise between instances due to environmental reasons, site managers are notified via email. Users can retry syncing by:
* Setting up automatic retries, as per below
* Manually selecting `Retry Syncing` from Share
......@@ -143,6 +143,7 @@ You will need to follow this step on both sides:
* `alfstream.remote.url`: the Remote alfresco instance
* `alfstream.remote.username`: the Remote alfresco admin username
* `alfstream.remote.password`: the Remote alfresco admin password
* `alfstream.sync.persist.file`: the file used to store the last sync status
As an example:
......@@ -153,12 +154,23 @@ alfstream.remote.password=admin
alfstream.local.url=http://localhost:8080/alfresco
alfstream.local.username=admin
alfstream.local.password=admin
alfstream.sync.persist.file=persist/alfstream-sync
```
* Generate KAR archive (since v1.2.2), run `gradle generateKar` in camel folder, find KAR archive generated in `camel/build/karaf/kar` folder.
Since `1.2.2`, we provide default values in [alfstream-sync-blueprint.xml](../examples/alfstream-sync-blueprint.xml) for local alfstream configurations and persist file as shown below:
!!! note
this KAR file requires alfstream jar as dependency, so you need to run `gradle publishtomavenlocal` in camel folder of alfstream module[alfstream module](https://gitlab.parashift.com.au/parashift-modules/alfstream) first.
```
alfstream.local.url=http://localhost:8080/alfresco
alfstream.local.username=admin
alfstream.local.password=admin
alfstream.sync.persist.file=persist/alfstream-sync
```
You only need to provide remote related alfstream configurations if the default values work for you.
* Since `1.2.2` you can create a KAR Bundle:
* Download or navigate to where you have stored the [alfstream module](https://gitlab.parashift.com.au/parashift-modules/alfstream)
* Run `gradle publishToMavenLocal` to publish the artifact
* In the camel directory of alfstream-sync, run `gradleGenerateKar`
* Copy the generated KAR archive to the `deploy` directory of karaf, the example path like `/opt/apache-karaf-{version}/deploy`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment