An Overview of Alfresco Share and the strategy to replace MS Sharepoint

March 15, 2009

This article is a good overview of Share, and the Alfresco strategy to replace sharepoint:

Under the Covers: Alfresco’s SharePoint Services (WSS) Killer

Advertisements

How to debug the User and Group synchro from LDAP ?

March 13, 2009

Trying to debug the User and Group synchronization process (from LDAP) might be a complex task.
Here are some tips and tricks to better understand how it works:

Basically, you should know this process is based on the following principles:
– A first Alfresco process connects to the source LDAP, and then creates 2 XML output files (list of Users and list of Groups),
– Then a second process runs to parse the XML file and perform the corresponding import tasks into the Alfresco repository.

1/ Of course the first task is to enable LDAP synchronization. To do so you will have to configure the following files:
/home/alfresco/tomcat/shared/classes/alfresco/extension
ldap-synchronisation.properties
ldap-synchronisation-context.xml

I will not detail this part here. You can find more info here.
So for the next section of this post, I will assume LDAP synchro has been enabled.

———-

2/ Disable the temporary file cleaner task to be able to see the result of the User/Group export tasks:

This operation is mandatory, because without it you will not be able to see what is the output result of the export process. This is because Alfresco consider daily export files as temporary files and deletes them.

Edit the file : scheduled-jobs-context.xml
(should be here : “/home/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco”)

And comment the following bean:

 <bean id=”tempFileCleanerTrigger” class=”org.alfresco.util.TriggerBean”>

 

Then restart the server, and wait for the LDAP synchro to run.
At the end of the User/Group export, you should see 2 new files in:

/home/alfresco/tomcat/temp/Alfresco

ExportSourceImporter-41245.xml

ExportSourceImporter-51936.xml

One is for Users, the other is for Groups.

———-

3/ Check the consistency of export files:

In some cases, especially if the export files are too big, they might not be properly terminated (xml file is not complete).
So it is important to verify that the output files are properly formated (valid XML file).

– Open the Group export file, and verify that it ends properly with the “</view:view>” tag, as follows:

<?xml version=”1.0″ encoding=”UTF-8″?>
<view:view xmlns:view=(list of namespace here)>
   <usr:authorityContainer view:childName=”usr:GROUP_APP_ALFRESCO_EUROPE” view:id=”08af8a56-0f6c-11de-a3e9-4d545cfc49d0″>
      <usr:authorityName>GROUP_APP_ALFRESCO_EUROPE</usr:authorityName>
      <usr:members>

(…)

</view:view> 

– Open the Users export file, and verify that it ends properly with the “</view:view>” tag, as follows:

<?xml version=”1.0″ encoding=”UTF-8″?>
<view:view xmlns:view=”http://www.alfresco.org/view/repository/1.0” xmlns:d=”http://www.alfresco.org/model/dictionary/1.0” xmlns:alf=”http://www.alfresco.org” xmlns:nt=”http://www.jcp.org/jcr/nt/1.0” xmlns:act=”http://www.alfresco.org/model/action/1.0” xmlns:wf=”http://www.alfresco.org/model/workflow/1.0” xmlns:app=”http://www.alfresco.org/model/application/1.0” xmlns:usr=”http://www.alfresco.org/model/user/1.0” xmlns:ver=”http://www.alfresco.org/model/versionstore/1.0” xmlns:cm=”http://www.alfresco.org/model/content/1.0” xmlns:sv=”http://www.jcp.org/jcr/sv/1.0” xmlns:mix=”http://www.jcp.org/jcr/mix/1.0” xmlns:jcr=”http://www.jcp.org/jcr/1.0” xmlns:wcm=”http://www.alfresco.org/model/wcmmodel/1.0” xmlns:wca=”http://www.alfresco.org/model/wcmappmodel/1.0” xmlns:sys=”http://www.alfresco.org/model/system/1.0” xmlns:wcmwf=”http://www.alfresco.org/model/wcmworkflow/1.0” xmlns:rule=”http://www.alfresco.org/model/rule/1.0” xmlns:bpm=”http://www.alfresco.org/model/bpm/1.0” xmlns:fm=”http://www.alfresco.org/model/forum/1.0” xmlns:custom=”custom.model” xmlns:reg=”http://www.alfresco.org/system/registry/1.0” xmlns:module=”http://www.alfresco.org/system/modules/1.0” xmlns=””>
   <cm:person view:childName=”cm:person”>
      <cm:ownable></cm:ownable>
      <cm:owner>A4673985</cm:owner>

(…)
   <cm:person view:childName=”cm:person”>
      <cm:ownable></cm:ownable>
      <cm:owner>M6058475</cm:owner>
      <cm:userName>M6058475</cm:userName>
      <cm:firstName>Myong-Cheol</cm:firstName>
      <cm:lastName>LEE</cm:lastName>
      <cm:email>mclee@sgh-china.com</cm:email>
      <cm:organizationId></cm:organizationId>
      <cm:homeFolderProvider>personalHomeFolderProvider</cm:homeFolderProvider>
      <sys:node-uuid>2ef18982-e73f-11dd-a096-dd7b8853f76c</sys:node-uuid>
   </cm:person>
</view:view>

 

4/ Enable log traces for the export/import process:

By default, there is no log traces of the export/import process.
So to know what happen exactly, you should enable at least the import traces.

Edit the log4j.properties file (which should be located here:
/home/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties
)

And add:
log4j.logger.org.alfresco.repo.importer.view.ViewParser=DEBUG

Then restart server, and wait for LDAP synchro. In the alfresco.log file you should see traces similar to:

Begin of import Group traces:
03:44:42,770 DEBUG [org.alfresco.repo.importer.view.ViewParser] Pushed ParentContext[parent=user://alfrescoUserStore/53644b61-e548-11dc-8708-09624679a589,assocType=null]
03:44:42,823 DEBUG [org.alfresco.repo.importer.view.ViewParser] Pushed NodeContext[childName=usr:GROUP_APP_ALFRESCO_EUROPE,type={http://www.alfresco.org/model/user/1.0}authorityContainer,nodeRef=null,aspects=[],parentContext=ParentContext[parent=user://alfrescoUserStore/53644b61-e548-11dc-8708-09624679a589,assocType=null]]
03:44:42,823 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/user/1.0}authorityName
(…)

Begin of import Users traces:
19:06:17,984 DEBUG [org.alfresco.repo.importer.view.ViewParser] Popped NodeContext[childName=cm:person,type={http://www.alfresco.org/model/content/1.0}person,nodeRef=null,aspects=[ClassDef[name={http://www.alfresco.org/model/content/1.0}ownable]],parentContext=ParentContext[parent=workspace://SpacesStore/56404266-e548-11dc-8708-09624679a589,assocType=null]]
19:06:18,153 DEBUG [org.alfresco.repo.importer.view.ViewParser] Pushed NodeContext[childName=cm:person,type={http://www.alfresco.org/model/content/1.0}person,nodeRef=null,aspects=[],parentContext=ParentContext[parent=workspace://SpacesStore/56404266-e548-11dc-8708-09624679a589,assocType=null]]
19:06:18,153 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed aspect {http://www.alfresco.org/model/content/1.0}ownable
19:06:18,153 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}owner
19:06:18,153 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}userName
19:06:18,153 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}firstName
19:06:18,154 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}lastName
19:06:18,154 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}email
19:06:18,154 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}organizationId
19:06:18,154 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/content/1.0}homeFolderProvider
19:06:18,154 DEBUG [org.alfresco.repo.importer.view.ViewParser] Processed property {http://www.alfresco.org/model/system/1.0}node-uuid

IMPORTANT: Please note that it might be required to customize or override the out-of-the-box Alfresco exporter/importer classes, especially to add more log traces (the default classes does not provide a lot of traces even with debug mode).

To know what classes are involved, look at the file ldap-synchronisation-context.xml. These 2 beans manage the export
and import process:

org.alfresco.repo.security.authentication.ldap.LDAPPersonExportSource

org.alfresco.repo.security.authentication.ldap.LDAPGroupExportSource


Think about Share as an Extranet web app

March 12, 2009

It’s interesting to notice that Alfresco Share has been primarily designed as an Extranet web application, built on top of the Alfresco Document Repository.

The more I study Share, the more I understand that it has been designed as a front-office for Alfresco DM.

In the current version of Share, most of the “admin” task are managed through the Alfresco DM web UI (JSF client):

For instance, if you want to setup notification rule for Share Site “testsite”, you have to connect to Alfresco DM, and then go to “Company Home / Site / testsite”, and then apply rules on the sub-spaces which corresponds to the Share pages (like Blog, wiki, etc).

Each “page” of the Share site corresponds to an Alfresco Space. So each time a Site is created, the following spaces are automatically created in the DM:

– blog
– calendar
– discussions
– documentLibrary
– links
– wiki

So you can choose to apply notification only for the Space “Calendar”. This is really as simple as applying any rule on Space in the DM. (I think you could also transform all your Share Blog post in .pdf …to be tested).

Another example, is that when you create a new Site, Share leverage the Alfresco DM security and automatically creates User Group associated with your Site. You can see all these groups if you connect as admin in Alfresco DM (and go to the Group management interface). Assuming your site is named “testsite”, then you will see the following Group sctructure:

site_testsite
 site_testsite_SiteManager
 site_testsite_SiteCollaborator
 site_testsite_SiteContributor
 site_testsite_SiteConsumer

Then, when you invite a User in “testsite” (and give the consumer role), this will automatically add this User as a member of the corresponding group site_testsite_SiteConsumer.

 

So consider Share as the front-end, and Alfresco DM as the back-end, and this will help you to understand how these 2 web app are coupled together.


Alfresco DM and Share application installation modes

March 12, 2009

Today I have tested the new Alfresco Enterprise version (3.0 SP1) as well as the embedded Share application.

Firstly, my feeling is that this version is much more stable than previous 3.0 release (there were a lot of look&feel bug, especially with IE). I’ve done a few tests only regarding the collaborative features (like blog, etc) because I wanted mainly to test the distinct installation options (local or remote) between Alfresco DM and Share.

That’s a key feature for us, because we want to share the documents between our collaboration solution and our DM solution, but we would like also to have a clearly decoupled architecture to ease configuration/maintenance, but also give us the ability to better manage scalability.

I can say that it is very easy to set-up the 3 main architecture implementations mode. You have basically 3 possibility ; you can install:

1/ Alfresco DM and Share on the same Tomcat server (this is the default option). In this case both web application will run in the same JVM.

2/ Alfresco DM and Share can be installed on 2 separate Tomcat java application servers (on the same machine).

3/ Or you can install share on a distinct machine and connect it to the remote DM repository.

It is as simple as modifying a configuration file, because Share as been designed to be installed remotely. With the third option (the one we will probably choose in our compagny), Share is loosely coupled with the DM, and the communication is managed only through http based on the Alfresco web scripts (REST style implementation). These 2 separate servers installation mode allows to completely separate the collaborative and the DM solution. This improve the scalability of the global architecture, but you can still share the documents.

Indeed, if you create a new Site in Share, then it will appears automatically as a space in Alfresco DM: Company Home > Sites > MyShareSite > documentLibrary > rootfolderOfMyShareSite So the documentLibrary module of Share is directly exposed as an Alfresco node, and you can browse it’s content as any other space.

One limitation however in this release…It seems that documents that are uploaded in a Share site can be edited only from Share (and not from Alfresco DM application). It is clearly mentionned in Alfresco because the following message is displayed in the Alfresco web UI: “This space is managed by Alfresco Share. Please use the Alfresco Share application to work with content within this space and any sub-spaces.” However, I was able to lock and unlock Share documents from the Alfresco web UI, so editing seems to works even if the warning message is displayed…will have to do more tests.

So far tests are quite positive…so we will probably quickly do a proof of concepts with a few users to test if the new Share application can be used as a production service.