Skip to content

Commit

Permalink
Bexhoma: Back to debian variant for dbmsbenchmarker (Java issues) - EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
perdelt committed Dec 16, 2024
1 parent 23e8f79 commit 785af8c
Show file tree
Hide file tree
Showing 6 changed files with 12,481 additions and 134 deletions.
102 changes: 35 additions & 67 deletions images/benchmarker_dbmsbenchmarker/Dockerfile_template
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#FROM python:3.12.5
FROM alpine:3.15
FROM python:3.12.8

# does not compile numpy correctly
# FROM python:3.13-rc-slim

WORKDIR /usr/src/app

Expand All @@ -10,81 +12,35 @@ ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False
ENV DBMSBENCHMARKER_TESTRUN 0

# does not compile numpy correctly
# FROM python:3.13-rc-slim

# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
RUN apk add --no-cache \
build-base \
linux-headers \
libffi-dev \
openssl-dev \
zlib-dev \
bzip2-dev \
xz-dev \
readline-dev \
sqlite-dev \
ncurses-dev \
util-linux-dev \
libressl-dev \
tar \
curl

# Download, extract, and compile Python
RUN curl -fSL $PYTHON_SRC -o /tmp/Python.tgz && \
tar -xzf /tmp/Python.tgz -C /tmp && \
cd /tmp/Python-$PYTHON_VERSION && \
./configure --enable-optimizations && \
make && \
make install && \
rm -rf /tmp/Python.tgz /tmp/Python-$PYTHON_VERSION

# Verify Python installation
RUN python3.12 --version && pip3 --version

# Set default python and pip to Python 3.12
RUN ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \
ln -sf /usr/local/bin/pip3 /usr/local/bin/pip
RUN apt update
RUN apt install default-jre -y

WORKDIR /usr/src/app

# Update package index and install necessary packages
RUN apk update && apk add --no-cache \
openjdk17-jre \
zip \
nano
# only needed in slim releases
# RUN apt install git -y
# RUN apt install build-essential -y

RUN mkdir /results
RUN pip uninstall dbmsbenchmarker -y
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/DBMS-Benchmarker@{version}

RUN apk add --no-cache bash
# we only need packages required by dbmsbenchmarker
#COPY requirements.txt ./
#RUN pip install --no-cache-dir -r requirements.txt

SHELL ["/bin/bash", "-c"]
RUN git clone https://github.com/Beuth-Erdelt/DBMS-Benchmarker --branch {version}

ENV VIRTUAL_ENV=/opt/venv
WORKDIR /usr/src/app/DBMS-Benchmarker

# CMD sleep3600
# RUN git pull

RUN python -m pip install virtualenv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
#COPY . .

RUN apk add --no-cache git
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/DBMS-Benchmarker@{version}
RUN apt install nano -y

WORKDIR /usr/src/app/DBMS-Benchmarker
RUN mkdir -p /results
RUN mkdir -p /results/$DBMSBENCHMARKER_CODE

ENV DBMSBENCHMARKER_SLEEP 30
ENV DBMSBENCHMARKER_RECREATE_PARAMETER 0
ENV DBMSBENCHMARKER_VERBOSE 0
ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN mkdir -p jars/

Expand All @@ -102,9 +58,15 @@ RUN wget https://dlm.mariadb.com/2678616/Connectors/java/connector-java-3.1.0/ma
RUN cp mariadb-java-client-3.1.0.jar jars/mariadb-java-client-3.1.0.jar

######### Specific version of MonetDB JDBC #########
#RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.2.jre8.jar --no-check-certificate
#RUN cp monetdb-jdbc-3.2.jre8.jar jars/monetdb-jdbc-3.2.jre8.jar
RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of MonetDB JDBC #########
RUN wget https://www.monetdb.org/downloads/Java/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of SingleStore JDBC #########
RUN wget https://github.com/memsql/S2-JDBC-Connector/releases/download/v1.1.4/singlestore-jdbc-client-1.1.4.jar
RUN cp singlestore-jdbc-client-1.1.4.jar jars/singlestore-jdbc-client-1.1.4.jar
Expand All @@ -121,10 +83,16 @@ RUN cp jdbc-yugabytedb-42.3.5-yb-2.jar jars/jdbc-yugabytedb-42.3.5-yb-2.jar


######### Redis Client - Download and compile #########
RUN apk add --no-cache make cmake gcc libc-dev
RUN cd /tmp; wget http://download.redis.io/redis-stable.tar.gz; tar xvzf redis-stable.tar.gz; cd redis-stable; make; cp src/redis-cli /usr/local/bin/; chmod 755 /usr/local/bin/redis-cli


RUN mkdir -p tpc-ds

COPY ./connections.config ./tpc-ds/connections.config
COPY ./queries.config ./tpc-ds/queries.config
RUN ["chmod", "+x", "./tpc-ds/connections.config"]
RUN ["chmod", "+x", "./tpc-ds/queries.config"]

COPY ./benchmarker.sh ./benchmarker.sh
RUN ["chmod", "+x", "./benchmarker.sh"]

Expand Down
163 changes: 163 additions & 0 deletions images/benchmarker_dbmsbenchmarker/Dockerfile_template_alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#FROM python:3.12.5
FROM alpine:3.15

WORKDIR /usr/src/app

ENV DBMSBENCHMARKER_SLEEP 30
ENV DBMSBENCHMARKER_RECREATE_PARAMETER 0
ENV DBMSBENCHMARKER_VERBOSE 0
ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

# does not compile numpy correctly
# FROM python:3.13-rc-slim

# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
RUN apk add --no-cache \
build-base \
linux-headers \
libffi-dev \
openssl-dev \
zlib-dev \
bzip2-dev \
xz-dev \
readline-dev \
sqlite-dev \
ncurses-dev \
util-linux-dev \
libressl-dev \
tar \
curl

# Download, extract, and compile Python
RUN curl -fSL $PYTHON_SRC -o /tmp/Python.tgz && \
tar -xzf /tmp/Python.tgz -C /tmp && \
cd /tmp/Python-$PYTHON_VERSION && \
./configure --enable-optimizations && \
make && \
make install && \
rm -rf /tmp/Python.tgz /tmp/Python-$PYTHON_VERSION

# Verify Python installation
RUN python3.12 --version && pip3 --version

# Set default python and pip to Python 3.12
RUN ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \
ln -sf /usr/local/bin/pip3 /usr/local/bin/pip

WORKDIR /usr/src/app

# Update package index and install necessary packages
RUN apk update && apk add --no-cache \
openjdk11-jre \
zip \
nano

RUN mkdir /results

RUN apk add --no-cache bash

SHELL ["/bin/bash", "-c"]

ENV VIRTUAL_ENV=/opt/venv

# CMD sleep3600

RUN python -m pip install virtualenv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apk add --no-cache git
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/DBMS-Benchmarker@{version}
RUN git clone https://github.com/Beuth-Erdelt/DBMS-Benchmarker --branch {version}

WORKDIR /usr/src/app/DBMS-Benchmarker

ENV DBMSBENCHMARKER_SLEEP 30
ENV DBMSBENCHMARKER_RECREATE_PARAMETER 0
ENV DBMSBENCHMARKER_VERBOSE 0
ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN mkdir -p jars/

######### Specific version of PostgreSQL JDBC #########
RUN wget https://jdbc.postgresql.org/download/postgresql-42.5.0.jar --no-check-certificate
RUN cp postgresql-42.5.0.jar jars/postgresql-42.5.0.jar

######### Specific version of MySQL JDBC #########
RUN wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-8.0.31.tar.gz
RUN tar -zxvf mysql-connector-j-8.0.31.tar.gz
RUN cp mysql-connector-j-8.0.31/mysql-connector-j-8.0.31.jar jars/mysql-connector-j-8.0.31.jar

######### Specific version of MariaDB JDBC #########
RUN wget https://dlm.mariadb.com/2678616/Connectors/java/connector-java-3.1.0/mariadb-java-client-3.1.0.jar
RUN cp mariadb-java-client-3.1.0.jar jars/mariadb-java-client-3.1.0.jar

######### Specific version of MonetDB JDBC #########
RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of SingleStore JDBC #########
RUN wget https://github.com/memsql/S2-JDBC-Connector/releases/download/v1.1.4/singlestore-jdbc-client-1.1.4.jar
RUN cp singlestore-jdbc-client-1.1.4.jar jars/singlestore-jdbc-client-1.1.4.jar

######### Specific version of Kinetica JDBC #########
RUN wget https://github.com/kineticadb/kinetica-client-jdbc/archive/refs/tags/v7.1.8.7.tar.gz
RUN tar -zxvf v7.1.8.7.tar.gz
RUN cp kinetica-client-jdbc-7.1.8.7/kinetica-jdbc-7.1.8.7-jar-with-dependencies.jar jars/kinetica-jdbc-7.1.8.7-jar-with-dependencies.jar

######### Specific version of YugabyteDB JDBC #########
RUN wget https://github.com/yugabyte/pgjdbc/releases/download/v42.3.5-yb-2/jdbc-yugabytedb-42.3.5-yb-2.jar
RUN cp jdbc-yugabytedb-42.3.5-yb-2.jar jars/jdbc-yugabytedb-42.3.5-yb-2.jar



######### Redis Client - Download and compile #########
RUN apk add --no-cache make cmake gcc libc-dev
RUN cd /tmp; wget http://download.redis.io/redis-stable.tar.gz; tar xvzf redis-stable.tar.gz; cd redis-stable; make; cp src/redis-cli /usr/local/bin/; chmod 755 /usr/local/bin/redis-cli


COPY ./benchmarker.sh ./benchmarker.sh
RUN ["chmod", "+x", "./benchmarker.sh"]

RUN apk add gcompat

RUN mkdir -p tpc-ds
COPY ./connections.config ./tpc-ds/connections.config
COPY ./queries.config ./tpc-ds/queries.config
RUN ["chmod", "+x", "./tpc-ds/connections.config"]
RUN ["chmod", "+x", "./tpc-ds/queries.config"]

CMD ["/bin/bash", "-c", "./benchmarker.sh"]

#CMD git pull; python ./benchmark.py run -b -d -w connection \
# -f /results/$DBMSBENCHMARKER_CODE \
# -r /results/$DBMSBENCHMARKER_CODE \
# -mps \
# -cs -sf $DBMSBENCHMARKER_CONNECTION \
# -ms $DBMSBENCHMARKER_CLIENT \
# -sl $DBMSBENCHMARKER_SLEEP \
# -st "$DBMSBENCHMARKER_START" \
# -c "$DBMSBENCHMARKER_CONNECTION" \
# -ca "$DBMSBENCHMARKER_ALIAS" \
# -cf ${DBMSBENCHMARKER_CONNECTION}.config \

# -f config folder
# -r result folder
# -mps monitor per stream (not per query)
# -cs -sf subfolder per dbms (connection)
# -ms max number of subfolders
# -sl sleep seconds before start benchmarking
# -st start time for operating
# -c name of dbms (connection) to benchmark
# -ca alias for dbms (connection) to benchmark
# -cf config of dbms (connection)
Loading

0 comments on commit 785af8c

Please sign in to comment.