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

Update contrib scripts for Perfconf demo #3363

Merged
merged 4 commits into from
Mar 28, 2023
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
7 changes: 3 additions & 4 deletions contrib/containerized-pbench/pbench
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# these options and any others which the user has specified and passes in the
# command to be executed.

image_name=${PB_AGENT_IMAGE_NAME:-quay.io/pbench/pbench-agent-all-centos-8:latest}
image_name=${PB_AGENT_IMAGE_NAME:-quay.io/pbench/pbench-agent-all-centos-8:main}
config_file=${_PBENCH_AGENT_CONFIG:-${HOME}/.config/pbench/pbench-agent.cfg}
pbench_run_dir=${PB_AGENT_RUN_DIR:-/var/tmp/${USER}/pbench-agent/run}
pbench_server=${PB_AGENT_SERVER_LOC}
Expand All @@ -36,15 +36,14 @@ if [[ $# == 0 || $1 == "help" || $1 == "-h" || $1 == "--help" ]]; then
fi

if [[ -d "${HOME}/.ssh" && -r "${HOME}/.ssh" ]]; then
other_options="-v ${HOME}/.ssh:/root/.ssh:z ${other_options}"
other_options="--security-opt=label=disable -v ${HOME}/.ssh:/root/.ssh ${other_options}"
fi

if [[ -f "${config_file}" && -r "${config_file}" ]]; then
other_options="-v ${config_file}:/opt/pbench-agent/config/pbench-agent.cfg:z ${other_options}"
elif [[ -n "${pbench_server}" ]]; then
echo "Warning: the Pbench Agent config file is missing; attempting to generate one in ${config_file}" >&2
# TODO: this should be handled by a separate Pbench Agent command which
# provides a "configuration wizard".
# TODO: this should be handled by a separate Pbench Agent "configuration wizard".
mkdir -p $(dirname ${config_file})
cat > ${config_file} <<- EOF
[DEFAULT]
Expand Down
8 changes: 5 additions & 3 deletions contrib/containerized-pbench/pbench_demo
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ mkdir -p ${FIOTEST}
#+
# Run the demo!
#-
pbench pbench-generate-token --output=/var/lib/pbench-agent/.token
pbench pbench-register-tool-set light
pbench pbench-list-tools
pbench pbench-user-benchmark --config example-workload -- \
fio --directory=/fiotest --name fio_test_file --direct=1 --rw=randread \
--bs=16k --size=100M --numjobs=16 --time_based --runtime=20s \
--bs=16k --size=100M --numjobs=8 --time_based --runtime=5s \
--group_reporting --norandommap
pbench pbench-generate-token --output=/var/lib/pbench-agent/.token
pbench pbench-results-move --token=$(< /var/tmp/pbench/pbench-agent/run/.token)
# Note that the token file location below is evaluated -outside- the container,
# unlike in the pbench-generate-token command above.
pbench pbench-results-move --token=$(< /var/tmp/${USER}/pbench-agent/run/.token)