Spot the Difference: Deploying between SDL Tridion Environments

Maintaining a best practice SDL Tridion implementation, means maintaining multiple environments, and keeping them synchronized.

If you are starting from scratch, or have been "in control" for a while, then a good process and organization make synchronization easy. At Building Blocks we strive to make it seamless, and are always working to improve our continuous integration processes, to make environment synchronization a given, not a chore.

However, life is not always so easy. What about inherited solutions, out of sync environments, or delayed projects that have been overlapped by others. Keeping environments in sync in these situations can be a headache. You can not simply rely on Content Porter, and moving everything from Development to the Production environment; bad practices mean you may overwrite important changes. For example, fixes may have been applied directly on Production and never taken backwards to Development.

Recently I had just such a situation. I had inherited a design refresh, that needed to be taken from Development to Production, but I could not be confident that Development was inline with Production. This meant that I needed to compare the contents of Production with the contents of Development. Where necessary moving updates in Production back to Development for testing, before compiling a deployment package to move back to Production.

I thought, how would I achieve this with a none-Tridion project? I would use tools; whether it be source control or differencing and merging software, I would not do it manually. It would be too time consuming!

Then a light bulb moment. If I was to map both the Development and Production Tridion environments as drives via WebDav, I could use WinMerge (or preferred differencing software) to locate the inconsistencies.

Here is a quick guide on doing just that.

Mapping Tridion to WebDav

First you will need to map each of your Tridion environments as a drive, to do this simply:

  1. Right click on your machine name in Windows Explorer, and select "Map network drive"
  2. In the "Folder" text box enter the path to Tridion's WebDav endpoint
    Map Network Drive
  3. Click "Finish" (Tridion login maybe required)
  4. Repeat for all Tridion environments required

Comparing Environments with WinMerge

Now that your Tridion environments are mapped as network drives, you can browse them as any other. For those not familiar with WebDav and Tridion, you can edit templates etc and save, creating a new version within Tridion. More interesting to me in this instance, is the ability to perform a diff to find any inconsistencies between the environments. To do this:

  1. Open WinMerge
  2. Select File > Open
  3. Browse and select the locations you wish to compare -- in this case I have chosen to compare the schemas between two Tridion environments WinMerge Folder Select
  4. Clicking OK will result in a sortable, filterable list of differences between the two environmentsWinMerge Listl
  5. Select any files marked as "Text files are different" to examine the differencesWinMerge Diff
  6. Resolve / record the inconsistencies between environments

WinMerge was a massive time saving when comparing the two Tridion environments, allowing me to quickly assess the effort involved in synchronizing the systems. It allowed me to generate a list of items to be investigated, and assess the risk in moving items from Development to Production.

** I would like to make a small warning associated with this post. I would not promote, unless you are very confident, using the "CopyRight", "Copy Left" functionality common in differencing software. Although this would seem like a very easy way to synchronize the environments, careful consideration should be made before performing this action (although Tridion versioning would allow easy rollback). I did try "CopyRight", "Copy Left" functionality, in a couple of simple instances, and it worked as expected, however my main use was to compile a list of the environment inconsistencies.

Any questions?

If you need more information or have any questions just get in touch and we'd be happy to answer them for you.