Updating udf_engines.conf for Containerized UDFs
When setting up containerized UDFs, you must update udf_engines.conf in the II_SYSTEM/ingres/files directory, as follows:
1. Set enabled=0 in the section [remote-process].
2. Set enabled=1 in the section [remote-container-linux] for Linux operating systems or section [remote-container-win] for Windows.
Note: Only one section can be enabled at a time in the conf file.
You may need to customize the [remote-container] configuration, as follows:
• command - If you are not using Docker as the container runtime, you must replace the command with the CLI command for your runtime tool. For Windows, verify that docker.exe is available via the path in the command. The path is preset to the default installation directory for docker, but may need to be modified for your install.
• port - The default port used to communicate between the database and UDF engine is based on the installation ID. Change this only if there is a conflict with the existing port.
• mounts -Two mounts map internal container paths to real paths on your server:
• II_SYSTEM/ingres/udf/import is used for all UDF imports (JS and Python).
• II_SYSTEM/ingres/udf/log is used to persist the UDF engine log file.
Leave the rest of the configuration file as is.
Note: To modify the command paths for Windows installations, you must escape all backslash characters with a backslash. Escaped quotes will also be needed if the path contains spaces.
udf_engines.conf Example
The following is an example of udf_engines.conf when using Windows:
######################################################
# X100 UDF engine configuration
#
# NOTE: ONLY ENABLE A SINGE SECTION BELOW
# Enable this section to use UDFs in an non-containerized process - NOT FOR PRODUCTION
[remote-process]
enabled=1
name=remote
port=0
host="127.0.0.1"
socket_retry=3
launch=1
is_container=no
processes=1
pool_limit=16
command ="x100_udf_engine --port $PORT --set system/udf_languages=$UDF_LANGUAGES --set system/udf_props=$UDF_PROPS --port_file \"$PORT_FILE_PATH\" --nosigint"
# Enable this section to use containerized UDFs in a container on Windows. The default container runtime is Docker.
[remote-container-win]
enabled=0
name=remote
port=32225
host="127.0.0.1"
socket_retry=3
launch=1
processes=1
is_container=yes
pool_limit=16
command="\"C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe\" run -p $PORT:32225 -m 512MB --rm --isolation=hyperv --mount type=bind,source=\"$II_SYSTEM\\ingres\\udf\\log\",target=C:/opt/Actian/vectorwise-udf/log,ro=0 --mount type=bind,source=\"$II_SYSTEM\\ingres\\udf\\import\",target=C:/opt/Actian/vectorwise-udf/import,ro=0 --name udf$INSTANCE_TAG actian/actianx12.0-udf-win:1.0.0""
The following is an example of udf_engines.conf when using Linux:
######################################################
# X100 UDF engine configuration #
# NOTE: ONLY ENABLE A SINGE SECTION BELOW
# Enable this section to use UDFs in an non-containerized process - NOT FOR PRODUCTION
[remote-process]
enabled=1
name=remote
port=0
host="127.0.0.1"
socket_retry=3
launch=1
is_container=no
processes=1
pool_limit=16
command ="x100_udf_engine --port $PORT --set system/udf_languages=$UDF_LANGUAGES --set system/udf_props=$UDF_PROPS --port_file \"$PORT_FILE_PATH\" --nosigint"
# Enable this section to use Containerized UDFs in a container on Linux. The default container runtime is Docker.
[remote-container-linux]
enabled=0
name=remote
port=33694
host="127.0.0.1"
socket_retry=3
launch=1
processes=1
is_container=yes
pool_limit=16
command="/usr/bin/docker run -p $PORT:32225 --rm -m 512MB --mount type=bind,source=$II_SYSTEM/ingres/udf/log,target=/opt/actian/vectorwise-udf/log,ro=0 --mount type=bind,source=$II_SYSTEM/ingres/udf/import,target=/opt/actian/vectorwise-udf/import,ro=0 --name udf$INSTANCE_TAG --user $UID:$GID actian/actianx12.0-udf:1.0.0"
Last modified date: 08/14/2024