Function Solution Template for Marketplace

Trombone 21 Reputation points
2020-08-15T18:32:52.127+00:00

Hi Pros,

I am working on my first solution template for Azure Marketplace. Next to some other ressources the template should contain an Azure function that consits of some assemblys.
If I just make a template for my own I know I can place the Zip package with my function assemblys in my blobstorage and reference it in the template on WEBSITE_RUN_FROM_PACKAGE. This works fine.
But how is it done when I am building the template for the marketplace?
How and where is my function code stored?

Thanks in advance for your help!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,542 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 69,941 Reputation points
    2020-08-17T04:24:42.38+00:00

    Hi @Trombone

    You cannot add assemblies to the ARM template. Either you need to create the Repository or source control and then define the URL in the ARM template.
    Alternative as you have mentioned you need to define WEBSITE_RUN_FROM_PACKAGE as key value pair in the ARM template

    You need to leverage the sourcecontrol. Once you have created your Repository or source control you can define it in properties repoUrl. Please look into the QuickStart Template in the sourcecontrol article.

    Provision a function app with source code deploy in Github: https://github.com/Azure/azure-quickstart-templates/tree/master/201-function-app-dedicated-github-deploy

     "repoURL": {  
                "type": "string",  
                "defaultValue": "https://github.com/AzureBytes/functionshttpecho.git",  
                "metadata": {  
                    "description": "The URL for the GitHub repository that contains the project to deploy."  
                }  
            },  
    
        "properties": {  
                            "RepoUrl": "[parameters('repoURL')]",  
                            "branch": "[parameters('branch')]",  
                            "IsManualIntegration": true  
                        }  
    

    Updated
    The repository can be private or public but if you are using a solution template then you should use the public repro. If you are creating the private repro then you need to create the access token (in case of GitHub) and then build the repo URL with this access token to authenticate the request. The problem will be that this authentication token will be hardcoded/visible in your ARM template so you need to go with Managed application

    The repository that you have mentioned will be used to deploy the code in the customer environment. If you set the 'IsManualIntegration' under the properties to true then it limits to manual integration (only one time); false to enable continuous integration (which configures webhooks into online repos like GitHub).

    The alternative option is to use WEBSITE_RUN_FROM_PACKAGE as key value pair in the ARM template. You can define your blob URL as the value for this key. The blob URL should be publically accessible. If you want it to be a private URL then you should have your own business logic to automate it.

    Hope the above helps.

    Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful