Share via


Developer – Go Cloud forth and conquer

Developers accessing Windows Azure from Visual Studio

This is a short session on pumping an application (an N-TIER one at that) into the cloud. I will post detailed ones later.

Fire up Visual Studio (I am using 2013) and start off by creating a Windows Azure Project. Make sure you have an Azure subscription (which is easily attainable with a MSDN developer subscription – it comes with Azure). Also make sure to have downloaded the latest Azure SDK and installed it on your machine. Below I am posting screen shots of what I did.

clip_image002

clip_image003

clip_image005

clip_image007

clip_image008

Implement the necessary functionality in your code by expanding on your MVC Apps’ View and Model and enhancing it. This will be in your WebRole project. (I will blog separately on the actual app).

Also in your various “Role” components implement the necessary service components and routing elements. Compile and test locally first on the local cloud. The latter is possible if you had downloaded the SDK. You can see this appear in the Taskbar as shown below, if everything works correctly.

clip_image009

Now prior to deploying you can create a Web Site on Azure (of course using your subscription) to serve as a container for your application. Of course you should change your configuration from local to the correct website when deploying, otherwise you will get deployment errors.

What you are seeing below is the Server Explorer with a Web Site which I had created on my Azure portal.

clip_image010

Finish up your implementation of the additional Service and Data Contracts as well as custom stuff to the Model and View of your application.

Now compile and make sure everything works locally on your “Cloud in a box” – ie on the Azure emulator in your box. You should atleast see two of the emulators – compute and storage. If you want a database in your app, you should add that one also. Note that the connection strings are configurable in the Web.Config file and needs to be changed to the appropriate end points when you deploy onto the real Azure portal.

Now finish up your app, test it locally and get ready to deploy to the cloud. Steps below.

clip_image011

clip_image013

clip_image015

clip_image017

clip_image019

clip_image021

Similarly publish other roles to the Web in Azure.

clip_image023

The status will change after full deployment is done. Now you should be able to access from the browser. The interesting thing is extending the app to mobile platforms is not far away in this brave new world.

Happy Cloud Application development, deploying and testing.