Setting Up a Development Environment

Before you start developing your UDx, you need to configure your development and test environments. Development and test environments must use the same operating system and Vertica version as the production environment.

Development Environment Options

The language that you use to develop your UDx determines the setup options and requirements for your development environment. C++ developers can use the C++ UDx container, and all developers can use a non-production Vertica environment.

C++ UDx Container

C++ developers can develop with the the C++ UDx container. The UDx-container GitHub repository provides the tools to build a container that packages the binaries, libraries, and compilers required to develop C++ Vertica extensions. The C++ UDx container has the following build options:

  • CentOS or Ubuntu base image
  • Vertica 10.x and 11.x versions

For requirement, build, and test details, see the repository README.

Non-Production Vertica Environments

You can use a node in a non-production Vertica database or another machine that runs the same operating system and Vertica version as your production environment. For specific requirements and dependencies, refer to Operating System Requirements and Language Requirements.

Test Environment Options

To test your UDx, you need access to a non-production Vertica database. You have the following options:

  • Install a single-node Vertica database on your development machine.

  • Download and build a containerized test environment.

Containerized Test Environments

Vertica provides the following containerized options to simplify your test environment setup:

Operating System Requirements

Develop your UDx code on the same Linux platform that you use for your production Vertica database cluster. Centos- and Debian-based operating systems each require that you download additional packages.

CentOS-Based Operating Systems

Installations on the following CentOS-based operating systems require the devtoolset-7 package:

  • CentOS
  • Red Hat Enterprise Linux
  • Oracle Enterprise Linux

Consult the documentation for your operating system for the specific installation command.

Debian-Based Operating Systems

Installations on the following Debian-based operating systems require the GCC-7 package:

  • Debian
  • Ubuntu
  • SUSE
  • OpenSUSE
  • Amazon Linux (The GCC package is pre-installed on Amazon Linux)

Consult the documentation for your operating system for the specific installation command.

Language Requirements

The following sections detail the additional package requirements for each supported UDx development language.

C++ Requirements

At a minimum, install the following on your development machine:

  • g++ and its associated toolchain, such as ld. Some Linux distributions package g++ separately from gcc.
  • A copy of the Vertica SDK. See Setting Up the C++ SDK for details.

The Vertica binaries are compiled using the default version of g++ installed on the supported Linux platforms. Vertica requires a minimum of gcc version 4.8.4 and a maximum version of 7.3.

You must compile with the flag -std=c++11. The Vertica SDK uses features of C++ 11.

The following optional software packages can simplify development:

  • make, or some other build-management tool.
  • gdb, or some other debugger.
  • Valgrind, or similar tools that detect memory leaks.

If you want to use any third-party libraries, such as statistical analysis libraries, you need to install them on your development machine. If you do not statically link these libraries into your UDx library, you must install them on every node in the cluster. See Compiling Your C++ Library for details.

Java Requirements

At a minimum, install the following on your development machine:

Optionally, you can simplify development with a build-management tool, such as make.

Python Requirements

Vertica does not require any additional files or packages for Python UDx development. You can develop your Python UDx on any system with a text editor.

Your UDx must be able to run with the version of Python bundled with Vertica. You can find this with /opt/vertica/sbin/python3 --version. You cannot change the version used by the Vertica Python interpreter.

When Vertica calls your UDx, it starts a side process that manages the interaction between the server and the Python interpreter.

R Requirements

Vertica requires a version of the libgfortran4 library later than 7.1 to create R extensions. Libgfortran is included by default with the required devtool and GCC packages.