Deploying .netcore 3.1 function apps to linux

David Buckell 191 Reputation points
2020-09-27T10:56:04.66+00:00

i have previously deployed my function apps to a windows hosted resource group which worked.
i now want to migrate them to a linux hosted resource group. i have deleted my existing function apps, recreated them and attempted to publish to azure.
the visual studio publish is successful however my function apps are not listed within the portal.

1>------ Build started: Project: FunctionApps, Configuration: Release Any CPU ------
1>FunctionApps -> C:\Source\Repositories\davidbuckell\David-Buckell-Back-End\FunctionApps\bin\Release\netcoreapp3.1\bin\FunctionApps.dll
2>------ Publish started: Project: FunctionApps, Configuration: Release Any CPU ------
2>FunctionApps -> C:\Source\Repositories\davidbuckell\David-Buckell-Back-End\FunctionApps\bin\Release\netcoreapp3.1\bin\FunctionApps.dll
2>FunctionApps -> C:\Source\Repositories\davidbuckell\David-Buckell-Back-End\FunctionApps\obj\Release\netcoreapp3.1\PubTmp\Out\
2>Publishing C:\Source\Repositories\davidbuckell\David-Buckell-Back-End\FunctionApps\obj\Release\netcoreapp3.1\PubTmp\FunctionApps - 20200927113856056.zip to https://davidbuckellfunctionapps.scm.azurewebsites.net/api/zipdeploy...

==========
Build: 1 succeeded, 0 failed, 4 up-to-date, 0 skipped ==========

==========
Publish: 1 succeeded, 0 failed, 0 skipped ==========
Restarting the Web App...
Successfully restarted Web App.

28487-image.png

i have seen similar behaviour attempting to publish app services using azure pipelines whereby the linux instances just don't seem to get updated at all. this is either unrelated or there is a fundamental issue with linux hosted resources within azure at the moment.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

Answer accepted by question author
  1. David Buckell 191 Reputation points
    2020-10-05T11:09:25.347+00:00

    apologies i did not receive updates from this post indicating there had been replies.
    having republished again the functions were then listed.
    so it was either an issue with the portal not displaying functions that had been successfully deployed, there being a delay in displaying them, or an issue with the VS publish that was not flagged.
    so it was resolved by simply trying again.


1 additional answer

Sort by: Most helpful
  1. JayaC-MSFT 5,606 Reputation points
    2020-09-28T07:38:44.603+00:00

    Hi @DavidBuckell-0471,

    Could you please try to manually sync the triggers and share the details with us :

    1. Make an API call to the sync triggers endpoint.
    2. Please refer to this Powershell sample. [ Specifically this command : Invoke-AzureRmResourceAction -ResourceGroupName $ResourceGroupName -ResourceType $ResourceType -ResourceName $SiteName -Action syncfunctiontriggers -ApiVersion $WebAppApiVersion -Force
      Ex: Invoke-AzureRmResourceAction -ResourceGroupName xyzRG -ResourceType Microsoft.Web/sites -ResourceName ABC-function-app -Action syncfunctiontriggers -ApiVersion 2016-08-01 -Force]

    -----------------------------------------------------------------------

    You may use the Az instead of AzureRm : Invoke-AzResourceAction -ResourceGroupName TestAppJ -ResourceType Microsoft.Web/sites -ResourceName TestJavaSamp -Action syncfunctiontriggers -ApiVersion 2016-08-01 -Force

    Why : https://learn.microsoft.com/en-us/powershell/azure/azurerm/overview?view=azurermps-6.13.0

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.