Smarter ideas worth writing about.

Quickly Standup Development/Staging Environments in Azure with Continuous Deployment

Tags: Cincinnati , Azure

As a consulting firm delivering web solutions to clients we are challenged with changing requirements, complex technologies and unproven frameworks. The biggest challenge, though, is working with IT to get the right infrastructure set up in order to actually show the client what we’ve done!

I know what you’re thinking: big deal, anyone can deploy a website to Azure. But what if I told you that you can setup a fully functional environment that deploys your code automatically every time you check in? This blog post will show you how to create this same set up in less than 10 minutes with minimal configuration effort.

Create your website
First, you’ll need to create a new website in your Azure subscription. If you don’t have a subscription, you can sign up for a one month free trial here:

  1. Sign into the Azure Portal.
  2. Click the “New” button in the lower left corner.
  3. Click Website, Quick Create, and then enter a URL and select a Web Hosting plan.

Setup Continuous Deployment

  1. Once the website is created, select the new website in the Websites view and then go to the Dashboard tab.
  2. On the Dashboard screen, click the “Set up deployment from source control” link located in the list of links on the right side of the screen.
  3. A pop up window will appear which will allow you to select the source control service that you wish to deploy from. At the time of this writing, you can setup continuous deployment from Visual Studio Online, BitBucket, CodePlex, Dropbox, GitHub, or Mercurial.

  4. The next step will require you to authorize your Azure account to the source control repository you are using. Each service will have a slightly different process but for this tutorial, we will connect to a Visual Studio Online instance.

  5. The next screen allows you to select which repository to deploy from.  

  6. Click the Checkmark button at the bottom and you’re done!

Well that was easy
You’ll notice that there is a new “Deployments” tab in the Azure Management portal. You can use this page to monitor your latest deployment as well as see the history of recent deployments. The next time you check in code to the repository selected, Azure will retrieve the latest version from source control and deploy it automatically to your site.

Admittedly, this isn’t a complete Continuous Integration solution (there are no build scripts, unit tests aren’t run, etc.). But if you’re just looking to get your code out of your teams development environments and in front of your stakeholders as quickly and painlessly as possible, I have yet to find an easier solution. 


About The Author

National Cloud Infrastructure Solution Manager

Eric has been architecting Microsoft solutions for over 10 years working on both application and infrastructure solutions. In his current role he is responsible for helping organizations understand and implement best practices around advanced cloud-based solutions and how to migrate existing workloads to the cloud.