Skip to content

Commit

Permalink
Retire the previous containerized Agent example from contrib
Browse files Browse the repository at this point in the history
and update the README.md.
  • Loading branch information
webbnh committed Apr 20, 2023
1 parent 702c427 commit 3f84f33
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 127 deletions.
2 changes: 0 additions & 2 deletions contrib/containerized-pbench/.gitignore
@@ -1,3 +1 @@
fiotest
*.tmp
var_lib_pbench-agent
27 changes: 18 additions & 9 deletions contrib/containerized-pbench/README.md
@@ -1,10 +1,19 @@
# Running a Pbench Agent-driven Workload in a Container
1. Create a workload script (`example-workload.sh` can be used to start)
This script performs the invocation of a Pbench Agent workload driver, e.g.
`pbench-user-benchmark`, or `pbench-fio`, or `pbench-uperf`.
2. Setup the local execution environment to be aware of the target Pbench Server
`./setup.sh <pbench server host name>:<port number>`
3. Execute the workload
Typically this script performs the necessary setup required for the
containerized environment (`example-driver.sh` can be used to start, note
that it also moves the results to the Pbench Server).

The Pbench Agent is available for use in a zero-installation scenario
via containerized execution. Agent containers are available from
[quay.io/pbench](https://quay.io/organization/pbench): there's a
repository for each distribution (e.g.,
[pbench-agent-all-centos-9](https://quay.io/repository/pbench/pbench-agent-all-centos-9?tab=tags))
with tags for each Agent release as well as for "hot builds" for
each development branch.

The `pbench` script provided here is a wrapper which facilitates
the invocation of a Pbench Agent command using a containerized
deployment of the Pbench Agent. Simply prefix a Pbench Agent
command line with the path to this script to run it inside a
container, without needing to install the Agent on the host
system. (This is easily done by defining a shell alias for it.)

The provided `pbench_demo` script shows the sequence of commands
which might be used to perform a `fio` benchmark run.
45 changes: 0 additions & 45 deletions contrib/containerized-pbench/example-driver.sh

This file was deleted.

19 changes: 0 additions & 19 deletions contrib/containerized-pbench/example-workload.sh

This file was deleted.

9 changes: 0 additions & 9 deletions contrib/containerized-pbench/gen-token.sh

This file was deleted.

11 changes: 0 additions & 11 deletions contrib/containerized-pbench/mover.sh

This file was deleted.

12 changes: 7 additions & 5 deletions contrib/containerized-pbench/pbench_demo 100755 → 100644
Expand Up @@ -12,22 +12,24 @@
# here because we're not using the default image).
#-
shopt -s expand_aliases
alias pbench=$(git rev-parse --show-toplevel)/contrib/containerized-pbench/pbench
alias pbench="$(git rev-parse --show-toplevel)"/contrib/containerized-pbench/pbench

FIOTEST=${PWD}/fiotest
export PB_AGENT_PODMAN_OPTIONS="--pull newer -v ${FIOTEST}:/fiotest:z"
export PB_AGENT_IMAGE_NAME=quay.io/pbench/pbench-agent-all-fedora-36:main

mkdir -p ${FIOTEST}
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)"
27 changes: 0 additions & 27 deletions contrib/containerized-pbench/setup.sh

This file was deleted.

0 comments on commit 3f84f33

Please sign in to comment.