Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
14.03k stars 16.11k forks source link

No route registered for '/MSDeploy' when using Linux azure web app #13430

Open wenbya opened 1 year ago

wenbya commented 1 year ago

serverFarms with Kind=Linux

Issue Details

From above I got the infomations: Linux serverFarm can have a MsDeploy website extension. but when I actually run in my side, throw out the error No route registered for '/MSDeploy'.

what I just needed:

Linux azure web app + simple zip file deploy in ARM template. as someone said, MsDeploy for windows azure web app only ? and how to achieve my goal ?

what I have

webZipUri is a simple 'hello world' python flask app in azure storage account with public access.

my server farm bicep

param appServicePlanName string
param location string

var appServiceSkuName = 'B1'

resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
  name: appServicePlanName
  location: location
  sku: {
    name: appServiceSkuName
    capacity: 1
  }
  kind: 'linux'
  properties: {
    reserved: true
  }
}

output appServicePlanId string = appServicePlan.id

my site and extension bicep

param appServiceName string
param appServicePlanId string
param location string
param webZipUri string

resource appService 'Microsoft.Web/sites@2022-09-01' = {
  name: appServiceName
  location: location
  properties: {
    serverFarmId: appServicePlanId
    siteConfig: {
      appSettings: [
        {
          name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
          value: 'true'
        }
        {
          name: 'WEBSITE_RUN_FROM_PACKAGE'
          value: '1'
        }
      ]
      linuxFxVersion: 'PYTHON|3.9'
    }
  }
}

resource appServiceMsDeploy 'Microsoft.Web/sites/extensions@2022-03-01' =  {
  name: 'MSDeploy'
  parent: appService
  properties: {
    packageUri: webZipUri
  }
}
wenbya commented 1 year ago

help needed 😃😃