Job Servers Configuration on Azure Environments

Job servers allow you to run workloads periodically or at a specified time in the future. There are three job servers available on FintechOS instances:

  • JobServer - Runs server automation scripts scheduled in Innovation Studio using the Schedule Jobs feature (see the Innovation Studio documentation for details).
  • JobServerMC (Message Composer) - Runs Omnichannel Campaigns and previews for campaign plans, activities, segments, and audiences.
  • JobServerMB (OCB - message bus) - Used by Omnichannel Campaigns to send email and SMS messages.
IMPORTANT!
JobServer is the base WebJob. Both JobServerMC and JobServerMB require JobServer in order to function.
IMPORTANT!
Omnichannel Campaigns require both JobServerMC and JobServerMB in order to function.

To configure job servers on Microsoft Azure environments, follow the instructions below:

Prerequisites

  • The App Service hosting the JobServer WebJob requires a P1V1 service plan in order to function properly.
  • In production environments, we recommend to install the JobServer in a dedicated App Service. If you wish to host the entire FintechOS instance in the same App Service (for example in a development environment), you will need to upgrade the service plan.
  • The JobServer WebJob requires a dedicated Application Insights instance to support the log data volume.
  • The JobServer WebJob must use the same Azure Blob Storage instance used by Innovation Studio and FintechOS Portal. Make sure the provisioned object storage space is sufficient.

Install the Job Servers

Use the pipelines provided by the FintechOS CloudOps team to install the job servers on your Azure environment.

(Optional) Adjust JobServerMC SQL Timeout

The database connections for the procedures run by the JobServerMC WebJob expire, by default, after 120 seconds. If you work with large campaigns that include many activities, you may need to extend this period. To do so:

  1. Open the <FTOS installation>\JobServerMC\serviceSettings.config file in a text editor.
  2. In the <appSettings> section, set the MessageComposerTimeout key to the desired number of seconds.
    Copy
    <appSettings>
        ...
        <add key="MessageComposerTimeout" value="300"/>
        ...
    </appSettings>
  3. Save the serviceSettings.config file.

Configure the Database Connection

In the Microsoft Azure portal, navigate to the App Service blade where the JobServer WebJob is installed and, in the Configuration panel, edit the Connection strings section to include the following entry:

  • Name: EbsSqlServer
  • Value: System.Data.SqlClient

When using the JobServerMC WebJob, set an additional connection string with the following settings:

  • Name: FtosConnection
  • Value: System.Data.SqlClient

Enable Support for Innovation Studio Scheduled Jobs

To allow the JobServer to run server automation scripts scheduled in Innovation Studio using the Schedule Jobs feature:

  1. Open the <FTOS installation>\JobServer\serviceSettings.config file in a text editor.
  2. In the <appSettings> section, set the RegisterFTOSMetadataChanges and the UseFTOSDbConfiguration keys to 1.
    Copy
    <appSettings>
        ...
        <add key="RegisterFTOSMetadataChanges" value="1"/>
        <add key="UseFTOSDbConfiguration" value="1"/>
        ...
    </appSettings>
  3. Save the serviceSettings.config file.
IMPORTANT!
Do not configure the above settings on multiple WebJobs for the same FintechOS instance (database), even if you run the JobServer WebJob in combination with the JobServerMC and JobServerMB WebJobs.

Configure the JobServer Logging - Application Insights

  1. In the Microsoft Azure portal, open your Application Insights blade and, from the Overview panel, copy the Instrumentation Key to the clipboard.
  2. Navigate to App Service blade that hosts your JobServer, open the Configuration panel, and paste the instrumentation key in the corresponding apiKey value of the feature-logging-azure-appinsights application setting. For example:
    • Name: feature-logging-azure-appinsights
    • Value: enabled=1; logLevel=Verbose; flushInterval=1m; apiKey=<myInstrumentationKey>

Configure the JobServer Storage

The hosting App Service will provide storage for the JobServer WebJobs based on its AzureWebJobDashboards and AzureWebJobsStorage application settings. This storage is used only to run the WebJobs, not to store any JobServer logs (which are managed by the Application Insights service).

  1. In the Microsoft Azure portal, open your App Service blade and, in the Configuration panel, set the ftosStorageService-AzureBlob-connectionString and the ftosStorageService-AzureBlob-rootContainer application settings to your Azure Storage connection string.
  2. Open the FTOS.JobServer.AzureWebJob.exe.config file in the App Service editor and create a new section called ftosStorageService for your Azure Blob settings.
Copy
<configuration>

    <configSections>
        ...
        <section name="ftosStorageService" type="EBS.Core.Utils.Services.Config.StorageServiceConfiguration, EBS.Core.Utils"/>
        ...
    </configSections>
    
    ...
    <ftosStorageService type="AzureBlob">
        <settings>
        </settings>
    </ftosStorageService>
    ...
    
</configuration>

Set the Host Names for Job Servers Running on the Same App Service

If you wish to deploy multiple job servers on the same App Service, you need to assign different host names (all in small caps) to each job server. To do so, edit the FTOS.JobServer.AzureWebJob.exe.config configuration file and, int the appSettings section, set the JobHostName key to the desired host name.

Copy
<appSettings>
    ...
    <add key="JobHostName" value="hostjs" />
    ...
</appSettings>

Repeat for the FTOS.JobServer.AzureWebJobMC.exe.config and the FTOS.JobServer.AzureWebJobMB.exe.config files, to set up the host names for the JobServerMC and JobServerMB WebJobs.