SDL Web 8 Idea – TTML – Tridion Topology Markup Language

A few weeks ago I attended the SDL Web 8.5 Bootcamp in Amsterdam. You can read more about it on the Building Blocks blog.

One of the exercises was a Topology Manager refresher. I had some fun learning Topology Manager when it was introduced in SDL Web 8 and over the past year have had a chance to get some real world experience with it on a few projects. It’s an interesting idea but can be fiddly to set up if you haven’t seen it before.

SDL Web 8.5 brings a great new UI to help you check things have been set up correctly which is a huge help. But I still have a lot of fun with the Powershell commands during initial set up.

The Topology Manager UI
The new Topology Manager UI

While working together on the exercise in Powershell, Ginika from SDL professional services showed me a script that his team had written which generated Publication Mapping commands. It achieved this by connecting to SDL Web itself using Peter Kjaer’s Tridion-CoreService Powershell module (which is fantastic by the way).

The script uses simple pattern matching to figure out what the website Publications are and generate the required Powershell scripts to create the Mappings between the CdEnvironments, the Web applications and the Publications – which is critical to getting publishing working.

The exercise got me thinking about whether there was a better way to describe a Topology in a manner which could be easily understood and stored in Source Control. Powershell scripts are fine but anyone who has had hands on experience with Topology Manager knows it can be a little fiddly the first few times particularly if you need to change something like a URL for example.

I’ve been using Swagger / Open API specification at work recently to describe an API I’m working on and that uses YAML which is sort of like JSON with no curly brackets and I thought it might be interesting to try to describe a Topology in YAML.

This is what I came up with:

Then I just needed a script to generate the necessary Powershell commands based on my format. I played around for a while and got as far as this using the PowerYaml module.

Here’s the output of the script against my basic YAML file.

This was just an idea but I think it could be really interesting to play with as a way of storing your Topology and sketching it out.

I guess the advantage of using the YAML format vs saving the PowerShell Script directly is that there is less duplication and it is a bit easier to read.

Ideas for further extension of the format:

  • Generate a diagram of Topology from the YAML
  • Link it up to Tridion-Powershell module like the script that Ginika showed me to work out the Mapping from WebApps to Publications based on some rules and generate the appropriate Powershell without needing that part defined in the YAML.
  • Validate the Topology Markup
  • Drop and recreate a Topology from the YAML when you tweak it

Let me know what you think.

Leave a Reply

Your email address will not be published. Required fields are marked *