Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Aptify Azure Enablement comes with the ability to run the existing schedule tasks entity (configured in Aptify Smart Client) on Azure Portal as a WebJobs.

This document provides the information on how to setup new web jobs and configure existing web jobs to run as Azure WebJobs. This topic is divided into three parts:

...

The current scope of the WebJobs is as follows:

  1. Most of the existing schedule task functionalities are available in Azure Web jobs.

  2. Only Once, Daily, Weekly, Monthly, Monthly Relative types of frequencies are supported.

  3. The Scale of the job will always be “Single Instance” and Type “Continuous” on Azure Portal

Info

Run History Tab on Scheduled Task records will not be updated

...

.

The functionality of the checkbox “Delete the task if it is not scheduled to run again” is not in scope for now.

...

Frequency types Run when computer is idle and Run when service starts is not supported.

Part 1: Code File Config Changes

  1. Extract the APTIFY_700_Database7.0.0 zipped file and go to the Core Database Setup folder containing the Utility ->Utility->WebJobManualDeploy folder.

  2. Under the Utility folder search Search for WebJobManualDeploy.exe.config and open the same in Notepad or Notepad ++.

  3. Configure the tags “AzureWebJobDashboard“ and “AzureWebJobStorage“ with your Azure tenant Storage Account Connection String.

  4. Under the appSettings tag, the value for key=” frequency” will be any one of the following: all, once, daily, weekly, monthly, monthlyRelative. For example, a code with frequency daily will only run the task which are of type daily in database. It is to be noted that this setting is case sensitive.

  5. App Insights has been configured for these web jobs and logs can be found in App Insight log file. To enable the app insights, Instrumentation Key is required (Line 25 of the picture below). Refer to Configuring Serilog with Azure Application Insights to know more about App Insight.

    Image Removed
  6. To get the instrumentation key for App Insights, log in to Azure portal and select the service Application Insights.

    Image Removed
  7. Select the Application Insights for which you want to configure the logs.

    Image Removed
  8. Under the overview tab you will find the Instrumentation key

    .

    Image Removed
  9. The below keys are required by web job to log into the database:

    1. UserDatabase = “Aptify”

    2. EntitiesDatabase = “Aptify“

    3. SQLLogin and Password are the credentials to log into the database.

    4. Server = Managed instance Endpoint (See Points 6.d.i to 6.d.iii)

      1. To get managed instance endpoint, log in to the Azure portal and select SQL Managed Instances Service.

      2. Select the instance to be connected with the WebJobs.

      3. Once you select the instance you will find Networking under Security and Endpoint on the right pane of the screen as highlighted in below screenshot.

  10. Once all the changes are done in config file, save and close it. Select all the code files and zip them, give the zipped file a meaningful name.

...

  1. Open Microsoft Azure Portal, on the home page, click App Services.

  2. Select the App Service through which your web job will run.

  3. After selecting App Service, on the newly opened right pane, select “WebJobs“ under “Settings

  4. Under WebJobs, click + sign to add a new web job. A new pane Add WebJob opens on the right side of the screen. Under Name, give any meaningful name for the job.

  5. Under File Upload, click upload button and a new window opens. Now select the zipped file created in Part 1.

  6. Set the Scale to Single Instance.

  7. Click OK, it may take few seconds for the job to be visible on the dashboard in Running Status. This will ensure that the scheduled tasks will start executing as per their schedule.

    Image RemovedImage Added