[GH-ISSUE #2957] Vertica Driver Configuration #1051

Closed
opened 2026-03-07 20:58:44 +03:00 by kerem · 0 comments
Owner

Originally created by @geleou on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/2957

Greetings! I'm currently in the process of deploying Cloudbeaver CE within a Docker container, attempting to
establish comms with a Vertica Database.

The first issue I'd like to point out, is that if someone wishes to deploy Cloudbeaver from within a container
(I suppose that's something quite natural for a cloud-oriented application), there seems to be no way of
configuring a 3rd party driver (like Vertica), without having to rebuild the image yourself (or run the app
locally). Why would configuring a separate database driver require for building the app from the ground up
(unless I'm missing something)? Also there should be more clear instructions on how to actually run the app
from within a container in that case (the default Dockerfile mentioned
here will not work - it clones the already built git repo as is).

The other issue I'm facing is that even though I've followed all steps to adding a new Vertica driver in cloudbeaver,
the web UI does not seem to be able to list it when creating a new connection.

Steps to reproduce:

  1. Clone the repo:
    git clone https://github.com/dbeaver/cloudbeaver.git
  2. Create a Dockerfile for building and running Cloudbeaver :
# Use a base image with Ubuntu 22.04
FROM ubuntu:22.04

# Set environment variables to prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install required packages
RUN apt-get update && apt-get install -y \
    curl \
    gnupg2 \
    openjdk-17-jdk \
    git \
    build-essential

# Install Maven 3.9.0 manually to ensure the correct version
RUN curl -sL https://archive.apache.org/dist/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz -o /tmp/maven.tar.gz && \
    tar -xzf /tmp/maven.tar.gz -C /opt && \
    ln -s /opt/apache-maven-3.9.0 /opt/maven && \
    ln -s /opt/maven/bin/mvn /usr/bin/mvn

# Add Yarn repository and install Node.js 20.x and Yarn
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
    echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
    curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get update && apt-get install -y yarn nodejs

# Uninstall conflicting packages related to Node.js 12.x
# RUN apt-get remove -y libnode72 libnode-dev
RUN apt-get purge -y libnode72 libnode-dev || true

# Set up working directory
WORKDIR /opt/cloudbeaver

# Copy the local CloudBeaver repository into the container
COPY cloudbeaver/. .

# Set the working directory to the deploy folder
WORKDIR /opt/cloudbeaver/deploy

# Build the application using the existing build.sh script
RUN ./build.sh

# Expose the default port CloudBeaver uses
EXPOSE 8978

WORKDIR /opt/cloudbeaver/deploy/cloudbeaver

# Set up the entry point to run the CloudBeaver server
RUN chmod +x run-server.sh

# Set the command to run the script
ENTRYPOINT ["./run-server.sh"]

  1. Create a vertica folder within cloudbeaver/server/drivers, paste the appropriate driver jar and create a pom.xml, that looks like this:
<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>drivers.vertica</artifactId>
    <version>1.0.0</version>
    <parent>
        <groupId>io.cloudbeaver</groupId>
        <artifactId>drivers</artifactId>
        <version>1.0.0</version>
        <relativePath>../</relativePath>
    </parent>

    <properties>
        <deps.output.dir>vertica</deps.output.dir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.vertica</groupId>
            <artifactId>vertica-jdbc</artifactId>
            <version>24.1.0-0</version>
            <scope>system</scope>
            <systemPath>/opt/cloudbeaver/server/drivers/vertica/vertica-jdbc-24.1.0-0.jar</systemPath>
        </dependency>
    </dependencies>

</project>


  1. Update the pom.xml of the cloudbeaver/drivers directory:
...
    <modules>
        <module>clickhouse_com</module>
        ...
        <module>vertica</module>
    </modules>
 ...
  1. Update the cloudbeaver/server/bundles/io.cloudbeaver.resources.drivers.base/plugins.xml:
...
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
    <!-- Resource mappings -->
    <extension point="org.jkiss.dbeaver.resources">
        ...
        <resource name="drivers/vertica"/>
    </extension>

    <!-- Bundles  -->
    <extension point="org.jkiss.dbeaver.product.bundles">
        ...
        <bundle id="drivers.vertica" label="Vertica drivers"/>
    </extension>

    <!-- Enabled drivers -->
    <extension point="io.cloudbeaver.driver">
        ...
        <driver id="generic:vertica"/>
    </extension>

</plugin>
...
  1. Create a docker-compose.yml:
services:
  cloudbeaver:
    image: cloudbeaver-vertica
    container_name: cloudbeaver
    restart: unless-stopped
    # ports:
    #   - "8978:8978" 
    volumes:
      - ./workspace:/opt/cloudbeaver/deploy/cloudbeaver/workspace
      - ./logs:/opt/cloudbeaver/deploy/cloudbeaver/logs          
      - ./cloudbeaver.conf:/opt/cloudbeaver/deploy/cloudbeaver/conf/cloudbeaver.conf 
  1. Build & Run:
docker build -t cloudbeaver-vertica .
docker compose up -d && docker compose logs -f

You've done a truly wonderful job to bringing the DBeaver client to cloud environments but I think documentation
is lacking in many aspects. I'd be more than happy to contribute if I somehow can.

Thank you!

Originally created by @geleou on GitHub (Oct 1, 2024). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/2957 Greetings! I'm currently in the process of deploying Cloudbeaver CE within a Docker container, attempting to establish comms with a Vertica Database. The first issue I'd like to point out, is that if someone wishes to deploy Cloudbeaver from within a container (I suppose that's something quite natural for a cloud-oriented application), there seems to be no way of configuring a 3rd party driver (like Vertica), without having to rebuild the image yourself (or run the app locally). Why would configuring a separate database driver require for building the app from the ground up (unless I'm missing something)? Also there should be more clear instructions on how to actually run the app from within a container in that case (the default Dockerfile mentioned [here](https://github.com/dbeaver/cloudbeaver/wiki/Run-Docker-Container#how-to-change-the-base-docker-image) will not work - it clones the already built git repo as is). The other issue I'm facing is that even though I've followed all steps to adding a new Vertica driver in cloudbeaver, the web UI does not seem to be able to list it when creating a new connection. Steps to reproduce: 1. Clone the repo: `git clone https://github.com/dbeaver/cloudbeaver.git` 2. Create a Dockerfile for building and running Cloudbeaver : ``` # Use a base image with Ubuntu 22.04 FROM ubuntu:22.04 # Set environment variables to prevent interactive prompts ENV DEBIAN_FRONTEND=noninteractive # Install required packages RUN apt-get update && apt-get install -y \ curl \ gnupg2 \ openjdk-17-jdk \ git \ build-essential # Install Maven 3.9.0 manually to ensure the correct version RUN curl -sL https://archive.apache.org/dist/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz -o /tmp/maven.tar.gz && \ tar -xzf /tmp/maven.tar.gz -C /opt && \ ln -s /opt/apache-maven-3.9.0 /opt/maven && \ ln -s /opt/maven/bin/mvn /usr/bin/mvn # Add Yarn repository and install Node.js 20.x and Yarn RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ curl -sL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get update && apt-get install -y yarn nodejs # Uninstall conflicting packages related to Node.js 12.x # RUN apt-get remove -y libnode72 libnode-dev RUN apt-get purge -y libnode72 libnode-dev || true # Set up working directory WORKDIR /opt/cloudbeaver # Copy the local CloudBeaver repository into the container COPY cloudbeaver/. . # Set the working directory to the deploy folder WORKDIR /opt/cloudbeaver/deploy # Build the application using the existing build.sh script RUN ./build.sh # Expose the default port CloudBeaver uses EXPOSE 8978 WORKDIR /opt/cloudbeaver/deploy/cloudbeaver # Set up the entry point to run the CloudBeaver server RUN chmod +x run-server.sh # Set the command to run the script ENTRYPOINT ["./run-server.sh"] ``` 3. Create a _vertica_ folder within _cloudbeaver/server/drivers_, paste the appropriate driver jar and create a pom.xml, that looks like this: ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>drivers.vertica</artifactId> <version>1.0.0</version> <parent> <groupId>io.cloudbeaver</groupId> <artifactId>drivers</artifactId> <version>1.0.0</version> <relativePath>../</relativePath> </parent> <properties> <deps.output.dir>vertica</deps.output.dir> </properties> <dependencies> <dependency> <groupId>com.vertica</groupId> <artifactId>vertica-jdbc</artifactId> <version>24.1.0-0</version> <scope>system</scope> <systemPath>/opt/cloudbeaver/server/drivers/vertica/vertica-jdbc-24.1.0-0.jar</systemPath> </dependency> </dependencies> </project> ``` 4. Update the pom.xml of the _cloudbeaver/drivers_ directory: ``` ... <modules> <module>clickhouse_com</module> ... <module>vertica</module> </modules> ... ``` 5. Update the _cloudbeaver/server/bundles/io.cloudbeaver.resources.drivers.base/plugins.xml_: ``` ... <?xml version="1.0" encoding="UTF-8"?> <plugin> <!-- Resource mappings --> <extension point="org.jkiss.dbeaver.resources"> ... <resource name="drivers/vertica"/> </extension> <!-- Bundles --> <extension point="org.jkiss.dbeaver.product.bundles"> ... <bundle id="drivers.vertica" label="Vertica drivers"/> </extension> <!-- Enabled drivers --> <extension point="io.cloudbeaver.driver"> ... <driver id="generic:vertica"/> </extension> </plugin> ... ``` 6. Create a docker-compose.yml: ``` services: cloudbeaver: image: cloudbeaver-vertica container_name: cloudbeaver restart: unless-stopped # ports: # - "8978:8978" volumes: - ./workspace:/opt/cloudbeaver/deploy/cloudbeaver/workspace - ./logs:/opt/cloudbeaver/deploy/cloudbeaver/logs - ./cloudbeaver.conf:/opt/cloudbeaver/deploy/cloudbeaver/conf/cloudbeaver.conf ``` 7. Build & Run: ``` docker build -t cloudbeaver-vertica . docker compose up -d && docker compose logs -f ``` You've done a truly wonderful job to bringing the DBeaver client to cloud environments but I think documentation is lacking in many aspects. I'd be more than happy to contribute if I somehow can. Thank you!
kerem 2026-03-07 20:58:44 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#1051
No description provided.