Updating udf_engines.conf for Secure UDFs
When setting up secure UDFs, you must update udf_engines.conf in the II_SYSTEM/ingres/data/vectorwise 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 unsecured process - NOT FOR PRODUCTION
[remote-process]
enabled=1
name=remote
port=32225
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 --tag $INSTANCE_TAG --nosigint"
# Enable this section to use secure 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 --isolation=hyperv --mount type=bind,source=\"%II_SYSTEM%\\ingres\\udf\\log\",target=C:/opt/ Actian/vectorwise-udf/log,ro=0 -- mounttype=bind,source=\"%II_SYSTEM%\\ingres\\udf\\import\",target=C:/opt/Actian/vectorwise-udf/ import,ro=0 --name
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 unsecured process - NOT FOR PRODUCTION
[remote-process]
enabled=1
name=remote
port=32225
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 --tag $INSTANCE_TAG --nosigint"
# Enable this section to use secure UDFs in a container on Linux. The default container runtime is Docker. [remote-container]
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="docker run -p $PORT:32225 -m 100MB --mount type=bind,source=/opt/Actian/vectorwise-udf/ log,target=/opt/Actian/vectorwise-udf/log,ro=0 --mount type=bind,source=/opt/Actian/vectorwise-udf/ import,target=/opt/Actian/vectorwise-udf/import,ro=0 --name udf$INSTANCE_TAG --user $UID:$GID vectorwise-udf"
Last modified date: 06/28/2024