Skip to content

Commit

Permalink
Remove pbench-generate-token agent CLI functionality (#3383)
Browse files Browse the repository at this point in the history
* Remove pbench-generate-token agent CLI functionality

- Since we moved away from internal user management in
  Pbench-server, we can no longer use username and password
  to create new tokens.
- The new functionality to generate long-lasting tokens
  will be available via a new server API call and the dashboard.
- Also removes the unused load-canned-data.sh file.

PBENCH-948
  • Loading branch information
npalaska committed Apr 18, 2023
1 parent e6c3a54 commit 473463f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 423 deletions.
1 change: 0 additions & 1 deletion agent/Makefile
Expand Up @@ -51,7 +51,6 @@ util-scripts = \
# Scripts based on the Python Click package, which are generated during
# installation.
click-scripts = \
pbench-generate-token \
pbench-cleanup \
pbench-clear-results \
pbench-clear-tools \
Expand Down
9 changes: 0 additions & 9 deletions contrib/containerized-pbench/gen-token.sh

This file was deleted.

13 changes: 9 additions & 4 deletions contrib/containerized-pbench/pbench_demo
Expand Up @@ -20,16 +20,21 @@ export PB_AGENT_IMAGE_NAME=quay.io/pbench/pbench-agent-all-fedora-36:main

mkdir -p ${FIOTEST}

# Before we run the demo, we need a Pbench API key. The key can be an
# environment variable of PBENCH_API_KEY or need to be supplied to this
# script as an argument.
api_key=${1:-${PBENCH_API_KEY}}
if [[ -z "${api_key}" ]]; then
echo "Pbench API key must be provided, either on the command line or via the PBENCH_API_KEY environment variable"
exit 2
fi
#+
# 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=8 --time_based --runtime=5s \
--group_reporting --norandommap
# 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)
pbench pbench-results-move --token=${api_key}
95 changes: 0 additions & 95 deletions lib/pbench/cli/agent/commands/generate_token.py

This file was deleted.

224 changes: 0 additions & 224 deletions lib/pbench/test/unit/agent/task/test_generate_token.py

This file was deleted.

0 comments on commit 473463f

Please sign in to comment.