Jan 112014
 
 January 11, 2014  Posted by at 3:29 pm Dev Environment, Dev Ops  Add comments

Alright. How fast can I set up a Continuous Integration and Deployment pipeline with Visual Studio Online, Git, Visual Studio Express and Azure Websites the first time I set it up?

Now that I got your attention with a super-sexy title like that, please – *please*- keep in mind that this is by no means production worthy, neither a true continuous delivery or deployment. I dislike having disclaimers, but this is an important one. I don’t want anybody to think that I consider this equal to a production setup, I do however want more developers to give this a try and start learning someting that many, including me, consider to be a necessity for modern day development. 

This took me 1 hour (I’m a junior developer) to set up and I used no documentation (I wanted to see how intuitive the tools were to use) . And the message is, there is no excuse not to learn this- you can get the basics and an environment to play with up and running in no time at all. Start (maybe) here and then use this as a first step towards really digging in into the awesomeness. I’ll write a longer article going into the details in a few weeks (as that will take a lot of time), but don’t wait- grab your computer and give it a try.

Tech:

  • For IDE I used Visual Studio Express (forgoing my Premium install for this test)– and it does include MSBuild and MSTest – you get a lot for free
  • Azure Websites has a free trial (you acn skip that step if you want to)
  • Visual Studio Online is free for up to 5 users.

Here is how and what I did. Few words, many pictures coming up- exactly how I like it.

VSOnline_azure_ContinuousIntegration_Deployment110

I created an account at http://www.visualstudio.com and created a project.

Notice that I selected Git.

Since I have two Visual Studio’s installed and it launches the wrong one from the website when you try to open the project I had to open Visual Studio Express and connect to the TFS manually.

VSOnline_azure_ContinuousIntegration_Deployment124

 

After I had done that I cloned the repository.

VSOnline_azure_ContinuousIntegration_Deployment121

Then I created a new project and solution, and MVC app with tests

VSOnline_azure_ContinuousIntegration_Deployment115

Then I made my first commit

VSOnline_azure_ContinuousIntegration_Deployment127

And ah, yes please do add ALL my files

VSOnline_azure_ContinuousIntegration_Deployment108

After the commit to the local repo it was time to push (sync) to the remote repo.

VSOnline_azure_ContinuousIntegration_Deployment119

After syncing I could see my files online. yay.

VSOnline_azure_ContinuousIntegration_Deployment113

Okay, I now want to run tests. Like so:

VSOnline_azure_ContinuousIntegration_Deployment111

Build. Whatever I need it has something ‘build’ in its name (I did this without documentation and based on pervious experience with TeamCity and Git). Here maybe?

VSOnline_azure_ContinuousIntegration_Deployment114

New build definition it is then.

VSOnline_azure_ContinuousIntegration_Deployment116

Here are the steps:

VSOnline_azure_ContinuousIntegration_Deployment117

VSOnline_azure_ContinuousIntegration_Deployment118

VSOnline_azure_ContinuousIntegration_Deployment120

VSOnline_azure_ContinuousIntegration_Deployment122

VSOnline_azure_ContinuousIntegration_Deployment123

I make another commit and sync, this should kick of my new build.

VSOnline_azure_ContinuousIntegration_Deployment112

2014-01-11 23-17-37

We have a very simple CI setup now. Hm. But I want to deploy.

I went to Azure and created a new website.

VSOnline_azure_ContinuousIntegration_Deployment126

And from Visual Studio I went ahead and deployed a first manual deploy.

VSOnline_azure_ContinuousIntegration_Deployment129

Then I remembered something from the Azure portal. This:

VSOnline_azure_ContinuousIntegration_Deployment101

So I went ahead with it.

VSOnline_azure_ContinuousIntegration_Deployment102

VSOnline_azure_ContinuousIntegration_Deployment104

VSOnline_azure_ContinuousIntegration_Deployment105

I had a new build definition in my project after that.

VSOnline_azure_ContinuousIntegration_Deployment106

And you know what? It worked.

VSOnline_azure_ContinuousIntegration_Deployment100

Notice the deployed tab!

VSOnline_azure_ContinuousIntegration_Deployment109

So. Take an hour or two. Or maybe less. But do it. Word-heavy version coming up in a week or two. SEO and all you know. Although I prefer pictures over words.

  5 Responses to “Visual Studio Online setup speed test and guide: Continuous Integration and Deployment pipeline”

  1. Hi Iris,
    This is awesome as are you! Nice job. I do have to chuckle though, you change my whole definition of “junior developer” 🙂

  2. Iris

    Whilst I think this is a great blog, that demonstrates just how easy it is to get something basic up and running. I think a real CI environment will involve way more pain. I have not used TeamCity in anger though I know it is meant to be the mutts nutts.

    We use Jenkins and prior to that CruiseControl, both of which require a lot of extra work, either MSBuild or NANT.

    Installing services, queues, service bus installations, WCF etc etc.

    Its a real pain. The closest thing I have seen to making this ok is TeamCity, which I think still requires a bit of work.

    Still nice post

    PS : As others have stated, I don’t think you are typical Junior Dev. Don’t know how many Juniors I have met that talk at tech conferences 🙂

    • Thank you, and I agree, that is why I have that big disclaimer in the beginning of the post. You would need to start somewhere to learn the pains of CI, I’m pretty sure they will find them rather soon as soon as they start pleying with CI. Without a first initial setup however, they will never experience them.

  3. Yeah my bad so you do, ooops. For some reason my brains seems to skip disclaimers

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 9 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)