Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 12 additions & 8 deletions hammerdb/hammerdb
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ 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

export RUN_DIR

if [ ! -f "/tmp/hammerdb.out" ]; then
command="${0} $@"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -276,6 +274,12 @@ if [[ $test == "none" ]]; then
usage $0
fi

${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb.json --no_packages $to_no_pkg_install
if [[ $? -ne 0 ]]; then
echo Package installation using ${TOOLS_BIN}/package_tool was unsuccessful.
exit 1
fi

create_and_mount_fs

#
Expand All @@ -294,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
Expand Down
14 changes: 14 additions & 0 deletions hammerdb/hammerdb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"dependencies": {
"rhel": [
"lvm2",
"sysstat",
"bc",
"git",
"unzip",
"zip"
],
"pip": [
]
}
}
13 changes: 13 additions & 0 deletions hammerdb/hammerdb_mariadb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dependencies": {
"rhel": [
"mariadb",
"mariadb-common",
"mariadb-errmsg",
"mariadb-server",
"mariadb-server-utils"
],
"pip": [
]
}
}
13 changes: 13 additions & 0 deletions hammerdb/hammerdb_postgres.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dependencies": {
"rhel": [
"postgresql",
"postgresql-contrib",
"postgresql-server",
"glibc-langpack-en",
"libpq"
],
"pip": [
]
}
}
21 changes: 11 additions & 10 deletions hammerdb/install-script
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,18 @@ install_mssql()
./update_temp_mnt.sh -m ${mountpoint} > upd_tmp.out 2>&1
}

install_mariadb()
install_packages()
{
#
# 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

${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()
{
install_packages hammerdb_mariadb.json
#
# Configure things in and mount the appropriate item.
#
Expand Down Expand Up @@ -147,7 +148,7 @@ install_postgres()
#
# Installing Postgres Server and tools
#
dnf -y install postgresql postgresql-contrib postgresql-server glibc-langpack-en libpq
install_packages hammerdb_postgres.json

cd /usr/local/HammerDB
cp -R /tmp/hammerdb-tpcc/postgres/* .
Expand Down