Setting Up And Using Web Deploy with Azure WebRole in Visual Studio (One-Click partial update)
Asked Answered
F

1

5

I am using Windows Azure, and find it a lot difficult and useless make a new "Package" each time you make a small change, and want to test it on the Cloud. I heard about the opportunity to update the web roles without re-deploy the whole instance each time (about 15 minutes), and do a Web Deploy - upload just the modified files (some seconds).

None of the resources found on the web seems to describe this particular situation.

There are tutorials, on how to enable Web Deploy on Azure Web Roles, but not a one how to set it up. [This tutorial is showing the settings, but not for Azure]

Feces answered 4/12, 2013 at 16:57 Comment(1)
Well, i read that. I was going to reference it also. The problem is that the part with the settings is 4 sentences and not well explained.(e.g:"In User name, type the user name. In Password, type the password." :) That was where i got stuck, and once i found how to do it, decided that i might not be the only one, so i posted this :). I am happy that you go online in 5 minutes, i deploy in 15 ( 3 min upload and over 10 updating)Feces
F
7

To enable web deploy you first need to be able to do a standard Publish (not Package) from the CloudConfiguration project.

like here

there are some good tutorials how to do that.

While the Publish dialog is open, make sure to select this option, and make a normal publish.like so

After this configuration is published, you are ready to set up the Publish settings for the Web Role project. Note, the CloudCongiguration project is used for Package deployment, and the Web project is used to deploy to Azure via Web Deploy as deploying to normal web hosting.

When you click on the "Publish" context menu of the Web project, a "Publish Web" dialog appears. All settings are easy to guess/standard, except the second tab: Connection.

Connection tab Here the things go little hard, if you have not messed with Web Deployment before.

  1. Must select the Web Deploy method
  2. The URL to your Web Role (DNS or IP address found on Windows Azure Management portal)
  3. The name of the web site in the IIS on the Host machine. In our case this is the Azure WebRole instance. So Login via RDP, start "Server Management", navigate to: Roles->WebServer(IIS)-> Internet Information Services Manager. In the Connections Pane (The Left part of the Manager) expand the tree-view pointing to the "localhost" service -> Sites -> and there you find the Website Name (should be something like : xxxxx_IN_0_Web) website name

  4. This is the username you use for RDP connections /and the password below/

  5. is that strange URL, that is pointing to the Web deploy Service, that will eventually update our website content.

you can check, if the Package deployment went OK, in the Azure Management portal, on the Overview page of the web deployment if the port 8172 is open.

Now "Validate Connection" should succeed!

If not, try "http://{0}.cloudapp.net//MSDEPLOYAGENTSERVICE" for Destination URL

Feces answered 4/12, 2013 at 16:57 Comment(4)
A bit of clarification: If you first publish to Azure (the regular way), and in that publish, you had RDP and Web Deploy set up, then... when you go to publish your Web Role project later, all those fields should be filled in for you. You have to wait for the publish to complete first though, as the Visual Studio tooling will do the auto-fill-in based on the running service.Adonic
In my case they were not for some reason (although the regular Azure publish created a new Profile). That's why i had hard time figuring them out, as there is not much online.Feces
Actually #5 (Destination Url) is a link to Url to open after the publish completes. #2 (Server) is where the Url to the deployment service like yourservername:8172/MsDeploy.axdGoniometer
if the machine has to be re-imaged, you lose all your web deploy changesVagrancy

© 2022 - 2024 — McMap. All rights reserved.