I’ve spent a month using Umbraco now, and I really like it. I’ve used it to build a website for a small business. The extensibility is the best part, along with the ability to edit the project in Visual Studio. Adding custom controllers is easy, and I’ve built a few to do stuff like contact forms, generate blog lists, validate user input, and so on.

In this blog post, I want to talk about how I set up my workflow in Azure. I spent a lot of time trying to figure this out, and I hope someone else finds this useful.

Storing Code on Visual Studio Online

The first thing I did was set up my project on VSO. The service is free, and I like that I can do code versioning (with Git), project management, and release management. It really is an end-to-end pipeline, and even though I don’t use all the advanaced features, it’s a great place to host my projects. And did I mention it’s free?

This part is optional, really. You can use Github, BitBucket, Gitlab, anything you like. Just make sure you’re using a version control system that works for you.

A three tier workflow

Tier 1

The production website is hosted on Azure, under the S1 App Service Plan. The site is linked to a MSSQL DB, also running in Azure.

Tier 2

I’m using the Deployment Slots feature to run my staging environment. The stage environment is linked to a separate MSSQL DB, also running in Azure.

Tier 3

My local dev environment. This is a Visual Studio Project that runs on my computer. This is using a Localhost DB as the backing store.

My daily workflow consists of editing in VS. I build controllers, edit templates, publish test pages and so on all on my local machine. The content is all test, lorem ipsum and random images, that sort of thing.

Once I’m happy with my work, I check in my changes. After that, I do one of two things

  1. Run the project locally and use Courier to migrate DB specific changes
  2. Build the project and publish it to stage

Pushing changes with Courier

I paid $100 for Courier and it’s totally worth it for me. It makes it really easy to push templates, document types, media types, and everything else. The only thing Courier doesn’t do is push updated DLLs, and that’s what the next step is for.

Building & Publishing the project

I do this to push any changes to my DLL files. This is usually only needed when I have edited the controllers, or created a new model. Also, if I edit the web.config. I’m running Web.config transforms so I can safely publish to Stage or production.

Once everything is on stage, I test with real content. Stage is a mirror of production, so I can make sure everything looks good. When I’m satisfied, I use Courier to push to Prod, and (if necessary), I build and publish the project to Prod from Visual Studio.

If I’m only creating content (new blog post, new page, etc) and not touching the templates/doc types, I use stage. That’s my primary CMS - I’ll write the blog post, add the image, preview it. When I’m satisfied with the content, I use Courier to push to Prod. I rarely (almost never) have to actually log into the Prod Umbraco instance.

I hope this makes sense. If you have any questions, ask me via Twitter, or email me. I don’t have comments on my blog - you can read why here