DEV Community

Ghassan Karwchan
Ghassan Karwchan

Posted on • Updated on

Introducing Kudu, the engine that handle all web application deployment to Azure App Service.

If you follow any tutorials on Azure App Service, you will find that they use one of five options to deploy a web application to the Azure.

  1. Using Azure DevOps
  2. Using Github actions and webhooks.
  3. FTP
  4. Zip Deploy.
  5. MSDeploy (Microsoft Web Deploy tool).

But behind the scenes, all these options are using the same back engine, which is Kudu.

When we use FTP, Zip, or MSDeploy, we are actually calling Kudu REST API for deployment.

How it works:

When we create an Azure App Service, we create an associated scm service for Kudu service, and other extensions.

To access those services we ass scm to the url as follows:

# if the URL of our website is:
https://mywebsite.azurewebsites.net
# then the scm will be available on 
https://mywebsite.scm.azurewebsites.net
Enter fullscreen mode Exit fullscreen mode

To verify this, just run the following command to get the deployment profiles for your app service

az webapp deployment list-publishing-profiles --resource-group <rg-name> --name <app-name>
Enter fullscreen mode Exit fullscreen mode

You will get a json with at least three publishing profiles.

For an App service that we didn't create any Github actions or Azure DevOps, then they already have the three built-in publishing profiles:

  • FTP
  • ZipDeploy
  • MSDeploy (which is Web Deploy)

The output of previous command will be:


  {
    "destinationAppUrl": "https://mywebsite.azurewebsites.net",
    "profileName": "mywebsite- Web Deploy",
    "publishMethod": "MSDeploy",
    "publishUrl": "mywebsite.scm.azurewebsites.net:443",
    "userName": "$mywebsite",
    "userPWD": "..."
  },
  {
    "destinationAppUrl": "https://mywebsite.azurewebsites.net",
    "ftpPassiveMode": "True",
    "profileName": "mywebsite - FTP",
    "publishMethod": "FTP",
    "publishUrl": "ftps://waws-prod-blu.ftp.azurewebsites.windows.net/site/wwwroot",
    "userName": "mywebsite\\$mywebsite",
    "userPWD": "..."
  },
  {
    "destinationAppUrl": "https://mywebsite.azurewebsites.net",
    "profileName": "mywebsite- Zip Deploy",
    "publishMethod": "ZipDeploy",
    "publishUrl": "mywebsite.scm.azurewebsites.net:443",
    "userName": "$mywebsite",
    "userPWD": "..."
  }
Enter fullscreen mode Exit fullscreen mode

ZipDeploy and MSDeploy are very similar by using the same publishing URL, but they are different of the zip file that is posted.

ZipDeploy can be achieved by generate a normal zip file for all the artifacts.

MSDeploy is using a special zip that is generated by Microsoft tool (Web Deploy) or MSBuild tools.

But what about Powershell or CLI deployment?

We know that both Azure CLI, and Azure powershell have the ability to do deployment.

For example on Azure CLI we have the following:

az webapp up --name az204app23690dd
Enter fullscreen mode Exit fullscreen mode

This actually is calling zip deploy behind the scene.

And to prove that, let us deploy an application with the previous command, and you will see the following output from the command:

Image description

As you see, the CLI is using zip deploy behind the scene, and it is doing the following:

  1. creating a zip content
  2. getting scm site credentials for the app service.
  3. run zip deployment.

Top comments (0)