Skip to content

Commit 473463f

Browse files
authored
Remove pbench-generate-token agent CLI functionality (#3383)
* 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
1 parent e6c3a54 commit 473463f

File tree

7 files changed

+9
-423
lines changed

7 files changed

+9
-423
lines changed

agent/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ util-scripts = \
5151
# Scripts based on the Python Click package, which are generated during
5252
# installation.
5353
click-scripts = \
54-
pbench-generate-token \
5554
pbench-cleanup \
5655
pbench-clear-results \
5756
pbench-clear-tools \

contrib/containerized-pbench/gen-token.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

contrib/containerized-pbench/pbench_demo

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,21 @@ export PB_AGENT_IMAGE_NAME=quay.io/pbench/pbench-agent-all-fedora-36:main
2020

2121
mkdir -p ${FIOTEST}
2222

23+
# Before we run the demo, we need a Pbench API key. The key can be an
24+
# environment variable of PBENCH_API_KEY or need to be supplied to this
25+
# script as an argument.
26+
api_key=${1:-${PBENCH_API_KEY}}
27+
if [[ -z "${api_key}" ]]; then
28+
echo "Pbench API key must be provided, either on the command line or via the PBENCH_API_KEY environment variable"
29+
exit 2
30+
fi
2331
#+
2432
# Run the demo!
2533
#-
26-
pbench pbench-generate-token --output=/var/lib/pbench-agent/.token
2734
pbench pbench-register-tool-set light
2835
pbench pbench-list-tools
2936
pbench pbench-user-benchmark --config example-workload -- \
3037
fio --directory=/fiotest --name fio_test_file --direct=1 --rw=randread \
3138
--bs=16k --size=100M --numjobs=8 --time_based --runtime=5s \
3239
--group_reporting --norandommap
33-
# Note that the token file location below is evaluated -outside- the container,
34-
# unlike in the pbench-generate-token command above.
35-
pbench pbench-results-move --token=$(< /var/tmp/${USER}/pbench-agent/run/.token)
40+
pbench pbench-results-move --token=${api_key}

lib/pbench/cli/agent/commands/generate_token.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

lib/pbench/test/unit/agent/task/test_generate_token.py

Lines changed: 0 additions & 224 deletions
This file was deleted.

0 commit comments

Comments
 (0)