From bfd40fc2095e6cde1780e8e48b6acb06987fc18f Mon Sep 17 00:00:00 2001 From: David Valin Date: Tue, 28 Oct 2025 04:43:41 -0400 Subject: [PATCH 1/4] Packaging updates --- hammerdb/hammerdb | 8 +++-- hammerdb/hammerdb_mariadb.json | 62 +++++++++++++++++++++++++++++++++ hammerdb/hammerdb_postgres.json | 62 +++++++++++++++++++++++++++++++++ hammerdb/install-script | 14 -------- 4 files changed, 130 insertions(+), 16 deletions(-) create mode 100644 hammerdb/hammerdb_mariadb.json create mode 100644 hammerdb/hammerdb_postgres.json diff --git a/hammerdb/hammerdb b/hammerdb/hammerdb index 2e911f8..be82f24 100755 --- a/hammerdb/hammerdb +++ b/hammerdb/hammerdb @@ -131,8 +131,6 @@ ${curdir}/test_tools/gather_data ${curdir} source test_tools/general_setup "$@" export TOOLS_BIN -dnf -y install lvm2 - unset DISPLAY users_to_run="" test="none" @@ -276,6 +274,12 @@ if [[ $test == "none" ]]; then usage $0 fi +${TOOLS_BIN}/package_tool --wrapper_config ${run_dir}/hammerdb_${test}.json --no_packages $to_no_pkg_install +if [[ $? -ne 0 ]]; then + echo Packaging installed failed. + exit 1 +fi + create_and_mount_fs # diff --git a/hammerdb/hammerdb_mariadb.json b/hammerdb/hammerdb_mariadb.json new file mode 100644 index 0000000..1c235de --- /dev/null +++ b/hammerdb/hammerdb_mariadb.json @@ -0,0 +1,62 @@ +{ + "dependencies": { + "amzn": [ + "gcc", + "bc", + "zip", + "unzip", + "numactl", + "wget", + "gcc-c++", + "autoconf", + "hwloc", + "hwloc-gui", + "libomp" + ], + "rhel": [ + "lvm2", + "sysstat", + "tar", + "bc", + "perf", + "git", + "unzip", + "zip", + "mariadb", + "mariadb-common", + "mariadb-errmsg", + "mariadb-server", + "mariadb-server-utils" + ], + "sles": [ + "gcc", + "make", + "bc", + "perf", + "git", + "unzip", + "zip", + "libnuma1", + "numactl", + "wget", + "gcc-c++", + "autoconf", + "hwloc", + "hwloc-gui", + "libomp" + ], + "ubuntu": [ + "bc", + "zip", + "unzip", + "numactl", + "libnuma-dev", + "g++", + "autoconf", + "hwloc", + "libomp5-20" + ], + "pip": [ + ] + } +} diff --git a/hammerdb/hammerdb_postgres.json b/hammerdb/hammerdb_postgres.json new file mode 100644 index 0000000..9f937bd --- /dev/null +++ b/hammerdb/hammerdb_postgres.json @@ -0,0 +1,62 @@ +{ + "dependencies": { + "amzn": [ + "gcc", + "bc", + "zip", + "unzip", + "numactl", + "wget", + "gcc-c++", + "autoconf", + "hwloc", + "hwloc-gui", + "libomp" + ], + "rhel": [ + "lvm2", + "sysstat", + "tar", + "bc", + "perf", + "git", + "unzip", + "zip", + "postgresql", + "postgresql-contrib", + "postgresql-server", + "glibc-langpack-en", + "libpq" + ], + "sles": [ + "gcc", + "make", + "bc", + "perf", + "git", + "unzip", + "zip", + "libnuma1", + "numactl", + "wget", + "gcc-c++", + "autoconf", + "hwloc", + "hwloc-gui", + "libomp" + ], + "ubuntu": [ + "bc", + "zip", + "unzip", + "numactl", + "libnuma-dev", + "g++", + "autoconf", + "hwloc", + "libomp5-20" + ], + "pip": [ + ] + } +} diff --git a/hammerdb/install-script b/hammerdb/install-script index 9aebc8c..b72d86e 100755 --- a/hammerdb/install-script +++ b/hammerdb/install-script @@ -81,15 +81,6 @@ install_mssql() install_mariadb() { - # - # Install Mariadb Server and tools - # -# dnf -y install mariadb mariadb-common mariadb-devel \ -# mariadb-errmsg mariadb-server mariadb-server-utils mysql-libs - dnf -y install mariadb mariadb-common \ - mariadb-errmsg mariadb-server mariadb-server-utils - - # # Configure things in and mount the appropriate item. # @@ -144,11 +135,6 @@ install_mariadb() install_postgres() { - # - # Installing Postgres Server and tools - # - dnf -y install postgresql postgresql-contrib postgresql-server glibc-langpack-en libpq - cd /usr/local/HammerDB cp -R /tmp/hammerdb-tpcc/postgres/* . From f2a8afa2ee77093ae3be661d5449fc1ac5da1962 Mon Sep 17 00:00:00 2001 From: David Valin Date: Tue, 28 Oct 2025 04:45:25 -0400 Subject: [PATCH 2/4] Change exec_dir to be run_dir to keep things consistant with other scripts. --- hammerdb/hammerdb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hammerdb/hammerdb b/hammerdb/hammerdb index be82f24..fc7db4d 100755 --- a/hammerdb/hammerdb +++ b/hammerdb/hammerdb @@ -27,14 +27,14 @@ curdir=`pwd` if [[ $0 == "./"* ]]; then chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` if [[ $chars == 1 ]]; then - exec_dir=`pwd` + run_dir=`pwd` else - exec_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` - exec_dir="${curdir}${exec_dir}" + run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` + run_dir="${curdir}${run_dir}" fi else chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` - exec_dir=`echo $0 | cut -d'/' -f 1-${chars}` + run_dir=`echo $0 | cut -d'/' -f 1-${chars}` fi @@ -298,7 +298,7 @@ if [[ $to_use_pcp -eq 1 ]]; then pcp="-p ${pdir}" cpdir="--copy_dir $pdir" fi -cd $exec_dir +cd $run_dir echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} -T ${TOOLS_BIN} $pcp > run_this chmod 755 run_this ./run_this From d2acd043f202d45e8db589f2021ecca2d2e02694 Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 29 Oct 2025 09:03:21 -0400 Subject: [PATCH 3/4] Install dbase packages separate from the standard packages. --- hammerdb/hammerdb.json | 14 ++++++++++ hammerdb/hammerdb_mariadb.json | 49 --------------------------------- hammerdb/hammerdb_postgres.json | 49 --------------------------------- hammerdb/install-script | 6 ++++ 4 files changed, 20 insertions(+), 98 deletions(-) create mode 100644 hammerdb/hammerdb.json diff --git a/hammerdb/hammerdb.json b/hammerdb/hammerdb.json new file mode 100644 index 0000000..2d1574f --- /dev/null +++ b/hammerdb/hammerdb.json @@ -0,0 +1,14 @@ +{ + "dependencies": { + "rhel": [ + "lvm2", + "sysstat", + "bc", + "git", + "unzip", + "zip" + ], + "pip": [ + ] + } +} diff --git a/hammerdb/hammerdb_mariadb.json b/hammerdb/hammerdb_mariadb.json index 1c235de..f948023 100644 --- a/hammerdb/hammerdb_mariadb.json +++ b/hammerdb/hammerdb_mariadb.json @@ -1,61 +1,12 @@ { "dependencies": { - "amzn": [ - "gcc", - "bc", - "zip", - "unzip", - "numactl", - "wget", - "gcc-c++", - "autoconf", - "hwloc", - "hwloc-gui", - "libomp" - ], "rhel": [ - "lvm2", - "sysstat", - "tar", - "bc", - "perf", - "git", - "unzip", - "zip", "mariadb", "mariadb-common", "mariadb-errmsg", "mariadb-server", "mariadb-server-utils" ], - "sles": [ - "gcc", - "make", - "bc", - "perf", - "git", - "unzip", - "zip", - "libnuma1", - "numactl", - "wget", - "gcc-c++", - "autoconf", - "hwloc", - "hwloc-gui", - "libomp" - ], - "ubuntu": [ - "bc", - "zip", - "unzip", - "numactl", - "libnuma-dev", - "g++", - "autoconf", - "hwloc", - "libomp5-20" - ], "pip": [ ] } diff --git a/hammerdb/hammerdb_postgres.json b/hammerdb/hammerdb_postgres.json index 9f937bd..32158a1 100644 --- a/hammerdb/hammerdb_postgres.json +++ b/hammerdb/hammerdb_postgres.json @@ -1,61 +1,12 @@ { "dependencies": { - "amzn": [ - "gcc", - "bc", - "zip", - "unzip", - "numactl", - "wget", - "gcc-c++", - "autoconf", - "hwloc", - "hwloc-gui", - "libomp" - ], "rhel": [ - "lvm2", - "sysstat", - "tar", - "bc", - "perf", - "git", - "unzip", - "zip", "postgresql", "postgresql-contrib", "postgresql-server", "glibc-langpack-en", "libpq" ], - "sles": [ - "gcc", - "make", - "bc", - "perf", - "git", - "unzip", - "zip", - "libnuma1", - "numactl", - "wget", - "gcc-c++", - "autoconf", - "hwloc", - "hwloc-gui", - "libomp" - ], - "ubuntu": [ - "bc", - "zip", - "unzip", - "numactl", - "libnuma-dev", - "g++", - "autoconf", - "hwloc", - "libomp5-20" - ], "pip": [ ] } diff --git a/hammerdb/install-script b/hammerdb/install-script index b72d86e..08874e4 100755 --- a/hammerdb/install-script +++ b/hammerdb/install-script @@ -81,6 +81,7 @@ install_mssql() install_mariadb() { + ${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_mariadb.json --no_packages $to_no_pkg_install # # Configure things in and mount the appropriate item. # @@ -135,6 +136,11 @@ install_mariadb() install_postgres() { + # + # Installing Postgres Server and tools + # + ${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_postgres.json --no_packages $to_no_pkg_install + cd /usr/local/HammerDB cp -R /tmp/hammerdb-tpcc/postgres/* . From 00a2baf908aa790d6c787393b4c4d3990fa19b2f Mon Sep 17 00:00:00 2001 From: David Valin Date: Wed, 5 Nov 2025 06:42:43 -0500 Subject: [PATCH 4/4] Code review updates. --- hammerdb/hammerdb | 16 ++++++++-------- hammerdb/install-script | 13 +++++++++++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/hammerdb/hammerdb b/hammerdb/hammerdb index fc7db4d..eabd6e9 100755 --- a/hammerdb/hammerdb +++ b/hammerdb/hammerdb @@ -27,16 +27,16 @@ curdir=`pwd` if [[ $0 == "./"* ]]; then chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` if [[ $chars == 1 ]]; then - run_dir=`pwd` + RUN_DIR=`pwd` else - run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` - run_dir="${curdir}${run_dir}" + RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-` + RUN_DIR="${curdir}${RUN_DIR}" fi else chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'` - run_dir=`echo $0 | cut -d'/' -f 1-${chars}` + RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars}` fi - +export RUN_DIR if [ ! -f "/tmp/hammerdb.out" ]; then command="${0} $@" @@ -274,9 +274,9 @@ if [[ $test == "none" ]]; then usage $0 fi -${TOOLS_BIN}/package_tool --wrapper_config ${run_dir}/hammerdb_${test}.json --no_packages $to_no_pkg_install +${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb.json --no_packages $to_no_pkg_install if [[ $? -ne 0 ]]; then - echo Packaging installed failed. + echo Package installation using ${TOOLS_BIN}/package_tool was unsuccessful. exit 1 fi @@ -298,7 +298,7 @@ if [[ $to_use_pcp -eq 1 ]]; then pcp="-p ${pdir}" cpdir="--copy_dir $pdir" fi -cd $run_dir +cd $RUN_DIR echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} -T ${TOOLS_BIN} $pcp > run_this chmod 755 run_this ./run_this diff --git a/hammerdb/install-script b/hammerdb/install-script index 08874e4..f3a6004 100755 --- a/hammerdb/install-script +++ b/hammerdb/install-script @@ -79,9 +79,18 @@ install_mssql() ./update_temp_mnt.sh -m ${mountpoint} > upd_tmp.out 2>&1 } +install_packages() +{ + ${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/${1} --no_packages $to_no_pkg_install + if [[ $? -ne 0 ]]; then + echo Package installation of ${1}, using ${TOOLS_BIN}/package_tool was unsuccessful. + exit 1 + fi +} + install_mariadb() { - ${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_mariadb.json --no_packages $to_no_pkg_install + install_packages hammerdb_mariadb.json # # Configure things in and mount the appropriate item. # @@ -139,7 +148,7 @@ install_postgres() # # Installing Postgres Server and tools # - ${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_postgres.json --no_packages $to_no_pkg_install + install_packages hammerdb_postgres.json cd /usr/local/HammerDB cp -R /tmp/hammerdb-tpcc/postgres/* .