Deploy Functions Apps
The predictive maintenance solution uses two Azure Functions Apps to process the data. The first function app is responsible for processing the data from the IoT Hub and storing it in the Azure SQL Database. The second function app is responsible for training the model and making predictions.
To deploy the function apps
You will need the telemetry_function_app_endpoint from the deployment output. You can find this in the Azure Portal, or from the command line using the following command:
az functionapp list --query "[].{hostName: defaultHostName, state: state} | [? contains(hostName, 'func-pm')]" --output table
Install the .NET 6.0 SDK
Install the Azure Functions Core Tools
Open a command prompt and navigate to the
predictive-maintenance/AzureFunctions/fa_predictive_maintenance_csharp
folder.Run the following command to publish the Azure Function App:
func azure functionapp publish <FUNCTION_APP_NAME>