1

I'm putting together some .net Core CLI applications that I'd like to invoke from PowerShell-based Azure Functions.

Unfortunately, I'm a bit fuzzy on what the correct/best approach would be to get my executables deployed in such a way that they can be invoked.

Note: I only use git for source control, not deployment. So no git-based options please.

Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
  • 1
    Just to clarify - those .NET core applications are console? EXEs you want to deploy into proximity of Azure Functions so that those can be invoked from Powershell functions? What is the exact scenario you want to solve with Azure Functions here? – Kai Walter Dec 26 '16 at 12:14
  • Yeah, I'd like the .net Core console apps to be reachable by a PowerShell script triggered by an Azure Function. The scenario is that I want to have background functionality that runs on a trigger without having to operate a VM 24/7. – Alexander Trauzzi Dec 26 '16 at 14:48
  • From my point of view you cannot and should not bring EXEs up to Azure Functions and invoke those. You could bring your .NET core console apps logic into C# Azure Functions itsself or into Private Assemblies and deploy those along with your Azure Functions. – Kai Walter Dec 27 '16 at 11:57
  • Definitely an option, although I'm equally as confused as to how I would handle deployment for that scenario. – Alexander Trauzzi Dec 27 '16 at 17:36
  • 1
    This could be one option: http://stackoverflow.com/questions/36436917/execute-pre-compiled-net-code-as-azure-function – Kai Walter Dec 27 '16 at 17:57

2 Answers2

5

Omega, your scenario is supported today.

The fact that this is a .NET Core application is not relevant to Azure Functions in this scenario as you'll be invoking it directly and, from an Azure Functions perspective, this will be just like any other PowerShell function.

For the deployment options, your options vary from integrated source control deployment to Web Deploy, FTP and others, allowing you to pick the option that fits your needs to have a fully automated deployment.

You can find detailed information about Azure Functions deployment options here but additional deployment options (since Azure Functions supports the deployment options exposed by App Service) are also available here.

Fabio Cavalcante
  • 12,328
  • 3
  • 35
  • 43
0

Two answers here:

  1. EDIT: .NET Core Standard 1.3 is supported as of the time of this writing. Not 1.6. Also AppSettings configuration isn't yet supported using appsettings.json.

  2. To deploy a .NET Framework 4.6 App, use these instructions (it's a live documentation site that's updated often). You can Web Deploy, or use VSTS Source Control, FTP, or use Kudu to upload a .zip file:

To use the function app's SCM (Kudu) endpoint Navigate to: https://yourFunctionName.scm.azurewebsites.net. Click Debug Console > CMD. Navigate to D:\home\site\wwwroot\ to update host.json or D:\home\site\wwwroot\ to update a function's files. Drag-and-drop a file you want to upload into the appropriate folder in the file grid. There are two areas in the file grid where you can drop a file. For .zip files, a box appears with the label "Drag here to upload and unzip." For other file types, drop in the file grid but outside the "unzip" box.

Tim P.
  • 2,903
  • 24
  • 26
  • There seem to be quite a few manual steps. Is there not a more structured approach to any of this? I feel like once my files are up there I still have no clue what the proper steps are. – Alexander Trauzzi Dec 27 '16 at 17:56
  • Use https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/ if you want to an automated deploy from Visual Studio. – Tim P. Dec 27 '16 at 17:59
  • 1
    You can build a web deployment package and automate the deployment of that. Or you could use the REST APIs provided by kudu: https://github.com/projectkudu/kudu/wiki/REST-API – Paul Batum Dec 30 '16 at 21:50