Skip to content

Commit e9562f0

Browse files
authored
Merge pull request #44 from redhat-performance/packaging_updates
Packaging updates
2 parents 74f187f + 00a2baf commit e9562f0

File tree

5 files changed

+63
-18
lines changed

5 files changed

+63
-18
lines changed

hammerdb/hammerdb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ curdir=`pwd`
2727
if [[ $0 == "./"* ]]; then
2828
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
2929
if [[ $chars == 1 ]]; then
30-
exec_dir=`pwd`
30+
RUN_DIR=`pwd`
3131
else
32-
exec_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
33-
exec_dir="${curdir}${exec_dir}"
32+
RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
33+
RUN_DIR="${curdir}${RUN_DIR}"
3434
fi
3535
else
3636
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
37-
exec_dir=`echo $0 | cut -d'/' -f 1-${chars}`
37+
RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars}`
3838
fi
39-
39+
export RUN_DIR
4040

4141
if [ ! -f "/tmp/hammerdb.out" ]; then
4242
command="${0} $@"
@@ -131,8 +131,6 @@ ${curdir}/test_tools/gather_data ${curdir}
131131
source test_tools/general_setup "$@"
132132
export TOOLS_BIN
133133

134-
dnf -y install lvm2
135-
136134
unset DISPLAY
137135
users_to_run=""
138136
test="none"
@@ -276,6 +274,12 @@ if [[ $test == "none" ]]; then
276274
usage $0
277275
fi
278276

277+
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb.json --no_packages $to_no_pkg_install
278+
if [[ $? -ne 0 ]]; then
279+
echo Package installation using ${TOOLS_BIN}/package_tool was unsuccessful.
280+
exit 1
281+
fi
282+
279283
create_and_mount_fs
280284

281285
#
@@ -294,7 +298,7 @@ if [[ $to_use_pcp -eq 1 ]]; then
294298
pcp="-p ${pdir}"
295299
cpdir="--copy_dir $pdir"
296300
fi
297-
cd $exec_dir
301+
cd $RUN_DIR
298302
echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} -T ${TOOLS_BIN} $pcp > run_this
299303
chmod 755 run_this
300304
./run_this

hammerdb/hammerdb.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"dependencies": {
3+
"rhel": [
4+
"lvm2",
5+
"sysstat",
6+
"bc",
7+
"git",
8+
"unzip",
9+
"zip"
10+
],
11+
"pip": [
12+
]
13+
}
14+
}

hammerdb/hammerdb_mariadb.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"dependencies": {
3+
"rhel": [
4+
"mariadb",
5+
"mariadb-common",
6+
"mariadb-errmsg",
7+
"mariadb-server",
8+
"mariadb-server-utils"
9+
],
10+
"pip": [
11+
]
12+
}
13+
}

hammerdb/hammerdb_postgres.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"dependencies": {
3+
"rhel": [
4+
"postgresql",
5+
"postgresql-contrib",
6+
"postgresql-server",
7+
"glibc-langpack-en",
8+
"libpq"
9+
],
10+
"pip": [
11+
]
12+
}
13+
}

hammerdb/install-script

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,18 @@ install_mssql()
7979
./update_temp_mnt.sh -m ${mountpoint} > upd_tmp.out 2>&1
8080
}
8181

82-
install_mariadb()
82+
install_packages()
8383
{
84-
#
85-
# Install Mariadb Server and tools
86-
#
87-
# dnf -y install mariadb mariadb-common mariadb-devel \
88-
# mariadb-errmsg mariadb-server mariadb-server-utils mysql-libs
89-
dnf -y install mariadb mariadb-common \
90-
mariadb-errmsg mariadb-server mariadb-server-utils
91-
84+
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/${1} --no_packages $to_no_pkg_install
85+
if [[ $? -ne 0 ]]; then
86+
echo Package installation of ${1}, using ${TOOLS_BIN}/package_tool was unsuccessful.
87+
exit 1
88+
fi
89+
}
9290

91+
install_mariadb()
92+
{
93+
install_packages hammerdb_mariadb.json
9394
#
9495
# Configure things in and mount the appropriate item.
9596
#
@@ -147,7 +148,7 @@ install_postgres()
147148
#
148149
# Installing Postgres Server and tools
149150
#
150-
dnf -y install postgresql postgresql-contrib postgresql-server glibc-langpack-en libpq
151+
install_packages hammerdb_postgres.json
151152

152153
cd /usr/local/HammerDB
153154
cp -R /tmp/hammerdb-tpcc/postgres/* .

0 commit comments

Comments
 (0)