I have been trying lots of new things since I got on board with AIS. From MDX to PowerShell to MVC. My newest endeavor was Azure. I was initially intimidated by the amount of time I would have to spend getting to know the setup before I could do something simple on it, but I have to say it was about the easiest thing I’ve tried so far. Congrats to the folks at Microsoft for creating something so useful that “just works,” even if you are the person who always tries to make things too difficult (me).
I got my first website up and running on Azure in about one hour, including migrating my database. It was so easy I had to share a simplified version of my experience.
First, the assumptions. I am assuming here that you have already set up a free Azure account and a free Team Foundation Service account account and have a copy of Visual Studio 2012 RC or later.
Second, the basics. Open Visual Studio 2012, create a new project (I chose MVC 4 but that’s not a deal breaker here). Check the “Add to Source Control” Box, click OK.
Choose Internet Application (again, just sample, not required), click OK.
When prompted to add solution to source control, choose or create a folder under the desired team project.
Now the project is created, log into your Azure Portal. Click Web Sites (you may be prompted to sign up for websites in preview if this is your first site) and click New at the bottom.
Choose Quick Create and then enter a unique URL then click Create Web Site.
After your website is created, select it and view the dashboard. Click on the “Set up TFS publishing” link.
Enter your TFS URL and click “Authorize Now”
Click Accept to allow connection.
Upon successful authorization, select the project to publish…
Link will execute.
Link complete! Continuous deployment build is automatically created in TFS.
Go back to Visual Studio, and on Team Explorer click Pending Changes.
Check in the project.
If you are logged into TFS Service, you can watch the build kick off.
Once build is finished, Azure will automatically start deploying.
Deployment finished!
Navigate to the website’s URL and view your sample site up and running. That’s it! Now every time you check in a change, TFS and Azure will automatically build an deploy your changes without any further interaction.
Click here to read more about AIS’ work with Azure and the cloud.