Customizing Alfresco: how to
In our last post, we talked about how to install and configure Alfresco on an AWS instance. We also learned how to create a simple site and upload documents. But customizing Alfresco can greatly widen your administration and accessibility options, and take you way beyond simple document sharing. In this post, we will discover how to perform an unattended installation, how to integrate Amazon S3 content storage, and how to access Alfresco-based content using mobile apps and desktop clients.
Alfresco Community and Enterprise editions can be installed using Bitrock technology. This helps automate the installation process, allowing for scripted deployments. As a part of the unattended installation procedure, we can either pass command line arguments directly to the Alfresco installer or create an option file with all our requirements. The option file is, in turn, passed along to the installer, allowing us to enable or disable components or specify DB names, users or passwords.
Any setting which is available through your GUI or command line interfaces is also available through an option file. To fetch a list of all available options, pass the –help argument to the installer:
# sudo ./alfresco-community-5.0.c-installer-linux-x64.bin --help
Here’s a sample option file:
mode=unattended components=javaalfresco,alfrescosharepoint,alfrescowcmqs,libreofficecomponent disable-components=postgres # Use JDBC settings for an existing database jdbc_url=jdbc:postgresql://localhost/alfresco jdbc_driver=org.postgresql.Driver jdbc_database=alfresco jdbc_username=alfresco jdbc_password=alfresco # Install location prefix=/opt/alfresco # Set Alfresco Administrator Password alfresco_admin_password=admin123 # Install init scripts baseunixservice_install_as_service=1
This option file can be saved with any name – say, “option_file” – and can be passed as a command line argument to Alfresco installer.
# sudo ./alfresco-community-5.0.c-installer-linux-x64.bin --optionfile option_file
Customizing Alfresco with Amazon S3 Connector
Alfresco offers multiple modules to help us integrate with other services. Alfresco’s Amazon S3 Connector module, for instance, allows us to store all uploaded documents in an Amazon S3 bucket, providing storage that’s highly durable and far less expensive than using an Amazon EBS volume. It also helps us to decouple storage from our Alfresco share, simplifying horizontal scaling.
According to Alfresco’s documentation:
”Using an Alfresco Module Package, the connector supplies a new content store which replaces the default file system-based implementation for the standard and deleted content stores. The content store implementation is responsible for reading and writing content streams using the S3 API, however, in order to improve performance a local Caching Content Store is used which uses the local disk to cache recently-used content items.”
To install the Amazon S3 Connector, you’ll need to download the module from their Documentation page. Once downloaded, follow these configuration steps:
Step 1: Move the downloaded AMP (Alfresco Module Package) file to the /opt/alfresco/amps folder.
# cp alfresco-s3-connector.amp /opt/alfresco/amps/
Step 2: Go to the /opt/alfresco/bin folder and locate the file apply_amps.sh.
Step 3: Execute apply_amps.sh (you might need to set the file as executable first: chmod +x apply_amps.sh):
This will install the S3 connector module.
Step 4: Once this is done, we’ll need to verify that the module was successfully installed:
# java -jar alfresco-mmt.jar list /opt/alfresco/tomcat/webapps/alfresco.war
Step 5: Now, add the following three lines of integration details to the alfresco-global.properties file (/opt/alfresco/tomcat/shared/classes/alfresco-global.properties)
### S3 Connector Details ### s3.accessKey=<your-access-key> s3.secretKey=<your-secret-access-key> s3.bucketName=<S3-Bucket-Name>
Note: configuration might require single you to enclose your keys in either single or double quotes.
That’s it. Amazon S3 Connector for Alfresco is now configured and ready for use. Once we upload content to our Alfresco share, all content will be saved into our S3 Bucket.
Customizing Alfresco: Mobile Apps and Addons
Alfresco offers iOS and Android mobile apps for accessing our Alfresco share. These apps are very helpful when we want to quickly review a document and pass along feedback.
Apart from Alfresco mobile apps, Alfresco also offers addons, a place to find customizations, extensions and related projects for your Alfresco installations. Alfresco Desktop sync is a desktop client that allows us to sync all our Alfresco documents directly to our local system. Think of this as similar to Dropbox or Google Drive desktop clients. Alfresco Desktop Clients are supported on Windows and OS X operating systems.
Windows Easy Sync – Desktop Synchronization for Alfresco is another addon that acts as an embedded Alfresco Explorer for browsing the repository contents. Users can view, download, create, edit, move, or delete Alfresco documents or spaces directly on the server. The “Edit with WebDav” feature allows online editing of Alfresco contents with local client editors.
The possible options for customizing Alfresco through available integrations/add-ons/modules make for a very powerful enterprise content management system, allowing us to easily collaborate with a higher degree of control. In future blogposts, we will learn more about Alfresco’s internal workings.