Aashish Singh Negi ...... The Pro

My photo
Mumbai/Rudraprayag, Maharashtra/Uttarakhand, India
Hello Friends, This is Aashish Singh Negi from Mumbai. I natively belong to Uttarakhand. I completed my engineering in Information Technology from Sinhgad Institute,Lonavla Of Pune University. I love Programming......... I know some programming languages like C,C++,Visual Basic,C#,SQL,etc. and work upon various technologies like ASP .NET,Silverlight 3.0,Silverlight 4 Beta, Microsoft Pivot, Photosynth,Deep Zoom, Azure Cloud Computing, etc. I love techno topic very much.Love to watch videos of new technologies(softwares,hardwares,etc) launched by different companies............

Sunday, November 8, 2009

Use Windows Azure SDK to deploy your Azure Project to Development Fabric ...

Today we will learn how to deploy our Azure Project to our local Azure Development Fabric using Windows Azure SDK. This method helps deploying the application onto the computer which doesn't have Visual Studio installed in it.
Lets start off with it. You need to have Windows Azure SDK installed onto your computer to start working with following.

1. Start the instance of Development Fabric and the Development Storage as shown in following figure .......

2. Start the Windows Azure SDK (with elevated admin privilege; right click and select Run as Admin). Navigate to the directory ..\Windows Azure SDk\v1.0\bin\

find two file cspack.exe and csrun.exe in this folder. these are the files needed to pack and deploy the project.
3. At the Azure SDK Prompt, type cspack/? This would provide the information about the cspack command. it provides few examples at the end.

As we can see in the help, we need to provide the Service Definition file (.csdef) as a parameter to the cspack command.

There are some other options also we can pass along with cspack command.
a. If we want to deploy our project locally, then we should provide the /copyOnly option. This option provides us with a folder named .csx containing the roles and the csdef file.

b. If we execute without "copyOnly" parameter, we get the Package File (.cspkg) file. this Package file and the Configuration file (.cscfg) can be uploaded to Azure Portal and the project can be deployed online.

c. if we are using the Worker Roles in the project, we should specify the workerroles as well as the workerrole-entrypoint-dll for the Worker Role.

Now after we run the cspack command (in this case with /copyOnly option) , we get following output ...

*** In this example I am using the HelloWorld azure project that is included in the Azure SDK Samples ...

Now after we have packed our application, its time to deploy it or run it to see it working.

For deploying the project we would use teh csrun.exe.

To get overview of csrun command type csrun/? in the SDK.

Get to the folder that contains the *.csx folder and then execute the following command as shown in figure ....
csrun /run:ServiceDefinition.csx;ServiceConfiguration.cscfg /launchBrowser

thus we need to provide the *.csx folder and the Configuration file.

/launchBrowser options starts the Browser with your Web Role running ....

You can open up the Azure Development Fabric to view the Deployment Information .....

Please post comments ........

Aashish Singh Negi

Twitter @aashishnegi