Content Delivery and Deployment[ 254 ] 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
Trang 1Content Delivery and Deployment
[ 252 ]
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
Trang 2Chapter 7
[ 253 ]
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 flag (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
1 Navigate to Company Home | Web Projects | <web project name>.
2 Select Edit Web Project Settings from the Action menu.
3 Click on Next to reach the Configure Deployment Servers window.
4 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
5 Click on the Add button and then the Finish button.
6 Now go to that WCM project's Staging Sandbox and deploy a snapshot to the new DM target
Download from Wow! eBook <www.wowebook.com>
Trang 3Content Delivery and Deployment
[ 254 ]
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 chapter we learned:
• Alfresco provides both static as well as dynamic delivery models
• You can configure the Alfresco stage environment to deploy the selective content to external live servers and test servers
• You can also set up the web project for auto deployment wherein the content
is automatically deployed to live servers upon workflow approval
Trang 4Managing Multiple Websites
Using WCM This chapter covers information about managing multiple web projects using one installation of Alfresco WCM This means you can leverage a single instance of
Alfresco WCM to stage and manage many websites This chapter focuses on
reusing assets such as images, forms, and workflows across multiple web projects This chapter also introduces you to a concept called "layered folder", where you could logically use a folder in many websites without copying the content in
multiple places
By the end of this chapter, you will have learned how to:
• Configure and use multiple web projects
• Reuse forms, templates, and workflows across many websites
• Use a single set of media assets across multilingual websites
• Set up and use layered folders
Download from Wow! eBook <www.wowebook.com>
Trang 5Managing Multiple Websites Using WCM
[ 256 ]
Multiple web projects
Within a single instance of Alfresco you can create as many web projects as you can
You can have common assets shared across many of these web projects Once created, you can use the same web forms, templates, workflows, and deployment targets across multiple projects You can also have the same set of users managing
these multiple sites For example, a user could be a Content Manager on Web Project1 and Content Reviewer on Web Project2.
Reusing forms, templates, and workflows
When creating a new project or editing the web project settings, you will notice the list of all of the available web forms Basically, the forms that are defined in
Company Home | Data Dictionary | Web Forms are available to all of the web
projects along with templates and workflows associated with those forms
Trang 6Chapter 8
[ 257 ]
You can add the selected web forms to a project by clicking on the Add to List
button, as shown in the following screenshot:
Once a web form is added to a web project, you can overwrite the form details such as the output filename pattern, you can configure the workflow locally as per the web project approval process, and you can also configure the output template settings as shown in the following screenshot These are very flexible ways of
defining the forms and workflows globally, and overwriting them locally:
Download from Wow! eBook <www.wowebook.com>
Trang 7Managing Multiple Websites Using WCM
[ 258 ]
Using a web project as a template
In some scenarios you might want to create web projects that are similar in nature For example, marketing websites for each product might have similar features, and they might be managed by the same set of people following similar workflow approval processes The customer extranet websites for each of your customers might fall into this category
In such scenarios using a typical website as a template to recreate many such
websites will not only save you time, but also sets a well-defined process in the organization You can select such a web project as a template, as shown in the following screenshot:
Now while creating a similar website, you can create a new web project based on an existing template web project The Staging Sandbox structure, web forms, workflow, and users will be copied from the selected web project This must be done while creating a new web project, as shown in the following screenshot:
Trang 8Chapter 8
[ 259 ]
Once a new web project is created, you can always overwrite the existing
configuration You can also create new forms, workflows, and structures as needed
Managing multiple websites using a
single web project
You can also use a single web project to have multiple websites You can group all
of the assets related to a website into a folder in a web project Hence, a web project could have many such folders and each one could be interpreted and managed as
a website
This approach is better when compared to having a separate web project for each website if you have the following requirements:
• All of the content in these websites have similar workflow approval processes
• The content is managed by the same set of people
• All of the websites have a similar look and feel
• The deployment (going live) to the product server or servers for all of these websites happens at the same time
Basically, this is good for small to medium websites where majority of the content
is static
Setting up multiple URLs on the target server
One scenario could be deploying all of the folders to a specific target server On that target server you could use web server proxy to have a specific URL pointing to a specific folder, as shown in the following diagram:
Download from Wow! eBook <www.wowebook.com>
Trang 9Managing Multiple Websites Using WCM
[ 260 ]
Setting up FSR for each target website
Another scenario could be deploying selected folders to a specific live server as shown in the following diagram This can be done by using the Source Path and Excludes fields of deployment, while configuring the FSR on a stage server Refer to
Chapter 7, Content Delivery and Deployment for more details on deployment:
Creating many webapp folders
Another way of creating multiple websites within a web project is to use multiple webapp folders
The webapp folder is the web application folder used in application servers such as Tomcat or JBoss A web application exists as a structured hierarchy of directories The root of this hierarchy serves as a root for serving files that are part of this context
For example, for a web application located at site2 in a web server, the index.html file located at the base of the web application hierarchy can be served to satisfy a request to http://some_url/site2/index.html
In Alfresco WCM, each web project has only one web application (webapp) folder
and it is named as ROOT To create another webapp folder for a specific web project,
navigate to the Actions drop-down menu and click on Create Webapp Folder:
Trang 10Chapter 8
[ 261 ]
You can also change the default web application Click on Edit Web Project Settings from the Actions drop-down menu and change the setting in the Default Webapp
field as shown in the following screenshot:
Layered folders
Large enterprises usually run global operations In order to have effective services, sales and marketing, they usually have many regional websites Most often the information in these websites is 80 percent common (global) and 20 percent different (local) However, enterprises end up replicating or duplicating the 80 percent of such common information in each and every regional website
Let's consider a scenario where an enterprise is having two websites, one for USA-based customers and the other one for UK-USA-based customers with the pages and files
as shown in the following image:
Download from Wow! eBook <www.wowebook.com>