Windows Azure Training Kit – December 2012

Good News! The world didn’t end, which is good for two reasons, first we’re all alive, but also my team has been working hard to provide you another great Windows Azure Training Kit release.

What’s new in this release?

Back in October, you may have heard of a massive on campus Microsoft event known as Build. Build was a great event filled with an absolutely everything you need to know about Windows 8, Windows Phone 8 and Windows Azure Development. If you haven’t already done so, check out the day 2 keynote which highlights all of the news around Windows Azure.

In this release we’ve packaged up the day two Keynote demos for you to be able to look at the code or deliver a similar session using the very same demos.

Event Buddy Demo

eventbuddy-session-list

In this demo you will start with a disconnected application that manages events and sessions to later connect it utilizing Windows Azure Mobile Services to provide structured storage for events and sessions. In order to use authentication within the application, you will add Twitter (or Facebook) to your application and services. Following this you will upload session decks to SkyDrive and finish by sending Live Tiles using push notifications every time an attendee rates a session.

BUILD Clips Demo

upload-video

In this demo, we will show how to build and deploy an ASP.NET web site that enables users to browse, play, and upload their own personal videos. We will then extend the web site to include Web APIs that power a Windows 8 experience. Finally, the web site project will be deployed to Windows Azure Web Sites and scaled using multiple paid shared instances.

Windows Azure Mobile Services – Scheduler

We have updated the Windows Azure Mobile Services Presentations, Demos and Hands-on Labs to include the new scheduler functionality. If you want some more information about the new scheduling functionality in Windows Azure Mobile Services, check out Scott Guthrie’s post.

Updated Repositories

You can download the offline training kit (Windows only) or grab the files from GitHub.

Continuous Deployment in Windows Azure Web Sites

Automation of tasks is one thing that I am an advocate of in my development projects. Getting functionality that is repeatable with a low risk of human error for a one time cost is a sound business decision and as a developer, keeps your hands on rolling more code for a greater percentage of your work day. It’s a Win-Win scenario.

The Windows Azure Web Sites team along side the Kudu team have added Continuous Deployment functionality in Windows Azure Web Sites with support for three familiar social source code repositories: CodePlex, GitHub and BitBucket. The team has also added support for Contiguous Integration using Team Foundation Service [a new Cloud Based offering of Team Foundation Server].

Windows Azure Web Sites now allows Continuous Deployment from Private Repositories from both GitHub and BitBucket.

In this post:

  1. Create a Windows Azure Web Site
    1. Enable Git Deployment
  2. Associate a Source Code Repository
    1. Associate a GitHub Repository to Windows Azure Web Sites
    2. Associate a BitBucket Repository to Windows Azure Web Sites

Create a Windows Azure Web Site

To avoid reinventing the wheel, you can follow instructions outlined on the Windows Azure Develop Center on how to Create a Windows Azure Web Site and Enable Git Deployment.

NOTE: If you do not need a MySQL database, or have decided to go with another database option, choose Quick Create from the Web Site menu instead of Create with Database.

Associate a Source Code Repository

In order to facilitate the Continuous Deployment it’s necessary to have a centralized location to pull the website code from, in this particular blog entry we’re going to use GitHub and BitBucket.

Initializing a Git Repository will redirect the Management Portal to the DEPLOYMENTS tab.

Now that Git has been enabled use the collapsible menus to select how you would like to deploy code to the new Windows Azure Web Site.

Associate a GitHub Repository to Windows Azure Web Sites

GitHub-Deployment-Accordion

Expand the item labeled Deploy from my GitHub repository.

GitHub-Deployment-Steps

Click on Authorize Windows Azure. This will open a window to federate with GitHub, you will need to approve the ability for Windows Azure to access your GitHub account.

GitHub-Authentication

Once access has been granted, the browser will redirected back to the Management Portal to a screen to select either a Public or Private repository.

GitHub-Select-Repository

After selecting the repository to be published, click on the check mark to start the deployment process.

If your repository is empty, push to GitHub to trigger deployment to Windows Azure.

GitHub-First-Deployment

Each subsequent push to GitHub will trigger a service hook and begin a deployment of the latest bits to the Web Site. Now that the deployment has been pulled into the Web Site, clicking on Browse in the Taskbar Drawer will launch the web application.

GitHub-Published-Custom-WordPress-Site

Associate a BitBucket Repository to Windows Azure Web Sites

BitBucket-Deployment-Accordion

Just like associating a GitHub account to a Windows Azure Web Site, expand the Deploy from my BitBucket repository. Authorize Windows Azure to access a BitBucket account by federating authentication through BitBucket.

BitBucket-Deployment-Steps

After clicking on Authorize Windows Azure, a prompt to authenticate with BitBucket.

BitBucket-Authentication

After signing into BitBucket a prompt to select the Public or Private repository to deploy to Windows Azure Web Sites.

BitBucket-Select-Repository

Unlike GitHub, BitBucket will require you push a change to the repository before the Service Hook will deploy code to the Windows Azure Web Site.

image

Once a push has been made to the private BitBucket repository, the deployment will be pushed to the Web Site.

image

In the taskbar drawer at the bottom of the browser viewport, click the Browse Button.

image

A new window will open and the site will display the web files which were pulled into the Web Site.

Conclusion

Continuous Deployment is a great way to introduce new features or functionality to your customers in an automated fashion. With the new support for Private Repositories, Windows Azure Web Sites can help delivery stunning web sites which utilize either open source projects from public repositories, or provide clients with a customized solution from a private repository.

Stay Cloud my Friends…