Thursday, July 28, 2011

Manually configuring a Tridion 2011 .NET Content Deployer Instance

I'm a big fan of doing "manual" installations of the Tridion Content Delivery layer (be it for .NET or Java, as is probably clear here) and I had not got around for a while to do a complete .NET setup so I could document it somehow.

Until today.

Please note: the steps below are for a 64-bit server. On a 32 bit server you need a couple more files, copied from the x86 installation folder.

These are the steps taken:
Get your files right:
The Hotfix rollup #1 shipped with quite a few updated jar files, but somehow not all files are shipped (cd_tcdl, cd_dynamic and probably a few others are missing, and you need the originals from the 2011 installer). Solution: copy the updated jar files from the hotfix rollup _over_ the files shipped with 2011.

Create your HTTP deployer website:
This is the basic structure for the site:
In the root, ( / ) drop the httpupload.aspx
In /bin, drop the following 4 dlls:
  • netrtsn.dll
  • Tridion.ContentDelivery.Configuration.dll
  • Tridion.ContentDelivery.dll
  • xmogrt.dll
in /bin/config, place the following configuration files (more details on what goes in these files later):
  • cd_deployer_conf.xml
  • cd_storage_conf.xml
  • logback.xml
in /bin/lib, drop a s***load of jar files...
All jar files from [ContentDeliveryInstall]/java/third-party-lib
The following files from [ContentDeliveryInstall]/java/lib:
  • cd_broker.jar
  • cd_cache.jar
  • cd_core.jar
  • cd_datalayer.jar
  • cd_deployer.jar
  • cd_linking.jar
  • cd_model.jar
  • cd_tcdl.jar
  • cd_upload.jar
And, last but certainly not least, add your jdbc (sqljdbc or ojdbc) driver to this folder.


Obviously you must change the settings in these files to match your server configuration (sorry if it doesn't display very well on this blog, copy/pasting should work).

<?xml version="1.0" encoding="UTF-8"?>
<!-- The Tridion Content Distributor Deployer configuration specifies all
    configuration values required to receive and deploy content to a delivery system. -->
<Deployer Version="6.0"
        <Processor Action="Deploy" 
            <Module Type="SchemaDeploy" 
            <Module Type="PageDeploy" 
                 <Transformer Class="com.tridion.deployer.TCDLTransformer"/>
            <Module Type="BinaryDeploy" 
            <Module Type="ComponentDeploy" 
            <Module Type="TemplateDeploy" 
            <Module Type="PublicationDeploy" 
            <Module Type="TaxonomyDeploy" 

            <Module Type="ComponentPresentationDeploy"
                <Transformer Class="com.tridion.deployer.TCDLTransformer"/>
            <Module Type="StructureGroupDeploy" 
        <Processor Action="Undeploy" 
            <Module Type="PageUndeploy" 
            <Module Type="ComponentPresentationUndeploy" 
            <Module Type="TaxonomyUndeploy" 
            <Module Type="StructureGroupUndeploy" 
        <Location Path="c:\tridion\incoming" 
   WindowSize="20" Workers="10" Cleanup="true" Interval="2s"/>
    <HTTPSReceiver MaxSize="10000000" 
  Location="C:\tridion\incoming" InProcessDeploy="true"/>
     <License Location="c:/Program Files(x86)/Tridion/config/cd_licenses.xml"/>
            <!-- Default code generation will always be targetted towards the use of tag libraries and
                  server controls. Uncomment these lines to drop that behaviour -->
            <Property Name="" Value="controls"/>
            <Property Name="" Value="tags"/>


<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="6.0"
    <ObjectCache Enabled="false">
      <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
        <Param Name="MemSize" Value="16mb"/>
        <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
      <Storage Type="persistence" Id="sqlserver" dialect="MSSQL" Class="">
        <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
        <DataSource Class="">
          <Property Name="serverName" Value="localhost" />
          <Property Name="portNumber" Value="1433" />
          <Property Name="databaseName" Value="Tridion_Broker" />
          <Property Name="user" Value="TridionBrokerUser" />
          <Property Name="password" Value="tridion" />
      <Storage Type="filesystem" Class="" Id="iisFile">
        <Root Path="c:\inetpub\wwwroot" />
  <ItemTypes defaultStorageId="sqlserver" cached="false">
    <Item typeMapping="Page" cached="false" storageId="iisFile"/>
    <Item typeMapping="Binary" cached="false" storageId="iisFile"/>
  <License Location="c:/Program Files (x86)/Tridion/config/cd_licenses.xml"/>

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
    <!-- Properties -->
    <property name="log.pattern" value="%date %-5level %logger{0} - %message%n"/>
    <property name="log.history" value="7"/>
    <property name="log.folder" value="c:/tridion/log/website"/>
    <property name="log.level" value="debug"/>

    <!-- Appenders -->
    <appender name="rollingCoreLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

    <!-- Loggers -->
    <logger name="com.tridion" level="${log.level}"/>
    <root level="OFF">
        <appender-ref ref="rollingCoreLog"/>

Now you have to create a website in IIS that uses this folder as its root folder. If using 2008 R2 you may want to change the application pool identity to Network Service, and you will have to give this user WRITE permissions on the filesystem storage location, as specified in cd_storage_conf.

And that's pretty much it. Configure a Publication Target that uses your new website:/httpupload.aspx and you're ready to go.

Last tip: If you need to publish large packages (think > 4 MB or whatever is the low limit for an IIS POST by default) create a web.config for this website and put the following inside:

<?xml version="1.0"?>
    <compilation debug="false" targetFramework="4.0" />
    <httpRuntime maxRequestLength="2097151"
        <requestLimits maxAllowedContentLength="2000000000" />


Neil said...

Would this HTTP(S) deployer be your preferred option over FTP all things considered?

Nuno said...

For my own test/dev environments: yes, since it gives me the flexibility to add more deployers on the same machine with different configurations.

In production environments, it mostly depends on the security requirements. FTP or SCP data transfers will in principle be faster, but they're not as "firewall-friendly" as HTTP(S), so I end up seeing a lot of HTTP deployers in large companies.

I guess in the end it is really up to your requirements. As said above, this is my preferred deployer for my own environments.

Nivlong said...

I've seen setups with previous versions of Tridion (R5.3) use publishing via the local file system on internal servers and HTTP for production (into the fire-walled DMZ). The rationale indeed was security.

There may be a slight maintenance trade-off with mixing the publishing protocol methods.

The craziest Tridion "legend" I've heard of was deployment by van and CD. It was actually by file system, but a courier would drive the fan to the remote destination with compact discs in hand and load the publishing transaction by dropping them off in the incoming folder. Myth? Possibly, but possible with the right settings.

Nivlong said...

One more tip on the license files and configs, especially for Tridion customers -- be careful not to publish (.NET deploy) license and/or config files from your local machine and/or development server to other environments.

You may have a separate content delivery (CD) license from the CMS if you're just developing for .NET websites.

RobertC said...

Also need file 'Tridion.ContentDelivery.Interop' from the folder 'Content Delivery\roles\upload\dotNET\dll\x86_64'

Lionel Stevens said...

We need to provide it the necessary collections and settings to run as a tridion http example or material deployer that can agree to information we post to it.

Shafaqat Ali said...


I have configured IIS deployer and i can access my httpupload.aspx page in browser, logging says "Deployer Started", that means deployer is configured correctly. When i publish my page through CMS, it keeps on showing "Waiting for publish", Content publishing service is also running, nothing logged in event viewer, nothing logged in Tridion logging file.

Can anybody help?

Unknown said...

Another Deployer Configuration Tip
To grant the deployer write access to the target website with PowerShell

$IncommingPath = "F:\WebContent"
$Acl = Get-Acl $IncommingPath
$Ar = New-Object"IIS AppPool\HTTPUpload_Live","FullControl","ContainerInherit, ObjectInherit", "None", "Allow")
Set-Acl $IncommingPath $Acl