Your message has been sent.
This article has been saved to your account.
Go to my account
This article has been emailed to your Kindle.
Send this article
Complete the form below to send this article, The Deployment Feature of Alfresco 3, to a friend (or to yourself). We will never share your details (or your friend's) with anyone. For more information, read our Privacy Policy.
Alfresco offers true Web Content Management (WCM) by providing an open source alternative to expensive proprietary systems such as Microsoft SharePoint, Interwoven, and IBM Content Manager. Alfresco WCM is a good fit for the customers who are also looking for cost savings.
The previous article introduced you to the content delivery feature of Alfresco.
This article by Munwar Shariff, co-author of the book Alfresco 3 Web Content Management, introduces you to the deployment feature of Alfresco. It focuses on the auto deployment feature where the content can be scheduled to be delivered to the production servers automatically.
By the end of this article you will have learned how to:
- Set up the process for auto deployment
- Deploy to a test server
- Deploy directly from a workflow
(For more resources on Alfresco 3, see here.)
Alfresco WCM staging has an autodeploy option in its default workflow, allowing end users, at the time of submit, to enforce automatic deployment of approved changes directly to the live website without having to manually initiate deployment.
The Submit Items window has an Auto Deploy checkbox, as shown in the following screenshot:

Upon approval, if the auto deploy option is on, the workflow will perform a deployment to those live servers that have the Include In Auto Deploy option enabled. For more details about enabling this option, refer the Configuring a web project to use FSR section in the previous article.
Deploying to a test server
The Test Server Deployment functionality provides in-context preview by allowing a contributor to deploy their content to an external target (either an ASR or FSR), from which it can be rendered by any web application technology that can either read from a filesystem or access an ASR via HTTP (which includes all of the major web application technologies in use today, including Java, .NET, PHP, Ruby, Python, CGI, and so on).
Once a test server has been deployed to, it is allocated to the user or workflow that performed the deployment. Once the user or workflow has finished with the test server it is released and returned to the pool of test servers. This happens automatically in the case of a workflow sandbox and manually via a UI action for User Sandboxes.
The following process has to be followed to use the test server:
- Set up a test server pool.
- Deploy to a test server.
- Preview the content.
- Release the test server.
Setting up a test server pool
The following are the steps to configure a Web Project to use an FSR.
- Navigate to Company Home Web Projects | <web project name>|.
- Select the Edit Web Project Settings from the Action menu.
- Click on Next to reach the Configure Deployment Servers window.
- Click on the Add Deployment Receiver link as shown in the following screenshot:

- For Type, select Test Server, specify the Display Name, Host name, and the Target Name. Click on the Add button.
Similarly configure another test server, say with "cignex-test2" as the target.
Ensure that the FSR is running on the test server. The targets "cignex-test1" and "cignex-test2" are configured in FSR.
Deploy to a test server
Let's say, you as a content manager would like to deploy your User Sandbox to the test server for testing purposes.
Go to your User Sandbox and from the More Actions menu choose Deploy as shown in the following screenshot:

The Deploy Sandbox window displays, listing all of the unallocated test servers as shown in the next screenshot. Select a test server to use (only one test server can be allocated to a sandbox at a time), and click on OK. The Monitor Deployment information displays once the deployment completes. If an error occurs, the reason for the error is shown under the Deployment Failed message:

(For more resources on Alfresco 3, see here.)
Preview the content
You can preview the content deployed on the test server either using Apache or application servers such as Tomcat or PHP, as per your FSR configuration settings.
Release the test server
Once a test server has been deployed to, it is allocated to the user or workflow that performed the "Deploy".
The administrator or content manager can see what test server is allocated to which sandbox by going to the Edit Web Project Wizard and viewing the Allocated field. Hovering over the Yes label will reveal the actual store name as a tooltip.

Test servers allocated to User Sandboxes can be released by the owner of the sandbox, the administrator, or the content manager. The Release Server option is available in the More Actions menu as shown in the following screenshot. A user can also view the deployment history by clicking on the View Deployments option available in the More Actions menu:

Test servers allocated to review sandboxes are automatically released by the system upon completion of the workflow. Once the user or workflow has finished with the test server, it is released and returned to the pool of test servers.
Deploying from workflow
When you have a test server configured, you can deploy the content to that test server from the workflow process, similar to the way you deployed it from User's Sandbox. Refer to the following screenshot. You don't have to explicitly release the test server. Test servers allocated to the workflow review sandboxes are automatically released by the system upon completion of the workflow:

Deploying from Alfresco WCM to DM repository
Starting from Alfresco 3.3 version onwards, the WCM deployment facilities have been enhanced to add an additional deployment target. This additional deployment receiver allows the WCM content, authored and stored in Staging Sandbox, to be deployed to local and remote Alfresco repositories (Alfresco DM) as shown in the following figure.
The DM Deployment Target receives a deployment from an Alfresco WCM authoring environment and puts the content into the workspace spaces store where it can be used to support a dynamic website. This feature provides greater flexibility in moving an approved staging content from WCM to DM (Document Management). The Alfresco Deployment Receiver is configured as a sub-system, and a new Data Dictionary folder Web Deployed is configured by default as the deployment target.

Setting up Alfresco DM as the deployment target
In order to set up Alfresco DM as the deployment target, you will have to edit the global properties file and then restart Alfresco.
Go to the /tomcat/shared/classes/ folder, open the alfresco-global.properties file, and add the following two lines:
deployment.dmr.consolidate=true
deployment.dmr.name=alfresco
Now restart Alfresco to activate the deployment target.
The DM Deployment Target is a target that is registered with the repository-based WCM Deployment Engine. By default, its target name is "alfresco". Although of course, this can be changed through the configuration deployment.dmr.name.
The authoring environment for a WCM web project consists of a set of related AVM stores. The different stores have a naming convention for their store names. The consolidate fag (deployment.dmr.name=true) says to deploy all of these related stores to the same location. If it is turned off by setting deployment.dmr.consolidate to false, there will be a separate path for each store and content will be duplicated in the DM store.
Deploying to DM
Go to the Alfresco WCM web project and configure the DM deployment receiver. The following are the steps to configure the DM deployment receiver from Alfresco WCM Project.
- Navigate to Company Home | Web Projects | <web project name>.
- Select Edit Web Project Settings from the Action menu.
- Click on Next to reach the Configure Deployment Servers window.
- Click on the Add Deployment Receiver link and fill up the following values in the form:
Type = Live Server
Display Name = [Some Name]
Transport Name = default
Host = [localhost for local server or enter host name or IP address for external server]
Port = 50500
Username = Target Alfresco DM username
Password = Target Alfresco DM password
Target Name = alfresco - Click on the Add button and then the Finish button.
- Now go to that WCM project's Staging Sandbox and deploy a snapshot to the new DM target.
If you log in to Target Alfresco DM and go to the Company Home space, you will notice a new project folder in the Company Home | Web Deployed space as shown in the following screenshot:

Summary
In this article we took a look at the Alfresco feature. We also saw how to set up the web project for auto deployment wherein the content is automatically deployed to live servers upon workflow approval.
Further resources on this subject:
- Configuring WCM Workflows [article]
- Content Delivery in Alfresco 3 [article]
- Creating a Custom WCM Workflow for a Group using Alfresco 3 [article]
About the Author :
Munwar Shariff
Munwar Shariff is the CTO and EVP of EMEA at CIGNEX. CIGNEX is the leading provider of open source Enterprise Content Management (ECM) solutions for businesses and government agencies. He has served as the chief architect and manager of engineering teams for 19 years in the areas of business application software, Internet applications, and mobile commerce applications for customers world-wide. He is an expert in Content Management Systems (CMS). Since co-founding CIGNEX in late 2000, he has successfully delivered more than 130 CMS applications using various open source technologies. He has written a number of articles on open source CMS. He is an experienced trainer, and a frequent speaker at conferences related to this topic. Munwar earned his MS in Digital Electronics and Advanced Communications from REC , Surathkal, India. He has authored three technical books on open source CMS, Alfresco3 ECM, Implementing Alfresco, and Plonelive.



Post new comment