Alfresco Content Services (ACS) can scale from a single host that might include Alfresco Share, ACS (repository), and the Alfresco Search Service to multiple hosts with web applications installed on separate servers with redundancy and clustering.
One of these types of installations utilizes the Alfresco Index Engine (called Alfresco Search and Insight Engine in Alfresco 6.1). This has a read-only version of Alfresco Content Services installed on the same server as Alfresco Search Services (Solr). Alfresco Search Services indexes content by querying Alfresco for updates, retrieving metadata and having Alfresco potentially transform content to text, so that it may be full text indexed. These operations add additional load to the Alfresco Content Services host, so installing Alfresco locally, in read-only mode mitigates that additional overhead.
Before I go too much farther, I should note that the Alfresco Index Engine (aka Alfresco Search and Insight Engine) requires additional licensing and is only available for ACS Enterprise Edition.
Now, the short question is how do I install the read-only copy of Alfresco Content Services? The easy answer is the same way as you install Alfresco Content Services normally, but do not install share, and make some changes in your alfresco-global.properties file.
The following lists the alfresco-global.property changes that are suggested for read-only. Please note that these settings are tested against Alfresco 5.2.4. Some of them may be different with Alfresco 6.x.
Set repository to read-only
The basic configuration to put the repository in read-only mode.
server.allowWrite=false
Disable out of the box out-of-the-box jobs that don’t need to be run
Make sure to disable any Alfresco jobs that don’t need to be run. This is especially true if those jobs try and update the repository. They won’t be able to update the repository, since you’ve made the repository read-only and you’ll see errors in your log file for no reason. One of these that I disable is listed below. There is not always a setting to turn the job off, so quite often, the way to do it is to set a cron date way in the future for when the job runs (e.g. 2099).
system.fixedACLsUpdater.cronExpression=* * * * * ? 2099
The Alfresco scheduled jobs documentation lists a few of the jobs, but be sure to look at the scheduled-jobs-context.xml to get a more complete picture of the jobs that you might want to turn off.
Turn off clustering
In the simpler case, if you are not using a sharded index, clustering should be turned off as this Alfresco instance isn’t doing updates that require it. The webscripts that SOLR uses to index content are specifically setup to not rely on cached data. Caching is what you get with clustering enabled. More information is available around setup with sharded indexes in the Alfresco Reference Architecture (see page 14 on sharded indexes).
alfresco.cluster.enabled=false
Disable services that aren’t used
As is true with any Alfresco instance, you should disable services that aren’t needed, so that Alfresco runs more efficiently. Below are some of the services that I like to turn off. Alfresco Documentation lists many features that can be disabled.
# turn off cifs cifs.enabled=false # turn off external sync with cloud sync.mode=OFF syncService.mode=OFF # share activity feed activities.feed.notifier.enabled=false # turn off webdav system.webdav.servlet.enabled=false
Do not set mail
As you most likely don’t need to send/receive emails, make sure not to set it.
Make sure to not include syncing LDAP/AD, but configure authentication if needed
You don’t want to have the synchronization job running here if you are synchronizing users and groups from Active Directory or LDAP.
Some customers want their administrators to logon with their own credentials, so you might want to configure your authentication chain in case you want to logon to the Alfresco admin console or call any webscripts that require authentication and you’d like to use your AD credentials and not the admin user.
authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap-ad ntlm.authentication.sso.enabled=false ldap.authentication.allowGuestLogin=false ldap.authentication.userNameFormat=%s@alfrescotest.com ldap.authentication.java.naming.provider.url=ldap://alfrescotest.com:389 ldap.synchronization.active= false synchronization.import.cron=* * * * * ? 2099
DO install customizations (especially model updates)
It’s important to remember to install your customizations. This is especially true if your customizations include content model updates. Since, the main purpose of this read-only Alfresco is about providing Alfresco Search Services a faster way to index, it’s necessary that this Alfresco instance know about your content model.
Do not run any custom jobs
If you added custom jobs as part of your customizations, remember to disable them.
Disable any bootstrap that is not necessary
On startup, Alfresco will automatically update the database. As this isn’t needed in your read-only version, disable it. Also, you may want to disable any custom bootstrapping you have as it will most likely fail since your repository is read-only.
db.schema.update=false
One final thought. If you are upgrading ACS (even a hotfix) make sure to start your read-only ACS instances after the rolling start of any of your normal read-write ACS instances.
Hopefully, this should provide a good starting point for setting up configuration for a read-only instance of Alfresco. For additional information on your integrations, contact us today.