Assumptions
- Server topology is simple
- Single tomcat that contains the following
- Content Repository
- Content Repository Search Index / Engine
- Share Application w/ Crafter Studio plugin
- Crafter Studio Form Server
- Crafter rivet Preview Server
- Optional
- Deployer process
- Live Server Process
- Single tomcat that contains the following
Basic Resources
- Base Alfresco install can be found here:
- Community: http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco
- Enterprise: http://alfresco.com/products/ecm/enttrial/?product_module=DM
You must also install the Solr package if you install the ZIP package manually.
- Crafter rivet 2.x binaries can be found here:
- Instructions for building from source can be found here:
Install Alfresco
- Start with base install from Alfresco
- You can use the install kit or the simple zip.

Use of Installer creates installs which are not portable
Note the Alfresco installer will create configuration with hard coded paths to your content stores, JVM and other properties which will make porting your installation to another machine difficult. - If this is production use, please run the day-0 check against the system
- Other configuration considerations

Support International Character sets
We have found it is best to tell the JVM to use a specific characterset rather than defaulting to the system character set. To do this, add the following to catalina.sh in BASEDIR/tomcat/bin.catalina.shJAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"

Support IDE hot debugging / code edit
Add the following to BASEDIR/tomcat/bin/catalina.shJAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
In your IDE configure a remote JVM debugging session and configure it to connect to port 5005.
- You can use the install kit or the simple zip.
- Replace stock Alfresco WAR with Alfresco war that contains Crafter Studio Plugin (or install AMP)
- configure Alfresco repository
BASEDIR/tomcat/shared/classes/alfresco-global.properties
- configure base location for disk based data store
- configure database user, schema, credentials
- It's important to set the hibernate dialect in oder for cstudio's components to work properly
- hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
Install Alfresco Share
- Replace stock Share WAR with Alfresco war that contains Crafter Studio Plugin (or install AMP)
- If you want to use your own domain for your authoring servers (not localhost)
- Create file tomcat/shared/classes/crafter/cstudio/extension/server-context.xml as the following:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <bean name="author-config-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath*:crafter/server-config.properties</value> <value>classpath*:crafter/cstudio/extension/server-config.properties</value> </list> </property> <property name="ignoreUnresolvablePlaceholders" value="true" /> </bean> </beans>
- Set the following in file tomcat/shared/classes/crafter/cstudio/extension/server-config.properties
authoringDomain=.rivetlogic.com
- In the repository, either in your blue-prints for the site or in the site configuration itself you need to modify the environment override files: environment-config.xml
<environment-config> ... <cookie-domain>rivetlogic.com</cookie-domain> ... </environment-config>
- Create file tomcat/shared/classes/crafter/cstudio/extension/server-context.xml as the following:
Install Crafter Studio Form Server
- Add form-server.war to BASEDIR/tomcat/webapps
Configure Preview Server
How Preview Server works
| Preview Server allows authors to see their site updates live prior to publishing. Preview server works by publishing content updates to a preview location on disk where a preview instance of the website engine can consume the content and present the website. By default the disk location where preview content is store is located at: ALFRESCO_ROOT/preview-content/data/wem-projects/{cookieSiteName}/{cookieSiteName}/work-area
|
|
Setup
- Copy trunk/cengine/cengine-war/target/ROOT.war into tomcat/webapps.
- If you load the application in your browser at this point you will see the "Default" website
- Goto http://localhost:8080/
- Observer the following web page (TODO update image when site is done)

- You must now configure your preview server to look at preview content location on disk. By default, Crafter Studio creates preview content in the ALFRESCO_ROOT/tomcat/preview-content folder.
You can use the Crafter Studio's own ROOT.war as the preview server or deploy this ROOT.war to a separate Tomcat to host the preview. For either cases, in tomcat/shared/classes, create directories crafter/cengine/extension.
- To use the Crafter Studio's own Tomcat for preview, create file tomcat/shared/classes/crafter/cengine/extension/server-context.xml with the following:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <import resource="classpath*:crafter/mode-preview-server.xml" /> </beans>
- To use a separate Tomcat instance for preview:
- Create file tomcat/shared/classes/crafter/cengine/extension/server-context.xml with the following:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <import resource="classpath*:crafter/mode-preview-server.xml" /> <bean name="crafterEngineProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath*:crafter/server-config.properties</value> <value>classpath*:crafter/server-config-mode-preview.properties</value> <value>classpath*:crafter/cengine/extension/server-config.properties</value> </list> </property> <property name="ignoreUnresolvablePlaceholders" value="true" /> </bean> </beans>
- Set the following in file tomcat/shared/classes/crafter/cengine/extension/server-config.properties
crafter.core.store.filesystem.rootFolder.path=THE PATH TO THE PREVIEW-CONTENT FOLDER/wem-projects/{cookieSiteName}/{cookieSiteName}/work-area
- Create file tomcat/shared/classes/crafter/cengine/extension/server-context.xml with the following:
- To use the Crafter Studio's own Tomcat for preview, create file tomcat/shared/classes/crafter/cengine/extension/server-context.xml with the following:
- Restart Tomcat.
- Log in to share and click on one of your sites from the sites dashlet (if you do not have a site, see: wiki.rivetlogic.com/display/Crafter/New+install#Newinstall-Createasite)
- Open the site content dropdown in the toolbar and then click on pages, and then the home page
- the browser will refresh http://localhost:8080/ again to view the preview content. The site should no longer be the default site, but whatever site is stored on disk at the location you configured:

- You should also see an authoring toolbar – if you do not:
- Are you logged in to share?
- Are you running Alfresco share on port 8080? If Not:
- add the following line to tomcat/shared/classes/_crafter/cengine/extension/server-config.propertiescrafter.authoring.baseUrl=http://localhost:YOUR-PORTS/share
Create a site
- log in to share
- customize dashboard
- add Crafter Rivet My Sites Dashlet to dashboard

- Click Create Site
- Choose a site name
- Choose a short name for the site
- Choose a blue-print for the site. A blue print is a "Template" for a website including content / presentation templates and configuration. You can create as many sites as you want based on a blue-print.
Optional: Configure deployment agent
The "Deployment Agent" is also known as "Publishing Receiver". On the server you wish to deploy to:
- Create a folder to house the deployment agent EX: /opt/crafter/deploy
- By default the server will listen for HTTP requests on port 9191 and will require the password "admin"
- to customize deployment agent properties and targets, change the following files:
- conf/custom-receiver-context.xml.sample to conf/custom-receiver-context.xml
- conf/custom-shutdown-context.xml.sample to conf/custom-shutdown-context.xml
- conf/custom-receiver.properties.sample to conf/custom-receiver.properties
conf/custom-receiver.properties
receiver.port:9191 reciever.password=admin
- to customize deployment agent properties and targets, change the following files:
- To configure or override the deployment targets, edit SampleTarget3 in conf/custom-receiver-context.xml or add a new target.
conf/custom-receiver-context.xml
<bean id="SampleTarget3" class="org.rivetlogic.cstudio.publishing.target.PublishingTarget" init-method="register"> <property name="name"><value>sample3</value></property> <property name="manager" ref="TargetManager"/> <property name="postProcessors"> <list> <ref bean="SamplePostProcessor"/> </list> </property> <property name="params"> <map> <entry key="root"><value>target/sample3</value></entry> </map> </property> </bean>- name property is the key to find a deployment target from authoring end.
- set the deployment target location by updating root property value.
- add custom post-deployment processors. Custom post-deployment processors must implement org.rivetlogic.cstudio.publishing.processor.PublishingProcessor interface.
base-context.xml
<bean id="SamplePostProcessor" class="org.rivetlogic.cstudio.publishing.processor.SamplePostProcessor"/> - start the receiver by running start-deploy-agent.sh (Unix and Mac) or start-deploy-agent.bat (Windows)
Optional: Configure live server
Tomcat Tips
Turning up logging
in TOMCAT/conf/logging.properties
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
