This document explains how to deploy a GeneXus application as Azure Functions.
Install the requirements in the machine where you will run the deployment —you only need Azure CLI.
The basic steps in the cloud are as follows:
The basic steps in GeneXus are as follows:
- Create a Deployment Unit object and select the objects to deploy.
- Use the Application Deployment tool to select the target "Microsoft Azure Functions."
To deploy the backend services of an app, select the target "Microsoft Azure serverless (backend services)." In this case, the Functions are deployed as Http-triggered functions.
- Configure the properties in the property grid.
- Click the deployment button to deploy to Azure.
Azure functions have Trigger Types (Trigger type property at the Deployment Unit).
Depending on the trigger type of the functions, you have to consider different aspects when deploying.
To consider those aspects, you may group the functions that have a trigger other than Http, and those that have Http trigger.
For all the functions except those that have Http trigger, consider the following to deploy the application.
Example of a timer triggered function.
See Azure Http-triggered functions
First, take into account that when the function is published on an existing function app, the function is updated.
Depending on the function, it is preferable to be able to change some settings in the cloud. Those settings are configured at deployment time, and you can set the deployment engine to create an application setting in the cloud with the name and value you specify.
For example, for timer functions, you can specify a cron time, or an application setting (to be created in the cloud with the name and value that you wish).
For the last option, the advantage is that all changes can be made in the cloud (you don't need to deploy again for those changes).
The same happens with other function types like Queue or Service Bus, where the connection data is defined as an app setting.
The behavior of all functions within the function app can be configured globally. This is done in the host.json file. For example, in that file, you can configure the trace level for the app, Health Monitor, etc.
Azure functions have a default timeout, which can also be changed at the host.json file.
Important: The GeneXus user has to manage this file.
The Application Deployment Tool uploads one with the basic settings, but if you want to use another you can edit it and add it to the deployment unit (see here).
If the function app uses Image, Audio, Video, or BlobFile data types, you have to configure the Storage Provider property because all multimedia must be served from an external URL, such as Microsoft Azure.
For the same reason, it's not supported to use the file system to serve content; that is, to have read/write access to files (such as Blob data type, Excel, or PDF reports).