SobekCM Repository Community Help
SobekCM Repository

Builder / Bulk Loader Installation and Configuration


The builder / bulk loader is a service application which runs in the background on a server. To perform some of the necessary tasks, several outside applications are necessary.

For additional information about this service, see the Builder / Bulk Loader Architecture Page.

You must install the version of the SobekCM Builder which matches your SobekCM Web version, due to ongoing database and solr schema changes.

Server Information

It is recommended to use the latest version of Windows Server (i.e. Server 2025, a natively 64-bit OS).

Generally it is recommended that it runs on a different server than the web server, since this will perform some CPU and memory intensive processes when creating image derivatives for example. This process will perform alot of database and solr/lucene updates, so it is recommended that it run on the same server as one or both of those services.

The builder must have access to the web server, database server, and solr/lucene server.

Software Installs

Installation of the following software packages is required for the builder to perform all processing steps. Recent versions of all of these are also present in the install bundles.

  1. Latest version of GhostScript ( gs902w##.exe in the install bundles ) for creating thumbnail images for submitted PDFs.

  2. Latest version of ImageMagick ( ImageMagick-6.7.1-0-Q16-windows-dll.exe in the install bundles ) for image derivative creation. If you download the latest version, the 16-bit windows dll version is recommended. You should restart the server after this install.

  3. A recent version of Microsoft Office for converting Word and Powerpoint documents to PDF. (This process is automated through the builder).

  4. To install the latest SobekCM Builder, see the notes below on Building and Deployment.

  5. For older (pre 5.0 release), you can run the installation MSI for the builder / bulk loader. ( 32-bit MSI | 64-bit MSI )

Building and Deployment

Use the following steps to build the latest SobekCM Builder and deploy it:

  1. Clone the SobekCM Github Repo locally

  2. Open a console window to the Code directory under the repo ( SobekCM-Web-Application\Code )

  3. Build the application, by running:

    dotnet "SobekCM Buidler.sln" --configuration release

  4. Copy the entire directory under SobekCM-Web-Application\Code\SobekCM Builder\bin\Release to your builder machine:

    robocopy "SobekCM-Web-Application\Code\SobekCM Builder\bin\Release" "D:\DestinationFolder" /MIR

  5. Update the sobekcm.config file under the config folder to point to your database instance. See section below for details.

Now test the builder by running it.

It is recommended to set a scheduled task to wake it up every morning on your builder machine (see next section>.

Configuration


Configuration File

Update the sobekcm.config file under the config folder to point to your database instance:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<SobekCM_Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://sobekrepository.org/schemas/sobekcm_config"
    xsi:schemaLocation="http://sobekrepository.org/schemas/sobekcm_config
    http://sobekrepository.org/schemas/sobekcm_config.xsd">
  <Instances>
    <Instance name="MYINSTANCE" active="true">
      <Connection_String type="MSSQL">data source=DATABASESERVER;initial catalog=MYDBNAME;user id=USER;password=PASSWORD</Connection_String>
      <Microservices>
        <Add Key="Builder.Get_Builder_Settings" URL="[BASEURL]/engine/builder/settings/protobuf?IncludeDescs={0}" Protocol="PROTOBUF" />
        <Add Key="Configuration.Extensions" URL="[BASEURL]/engine/config/extensions/protobuf" Protocol="PROTOBUF" />
        <Add Key="Configuration.Metadata" URL="[BASEURL]/engine/config/metadata/protobuf" Protocol="PROTOBUF" />
        <Add Key="Configuration.OAI_PMH" URL="[BASEURL]/engine/config/oaipmh/protobuf" Protocol="PROTOBUF" />
      </Microservices>
    </Instance>
  </Instances>
  <Builder>
    <Ghostscript_Executable>C:\Program Files\gs\gs9.18\bin\gswin64c.exe</Ghostscript_Executable>
    <Imagemagick_Executable>C:\Program Files\ImageMagick-7.1.1-Q16\convert.exe</Imagemagick_Executable>
  </Builder>
</SobekCM_Config>

You can also use integrated security, if that is what you are using in your database, or point at an RDS database. Likewise you can use type="POSTGRES" to use a PostgresSQL database.

You don't need to replace the "[BASEURL]", part you can leave that verbatim in the microservices portion of the configuration files. The builder will pull the settings from the database, and apply your base url to those microservice endpoints.

You can also use the same builder to run against several different instances by duplicating the instance tag.


Scheduled Task

This service is actually a console application which will run in the background until 11:00 pm (by default) every evening. It should be added as a scheduled task to start early each morning (usually 4am) so it can run continuously. It will sleep for a minute after each execution process before waking up and trying to perform more work. Set this task to run under the service account with highest priviledges. By default, the service will stop at 11pm each night. The action will be launching the SobekCM_Builder.exe application and the argument '--background' should be utilized to have the application run in background mode, rather than only once.

The screen shots below show the proper settings for the scheduled task.

Figure 1: Scheduled Task General Settings

Figure 2: Scheduled Task Triggers Settings

Figure 3: Scheduled Task Trigger Details

Figure 4: Scheduled Task Action Settings

Figure 5: Scheduled Task Action Details


Builder Configuration (Legacy)

Early versions of SobekCM shipped with a small configuration application, but this does not work with the current version. The first time it is installed on your machine, it should automatically launch. In addition, you can launch the configuration process in one of two ways, at any time:

  • Launch the SobekCM Builder from the command-line with '--config' as an argument
  • Navigate to the config subfolder under the application and launch the configuration tool there

The localization information for your instance of the SobekCM Builder is saved in a small XML file under the config subfolder. This configuration file provides several very basic configuration options for the builder:


Database TypeMicrosoft SQL Server is currently the only supported database, but work is progressing on adding PostgreSQL as an option.
Database Connection StringConnection string to connect the Builder to the SobekCM database.
Ghostscript Executable FilePath and name for the Ghostscript executable file, which is used to convert PDFs into TIFFs.
ImageMagick Executable FilePath and name for the ImageMagick executable file, which is used for image manipulation and jpeg creation.
Table 1: SobekCM Builder Settings in the Configuration File

The included configuration tool provides access initially to those settings during the install process. You can select the wrench next to the connection string box to have the system help you build a Microsoft SQL Server connectoin string.

Figure 6: SobekCM Configuration Form

Once you enter all the data necessary, select SAVE to rewrite the configuration file for the builder.

You can also use the configuration options to establish the SobekCM Builder incoming folders to use.

This completes the configuration of the Builder/Bulk Loader server.

Related Links