Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker 4.7 #524

Merged
merged 30 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e425f79
Updated MSSQL Server Client Libraries
pooja-jain-17 Feb 3, 2023
cfa94f7
Added libraries to support HammerDB GUI
pooja-jain-17 Feb 3, 2023
0d8d4b7
Merge branch 'TPC-Council:master' into docker-4.7
pooja-jain-17 Mar 2, 2023
be239e5
Updated base image from Ubuntu 20.04 to Ubuntu 22.04
pooja-jain-17 Mar 2, 2023
c6f73be
Updated Dockerfile entrypoint command that supports Kubernetes
pooja-jain-17 Mar 3, 2023
bb4500d
Updated HammerDB version to 4.7
pooja-jain-17 Mar 3, 2023
8c22fb3
Update to not explicitly add example scripts
pooja-jain-17 Mar 3, 2023
5b89489
Updated base image from Ubuntu 20.04 to Ubuntu 22.04
pooja-jain-17 Mar 3, 2023
f531992
Deleted scripts directory from within Docker folder
pooja-jain-17 Mar 3, 2023
cbb9962
Updated ReadMe
pooja-jain-17 Mar 3, 2023
5f127d8
Updated ReadMe
pooja-jain-17 Mar 3, 2023
e8ed190
Added database specific Dockerfiles and Readme files. Issue #506
pooja-jain-17 Mar 13, 2023
dce6fca
Update Readme
pooja-jain-17 Mar 14, 2023
b6dfab9
Update Readme
pooja-jain-17 Mar 14, 2023
301e44f
Rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
c539c00
Update Readme.md
pooja-jain-17 Mar 15, 2023
9850198
Update Readme.md
pooja-jain-17 Mar 15, 2023
b8adb11
Reverted back to Ubuntu 20.04
pooja-jain-17 Mar 15, 2023
7842512
Update and rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
2319c81
Update and rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
524bdae
Update Readme.md
pooja-jain-17 Mar 15, 2023
82075bc
Update and rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
7f0a75b
Update Readme.md
pooja-jain-17 Mar 15, 2023
a3af660
Update and rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
50682f8
Update and rename Readme to Readme.md
pooja-jain-17 Mar 15, 2023
d2155fd
Reverted to Ubuntu 20.04
pooja-jain-17 Mar 15, 2023
00430bb
Reverted to Ubuntu 20.04
pooja-jain-17 Mar 15, 2023
3577292
Update Dockerfile
pooja-jain-17 Mar 15, 2023
fbde711
Reverted to Ubuntu 20.04
pooja-jain-17 Mar 15, 2023
bcf9f3a
Reverted to Ubuntu 20.04
pooja-jain-17 Mar 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 37 additions & 24 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL maintainer="Pooja Jain"

# For apt install without question
Expand All @@ -14,23 +14,30 @@ WORKDIR /home/hammerdb
RUN apt update && \
apt -y upgrade && \
apt -y install -q \
apt -y wget unzip gnupg apt-utils libaio1 iputils-ping vim netcat
apt -y wget unzip gnupg apt-utils libaio1 iputils-ping vim netcat libxft-dev libcairo2-dev xauth

# Install and configure Microsoft SQLServer client libraries
RUN apt -y install -q \
RUN apt -y install -q \
apt -y curl gcc make && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/msprod.list && \
apt update && apt install -y lsb-release && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get -yq install mssql-tools && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile && \
wget http://www.unixodbc.org/unixODBC-2.3.9.tar.gz && tar -xzvf unixODBC-2.3.9.tar.gz && cd unixODBC-2.3.9 && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18 && \
ACCEPT_EULA=Y apt-get install -y mssql-tools18 && echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc && \
wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz && tar -xvzf unixODBC-2.3.11.tar.gz && cd unixODBC-2.3.11 && \
./configure --prefix=/usr/local/unixODBC --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 \
--with-iconv-ucode-enc=UTF16LE --enable-threads=yes --enable-fastvalidate && make && make install && cd .. && \
echo 'export PATH="$PATH:/opt/mssql-tools/bin:/usr/local/unixODBC/bin"' >> ~/.bashrc && \
echo 'export ODBCINI="/usr/local/unixODBC/etc/odbc.ini"' >> ~/.bashrc && \
echo 'export ODBCSYSINI="/usr/local/unixODBC/etc"' >> ~/.bashrc && \
echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/unixODBC/lib"' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip unixODBC-2.3.9
--with-iconv-ucode-enc=UTF16LE --enable-threads=yes --enable-fastvalidate && make && make install && cd .. && \
echo 'export PATH="$PATH:/opt/mssql-tools18/bin:/usr/local/unixODBC/bin" \n\
export ODBCINI="/usr/local/unixODBC/etc/odbc.ini" \n\
export ODBCSYSINI="/usr/local/unixODBC/etc" \n\
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/unixODBC/lib"' >> ~/.bashrc && \
echo "[ODBC Driver 18 for SQL Server] \n\
Description=Microsoft ODBC Driver 18 for SQL Server \n\
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1 \n\
UsageCount=1 " >> /usr/local/unixODBC/etc/odbcinst.ini && \
odbcinst -j && \
rm -rf *.tar.gz *.zip unixODBC-2.3.11

# Install and configure Oracle client libraries
RUN wget https://download.oracle.com/otn_software/linux/instantclient/215000/instantclient-basic-linux.x64-21.5.0.0.0dbru.zip && \
Expand Down Expand Up @@ -63,19 +70,25 @@ RUN apt install -y libmysqlclient21
#Install Python3.8
RUN apt install -y python3

# Install configure HammerDB-v4.6
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.6/HammerDB-4.6-Linux.tar.gz && \
tar -xvzf HammerDB-4.6-Linux.tar.gz && ls && \
# Install configure HammerDB-v4.7
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.7/HammerDB-4.7-Linux.tar.gz && \
tar -xvzf HammerDB-4.7-Linux.tar.gz && ls && \
echo 'export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip unixODBC-2.3.9
WORKDIR /home/hammerdb/HammerDB-4.6
rm -rf *.tar.gz *.zip
WORKDIR /home/hammerdb/HammerDB-4.7

# Adding some sample scripts to be used with HammerDB command line interface
ADD scripts /home/hammerdb/HammerDB-4.6/scripts

CMD "bash"
#CMD "bash"
CMD tail -f /dev/null

#To create an image: Go to the folder containing the Dockerfile
# docker build -t hammerdb-v4.6 .
# docker build -t hammerdb .
#To start a container with that image
# docker run -it --name hammerdb hammerdb-v4.6 bash
# docker run -it --name hammerdb hammerdb bash
#To use HammerDB in GUI Mode, make sure X11 forwarding is configured, Environemnt variable DISPLAY is set appropriately, for example on Ubuntu,
# export DISPLAY=localhost:10.0
# and also disable host control, by executing the following.
# xhost+
#you can then start container:
# docker run -it --rm -v /root/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY --network=host --name hammerdb hammerdb bash


44 changes: 31 additions & 13 deletions Docker/Readme
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
********************************
Release Notes for HammerDB 4.7
********************************

This folder provides a Dockerfile for building a HammerDb-v4.6 client container that supports all the databases HammerDB is enabled for, i.e. Oracle, Microsoft SQL Server, MySQL, PostgreSQL and MariaDB, Except for IBM Db2. We intend to add it in Future releases. you can follow the updates here.
Add Db2 libraries to Docker build
Track this issue with TPC-Council#404
Awaiting addition of sqlecrea and sqledrpd APIs to db2tcl to create and delete Db2 database from within HammerDB.
Track this issue with TPC-Council#431

This Dockerfile builds a HammerDb-v4.7 client container that supports all the databases HammerDB is enabled for, i.e. Oracle, Microsoft SQL Server, MySQL, PostgreSQL and MariaDB, except for IBM Db2. We intend to add it in Future releases. Follow the updates here.
Add Db2 libraries to Docker build
Track this issue with TPC-Council#404
Awaiting addition of sqlecrea and sqledrpd APIs to db2tcl to create and delete Db2 database from within HammerDB.
Track this issue with TPC-Council#431

To create an image: Go to the folder containing the Dockerfile
docker build -t hammerdb-v4.6 .
docker build -t hammerdb .

To start a container named "hammerdb" with the image, "hammerdb-v4.6" built from from Dockerfile
docker run -it --name hammerdb hammerdb-v4.6 bash
To start a container named "hammerdb" with the image, "hammerdb"
docker run -it --name hammerdb hammerdb bash

You will need to add networking to communicate with a remote database when starting the container
Networking is needed to communicate with a remote database when starting the container
For example, adding host network to the container.
docker run --network=host -it --name hammerdb hammerdb-v4.6 bash
docker run --network=host -it --name hammerdb hammerdb bash

HammerDB prebuild Docker images can be downloaded directly from Official TPC-Council HammerDB DockerHub, https://hub.docker.com/r/tpcorg/hammerdb
docker pull tpcorg/hammerdb

To view all the images available, go to https://hub.docker.com/r/tpcorg/hammerdb/tags

CLI sample scripts for each database are included under "scripts folder". Samples for TPROC-C and TPROC-H workloads are given both in python and tcl language.

These scripts are recommended to run from the HammerDB home directory, "~/HammerDB-4.6/"
These scripts are recommended to run from the HammerDB home directory, "~/HammerDB-4.7/"

Example Python scripts for MariaDB Database and HammerDb TPROC-C workload can be run as followed. This script builds schema, run an TPROC-C workload, delete schema and write results to a "~/HammerDB-4.6/TMP" directory.
Example Python scripts for MariaDB Database and HammerDb TPROC-C workload can be run as followed. This script builds schema, run an TPROC-C workload, delete schema and write results to a "~/HammerDB-4.7/TMP" directory.
./scripts/python/maria/tprocc/maria_tprocc_py.sh

Please note: Update the connection strings in eachs script
Expand All @@ -32,3 +39,14 @@ Please note: Update the connection strings in eachs script

Format is similar for every database.

To use HammerDB in GUI Mode, make sure X11 forwarding is configured, environemnt variable DISPLAY is set appropriately, for example on Ubuntu,
export DISPLAY=localhost:10.0
Additionally disable host control, by executing the following.
xhost+
To start container:
docker run -it --rm -v ~/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY --network=host --name hammerdb hammerdb bash


Refer to the HammerDB blog for more information.
https://www.hammerdb.com/blog/uncategorized/how-to-deploy-hammerdb-cli-fast-with-docker/
**********************************************************************************************************
47 changes: 47 additions & 0 deletions Docker/maria/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:22.04
LABEL maintainer="Pooja Jain"

# For apt install without question
ARG DEBIAN_FRONTEND=noninteractive

# Enable apt sources
RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list

# Set working directory
WORKDIR /home/hammerdb

# Update & upgrade apt and download basic utilities
RUN apt update && \
apt -y upgrade && \
apt -y install -q \
apt -y wget unzip gnupg apt-utils libaio1 iputils-ping vim netcat libxft-dev libcairo2-dev xauth


# Install and Configure MariaDB client libraries
RUN apt install -y libmariadb3

#Install Python3.8
RUN apt install -y python3

# Install configure HammerDB-v4.7
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.7/HammerDB-4.7-Linux.tar.gz && \
tar -xvzf HammerDB-4.7-Linux.tar.gz && ls && \
echo 'export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip
WORKDIR /home/hammerdb/HammerDB-4.7

#CMD "bash"
CMD tail -f /dev/null

#To create an image: Go to the folder containing the Dockerfile
# docker build -t hammerdb .
#To start a container with that image
# docker run -it --name hammerdb hammerdb bash
#To use HammerDB in GUI Mode, make sure X11 forwarding is configured, Environemnt variable DISPLAY is set appropriately, for example on Ubuntu,
# export DISPLAY=localhost:10.0
# and also disable host control, by executing the following.
# xhost+
#you can then start container:
# docker run -it --rm -v /root/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY --network=host --name hammerdb hammerdb bash


16 changes: 16 additions & 0 deletions Docker/maria/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This Dockerfile builds HammerDB client environemnt that support MariaDB Database

To create an image: Go to the folder containing the Dockerfile
docker build -t hammerdb:maria .

To start a container named "hammerdb" with the image, "hammerdb" built from from Dockerfile
docker run -it --name hammerdb-maria hammerdb:maria bash

You will need to add networking to communicate with a remote database when starting the container
For example, adding host network to the container.
docker run --network=host -it --name hammerdb-maria hammerdb:maria bash

HammerDB prebuild Docker images can downloaded directly from Official TPC-Council HammerDB DockerHub, https://hub.docker.com/r/tpcorg/hammerdb
docker pull tpcorg/hammerdb:maria


66 changes: 66 additions & 0 deletions Docker/mssqls/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM ubuntu:22.04
LABEL maintainer="Pooja Jain"

# For apt install without question
ARG DEBIAN_FRONTEND=noninteractive

# Enable apt sources
RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list

# Set working directory
WORKDIR /home/hammerdb

# Update & upgrade apt and download basic utilities
RUN apt update && \
apt -y upgrade && \
apt -y install -q \
apt -y wget unzip gnupg apt-utils libaio1 iputils-ping vim netcat libxft-dev libcairo2-dev xauth

# Install and configure Microsoft SQLServer client libraries
RUN apt -y install -q \
apt -y curl gcc make && \
apt update && apt install -y lsb-release && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18 && \
ACCEPT_EULA=Y apt-get install -y mssql-tools18 && echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc && \
wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz && tar -xvzf unixODBC-2.3.11.tar.gz && cd unixODBC-2.3.11 && \
./configure --prefix=/usr/local/unixODBC --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 \
--with-iconv-ucode-enc=UTF16LE --enable-threads=yes --enable-fastvalidate && make && make install && cd .. && \
echo 'export PATH="$PATH:/opt/mssql-tools18/bin:/usr/local/unixODBC/bin" \n\
export ODBCINI="/usr/local/unixODBC/etc/odbc.ini" \n\
export ODBCSYSINI="/usr/local/unixODBC/etc" \n\
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/unixODBC/lib"' >> ~/.bashrc && \
echo "[ODBC Driver 18 for SQL Server] \n\
Description=Microsoft ODBC Driver 18 for SQL Server \n\
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1 \n\
UsageCount=1 " >> /usr/local/unixODBC/etc/odbcinst.ini && \
odbcinst -j && \
rm -rf *.tar.gz *.zip unixODBC-2.3.11

#Install Python3.8
RUN apt install -y python3

# Install configure HammerDB-v4.7
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.7/HammerDB-4.7-Linux.tar.gz && \
tar -xvzf HammerDB-4.7-Linux.tar.gz && ls && \
echo 'export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip
WORKDIR /home/hammerdb/HammerDB-4.7

#CMD "bash"
CMD tail -f /dev/null

#To create an image: Go to the folder containing the Dockerfile
# docker build -t hammerdb .
#To start a container with that image
# docker run -it --name hammerdb hammerdb bash
#To use HammerDB in GUI Mode, make sure X11 forwarding is configured, Environemnt variable DISPLAY is set appropriately, for example on Ubuntu,
# export DISPLAY=localhost:10.0
# and also disable host control, by executing the following.
# xhost+
#you can then start container:
# docker run -it --rm -v /root/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY --network=host --name hammerdb hammerdb bash


16 changes: 16 additions & 0 deletions Docker/mssqls/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This Dockerfile builds HammerDB client environemnt that support Microsoft SQL Server Database

To create an image: Go to the folder containing the Dockerfile
docker build -t hammerdb:mssqls .

To start a container named "hammerdb" with the image, "hammerdb" built from from Dockerfile
docker run -it --name hammerdb-mssqls hammerdb:mssqls bash

You will need to add networking to communicate with a remote database when starting the container
For example, adding host network to the container.
docker run --network=host -it --name hammerdb-mssqls hammerdb:mssqls bash

HammerDB prebuild Docker images can downloaded directly from Official TPC-Council HammerDB DockerHub, https://hub.docker.com/r/tpcorg/hammerdb
docker pull tpcorg/hammerdb:mssqls


46 changes: 46 additions & 0 deletions Docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:22.04
LABEL maintainer="Pooja Jain"

# For apt install without question
ARG DEBIAN_FRONTEND=noninteractive

# Enable apt sources
RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list

# Set working directory
WORKDIR /home/hammerdb

# Update & upgrade apt and download basic utilities
RUN apt update && \
apt -y upgrade && \
apt -y install -q \
apt -y wget unzip gnupg apt-utils libaio1 iputils-ping vim netcat libxft-dev libcairo2-dev xauth

# Install and configuring MySQL client libraries
RUN apt install -y libmysqlclient21

#Install Python3.8
RUN apt install -y python3

# Install configure HammerDB-v4.7
RUN wget https://github.com/TPC-Council/HammerDB/releases/download/v4.7/HammerDB-4.7-Linux.tar.gz && \
tar -xvzf HammerDB-4.7-Linux.tar.gz && ls && \
echo 'export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH' >> ~/.bashrc && \
rm -rf *.tar.gz *.zip
WORKDIR /home/hammerdb/HammerDB-4.7

#CMD "bash"
CMD tail -f /dev/null

#To create an image: Go to the folder containing the Dockerfile
# docker build -t hammerdb .
#To start a container with that image
# docker run -it --name hammerdb hammerdb bash
#To use HammerDB in GUI Mode, make sure X11 forwarding is configured, Environemnt variable DISPLAY is set appropriately, for example on Ubuntu,
# export DISPLAY=localhost:10.0
# and also disable host control, by executing the following.
# xhost+
#you can then start container:
# docker run -it --rm -v /root/.Xauthority:/root/.Xauthority -e DISPLAY=$DISPLAY --network=host --name hammerdb hammerdb bash


16 changes: 16 additions & 0 deletions Docker/mysql/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This Dockerfile builds HammerDB client environemnt that support MySQL Database

To create an image: Go to the folder containing the Dockerfile
docker build -t hammerdb:mysql .

To start a container named "hammerdb" with the image, "hammerdb" built from from Dockerfile
docker run -it --name hammerdb-mysql hammerdb:mysql bash

You will need to add networking to communicate with a remote database when starting the container
For example, adding host network to the container.
docker run --network=host -it --name hammerdb-mysql hammerdb:mysql bash

HammerDB prebuild Docker images can downloaded directly from Official TPC-Council HammerDB DockerHub, https://hub.docker.com/r/tpcorg/hammerdb
docker pull tpcorg/hammerdb:mysql


Loading