New install

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

Basic Resources

Install Alfresco

  1. Start with base install from Alfresco
    1. 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.
    2. If this is production use, please run the day-0 check against the system
    3. 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.sh

      JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"

      Support IDE hot debugging / code edit
      Add the following to BASEDIR/tomcat/bin/catalina.sh

      JAVA_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.

  2. Replace stock Alfresco WAR with Alfresco war that contains Crafter Studio Plugin (or install AMP)
  3. configure Alfresco repository
      BASEDIR/tomcat/shared/classes/alfresco-global.properties
    
    1. configure base location for disk based data store
    2. configure database user, schema, credentials
    3. It's important to set the hibernate dialect in oder for cstudio's components to work properly
      1. hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

Install Alfresco Share

  1. Replace stock Share WAR with Alfresco war that contains Crafter Studio Plugin (or install AMP)
  2. If you want to use your own domain for your authoring servers (not localhost)
    1. 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>
    2. Set the following in file tomcat/shared/classes/crafter/cstudio/extension/server-config.properties
      authoringDomain=.rivetlogic.com
    3. 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>
      

Install Crafter Studio Form Server

  1. 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

  1. Copy trunk/cengine/cengine-war/target/ROOT.war into tomcat/webapps.
  2. If you load the application in your browser at this point you will see the "Default" website
    1. Goto http://localhost:8080/
    2. Observer the following web page (TODO update image when site is done)
  3. 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.

    1. 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>


    2. To use a separate Tomcat instance for preview:
      1. 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>
        
      2. Set the following in file tomcat/shared/classes/crafter/cengine/extension/server-config.properties
      3. crafter.core.store.filesystem.rootFolder.path=THE PATH TO THE PREVIEW-CONTENT FOLDER/wem-projects/{cookieSiteName}/{cookieSiteName}/work-area
  4. Restart Tomcat. 
  5. 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)
  6. Open the site content dropdown in the toolbar and then click on pages, and then the home page
  7. 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:
  8. You should also see an authoring toolbar – if you do not:
    1. Are you logged in to share?
    2. Are you running Alfresco share on port 8080? If Not:
    3. add the following line to tomcat/shared/classes/_crafter/cengine/extension/server-config.propertiescrafter.authoring.baseUrl=http://localhost:YOUR-PORTS/share

Create a site

  1. log in to share
  2. customize dashboard
  3. add Crafter Rivet My Sites Dashlet to dashboard
  4. Click Create Site
    1. Choose a site name
    2. Choose a short name for the site
    3. 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:

  1. Create a folder to house the deployment agent EX: /opt/crafter/deploy
  2. By default the server will listen for HTTP requests on port 9191 and will require the password "admin"
    1. 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
        
  3. 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>
    
    1. name property is the key to find a deployment target from authoring end.
    2. set the deployment target location by updating root property value.
    3. 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"/>
      
    4. 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

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.