Running Umbraco on Azure – Part 5


In the previous posts we have created a solution in Visual Studio to work with Umbraco, setup infrastructure on Azure to host the Umbraco site and set up Continuous Integration and Delivery with Visual Studio Team Services.

In this post we will look at how to work with it all.

I want to use Visual Studio to edit my Templates

Create the Template in Umbraco Back Office, running locally

In Visual Studio turn on ‘Show all files’ and look in the uSync\template directory.

Make sure all of the files are included in the project

I created loads of content locally, how do I push it to Test?

Commit it to Source Control

Sync the repositories

VSTS will build it all

If the build is successful VSTS will deploy it to the Test environment

My Test environment is ready to go live, how do I push it to Live?

In Azure open the App Service

Click Swap

Set source to Test and Destination to Production

Click Ok

I have made lots of changes in local/Test, now I need to move them to Live but keep all the content that has been created in Live.

This is messy but reliable.

Copy the uSync directory and all its contents from the Live and Test Slots to the local/Dev uSync Directory

In Visual Studio turn on ‘Show all files’ and look in the uSync\template directory.

Make sure all of the files are included in the project

Deal with any conflicts

Commit it to Source Control

Sync the repositories

VSTS will build it all

If the build is successful VSTS will deploy it to the Test environment

once the deploy is complete

In Azure open the App Service

Click Swap

Set Source to Test and Destination to Production

Click Ok

Caveats

Umbraco has two identifiers for all content, an integer id and a GUID.  Always use the GUID and uSync will ensure that it always matches.  The integers can and will change between deployments.

Always remember to include new content in to the Visual Studio project, it will not we added automatically just because the parent folder is.

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.