user1500193
user1500193

Reputation: 65

Migrate web role to Windows Azure virtual machines

I have a web role running in Windows Azure and I included two instances to my web role.

I decided to use Windows Azure virtual machine to run my Windows Azure web role. I can not find any migration document to migrate my web role to Windows Azure virtual machine. On portal I see git, TFS and FTP based migration for Windows Azure websites but not for Windows Azure virtual machine.

What is the best way to migrate my web role to Windows Azure virtual machine.

Upvotes: 4

Views: 2175

Answers (2)

AvkashChauhan
AvkashChauhan

Reputation: 20556

If you are using Windows Azure Virtual Machines, your are the owner of the Virtual Machines that why it is up to to decided how you would want to deploy your application. Because when you decided to use Windows Azure Virtual Machines you can use Stock Virtual Image (from Gallery) or you can deploy your own VHD, you have liberty to choose the method of deployment of your application and thats why there is option is given in Windows Azure Portal. (With Windows Azure WebSites, you do not have such liberty and thats why GIT, FTP, TFS and WebDeploy method are given for those who decide to choose Windows Azure Websites.)

Because you are trying to migrate Windows Azure Web Role to a Virtual Machines, the best option comes in my mind is below which I have suggested to few other partners:

  1. Take out your Web Role application from Windows Azure Web Role solution so you independent ASP.NET web Application
  2. Now you can use WebDeploy method with this application.

To setup WebDeploy in a Windows Azure Virtual Machine you need to follow these steps:

  1. Install .Net 3.5 in Windows Azure Virtual Machine
  2. Install Web deploy 2.0 from Download Link here.
  3. Setup Web Deploy. Complete steps can be found here
  4. Create new end point port 8172 as public & private for Web deploy in your Windows Azure Virtual Machines
  5. Now use your VS2010 application and just deploy your application using Visual Studio Publish Wizard

Note if you don't want to use VS2010 based WebDeploy, you can package your Application first and then RDP to your Windows Azure Virtual Machine and install it there. Because Windows Azure Virtual Machine persist the data so this step is much simpler but very different then web deploy but a valid choice.

Upvotes: 5

David Pallmann
David Pallmann

Reputation: 642

There are 3 modes of Windows Azure, and all 3 are capable of running a web site.

  1. Windows Azure Web Sites (WAWS)
  2. Cloud Services (Platform-as-a-Service)
  3. Virtual Machines (Infrastructure-as-a-Service)

Your exsting Web Role solution is using Cloud Service (PaaS). To migrate over to WAWS or Virtual Machines, you need to do the following (I'm assuming use of Visual Studio here):

  1. Make a copy of your existing solution and remove the Windows Azure project from it, leaving just the web project.
  2. Using the new Windows Azure portal, provision either a WAWS web site or a Virtual Machine.
  3. Record your access credentiaols. If using WAWS, specify and remember your deployment credentials. If using VMs, set up and remember your remote desktop credentials.
  4. Deploy your web project files to the cloud. If using WAWS, choose a deployment method (Web Deploy, FTP, Git, TFS) and deploy from Visual Studio. If using VMs, invoke remote desktop, configure local disk sharing, connect to the VM, configure IIS, and transfer files.

Since all 3 modes can be used to host a web site, you might consider the following before making a decision:

  • WAWS - for 2-tier web sites w/standard IIS configuration only; managed for you; preserves portability between cloud and on-premise. You are sharing VMs with others unless you promote from shared mode to reserved mode. VM intsances have shared persistence. Windows Server and IIS only; Can use SQL Database or MySQL.

  • Cloud Services - managed for you, can support versatile architectures, powerful services available for storage, database, identity, communication, caching, virtual networking. Your VMs are exclusively yours. VMs have no persistence. Windows Server only.

  • Virtual Machines - you manage, can support versatile architectures; preserves portability. Your VMs are exclusively yours. You can capture a VM and add it to an image gallery for easy creation of new instances. VMs have individual persistence. Windows Server or Linux.

Upvotes: 7

Related Questions