diff --git a/hammerdb/hammerdb b/hammerdb/hammerdb index 2e911f8..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 - 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} $@" @@ -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.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 # @@ -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 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 new file mode 100644 index 0000000..f948023 --- /dev/null +++ b/hammerdb/hammerdb_mariadb.json @@ -0,0 +1,13 @@ +{ + "dependencies": { + "rhel": [ + "mariadb", + "mariadb-common", + "mariadb-errmsg", + "mariadb-server", + "mariadb-server-utils" + ], + "pip": [ + ] + } +} diff --git a/hammerdb/hammerdb_postgres.json b/hammerdb/hammerdb_postgres.json new file mode 100644 index 0000000..32158a1 --- /dev/null +++ b/hammerdb/hammerdb_postgres.json @@ -0,0 +1,13 @@ +{ + "dependencies": { + "rhel": [ + "postgresql", + "postgresql-contrib", + "postgresql-server", + "glibc-langpack-en", + "libpq" + ], + "pip": [ + ] + } +} diff --git a/hammerdb/install-script b/hammerdb/install-script index 9aebc8c..f3a6004 100755 --- a/hammerdb/install-script +++ b/hammerdb/install-script @@ -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. # @@ -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/* .