19 February 2014

Using TDS

I wanted to do a quick post about TDS here as I am asked quite often: what is the TDS project in your solution? What is TDS? What can you do with it...
In most agencies you will work on projects where the team is not working in a common location. As most of you know TDS is a fantastic tools to be able to sync your databases with other team members. If like us you are working with an offshore model then TDS is awesome: you can keep track on template changes and have all of it through Visual Studio and in Version control. As expected quite a lot of Sitecore people knows about the tool and are not surprised. However, the surprise came when I am adding that I am using TDS to create my .update packages (files and Sitecore Items) for deployment into Internal QA then UAT then Prod. The package install could be automated or manual process, but that is off topic for this post. So it is only then that I realize that some of us did not use this feature from TDS - and maybe I should talk about how to use TDS for Synching content but also generate the Update Packages...

1- Synchronise content:

That is quite simple to do. Once you have created you project in Visual studio, you just need to configure the "Build" Tab to make sure TDS will point at your website. Please refer to the TDS documentation on how to create the project in Visual Studio...

Once this is setup then you will be able to use the different option from the content tree to:
  • Get Item from Sitecore
  • Synchronsie with Sitecore

When Synchronising with Sitecore you will have the following screen where you will be able to either update your sitecore instance or update the Solution file.

That will allow you to work on your task then update the solution then checkin + get the latest work from someone else and update your sitecore instance. That is awesome: all templates, layouts... are now in TDS

2- Update Packages

Now the fun starts:
You have been working on your task, as well as other developers on different area of your application. Everything looks good, everyone has been using TDS correctly and checking in their code and Sitecore items... Well it is time to deploy to TEST. I am skipping the debate of automated or manual process for later. So for the sake of this post Let say I will deploy manually. So I am pretty sure as most of us did it in the past: open the desktop > create package > select what we need... Well if you were working with TDS you could configure the TEST "configuration" so instead of connecting to your test site, yu want to create the update package:

  • Right click on your TDS project and select properties
  • Then switch the Configuration to TEST as per the below:

  • Note that the Build Tab is left empty.
  • Go to the Update Package tab, and start filling in the information for your package:

  • Once setup, if you switch the configuration profile in Visual Studio and Right click on any Sitecore Item in TDS, you will note that none of the "Get Sitecore Item" "Sync with Sitecore" are available. This is because you do not want to connect to a sitecore instance, you just want to generate a package

  •  Now, I can hear you say: Hold on, what will be included in my package? Well the answer is quite simple: what you want to be included. For that, you will need to right click on your TDS project and select "Deployment Property Manager".

This will open up the pane as per the following screen, where you can decide what to include. As a preference, I usually include all my templates, all my layout and renderings but None of the Content Item to make sure those does not get overwritten... Then again, from time to time, I do include some items with the "deploy" property "Once" instead of always. This is to make sure that this item will be created if it does not exist but nothing will happen if it does...

Well the last step is simple: build your TDS project using the TEST profile and ... voila:
You have your update packages on the TDS project (file system...):
Once those packages are generated, you can install them manually through the Sitecore update installer: http://mysite/sitecore/admin/updateinstallationwizard.aspx

Or you can look for automate the deployment...

NOTE: There is one thing I did not talked abut on this post is the Config replacement, which I am planning on talking in a later post

No comments:

Post a Comment