Table of Contents

Common usage

This repository provides a Dockerfile that permit starting Vertica in standalone / single-node mode using DockerVertica expects an external volume to be mounted on its /opt/vertica which means data is persisted accross container runs.The run command is a little bit more complicated and documented in the following section.

Extend it in another Dockerfile

You can of course derive an image from this one.Use the FROM docker directive from within your Dockerfile

FROM fjehl/docker-vertica:latest

Vertica is started using a verticad http://supervisord.org/index.html daemon, that emits a PROCESS_COMMUNICATION_STDOUT event on his stdout file descriptor. You can catch it using event handlers (see Supervisor documentation for this). Basically, your event handler should just send on its stdout a READY command once started, read lines from stdin, and issue a RESULT 2\nOK once finished, as in the Python script you'll find in the following http://supervisord.org/events.html.Nevertheless, you child image should

Add new supervisord programs or event handlers in /etc/supervisor/conf.d (they will get auto-loaded by the default supervisor.conf)

Have an entrypoint that runs supervisor like the current image

CMD ["/usr/bin/supervisord", "-n"]

Start a single-node cluster

To build and run a single-node cluster, you can use standard docker commands.

Building the image

Use docker build inside the image directory.

docker build -t fjehl/docker-vertica .

Starting the container

If you only need a single node cluster, you can use Docker run to run the image.Given that the RPM is installed at runtime, you need to download Vertica community edition at http://my.vertica.com, and store it somewhere: you need to provide it to the container.You also need to provide a directory mounted as /opt/vertica in the guest. It can be a named volume or any other location on the host.Don't forget to add the SYS_NICE and SYS_RESOURCE capacities, otherwise the startup script will fail starting Vertica.

You can now use all the popular GDB commands and features (n, step, bt, etc...) to debug your execution flow.You can follow this excellent cheat sheet if you never used GDB.

Advanced host configuration

You'll notice that some checks fail during installation. This is because some checks are indeed checking the host machines due to Docker not being a virtualization layer per se. If you want to have a clean install, consider fixing those below.