$ docker run direvius/yandex-tank Traceback (most recent call last): File "/usr/local/bin/yandex-tank", line 11, in load_entry_point('yandextank==1.9.13', 'console_scripts', 'yandex-tank')() File "/usr/local/lib/python2.7/dist-packages/yandextank/core/cli.py", line 91, in main worker = ConsoleTank(options, ammofile) File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 285, in __init__ overwrite_options) File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 256, in load_tank_core [load_cfg(cfg) for cfg in config_files] + other_opts + parse_options(cmd_options) File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 91, in load_cfg with open(cfg_filename) as f: IOError: [Errno 2] No such file or directory: 'load.yaml'
答案 0 :(得分:0)
首先,您需要创建一个目录-
mkdir yandex-tank
将load.yaml文件放入目录中。 查看示例
phantom:
address: 203.0.113.1:80 # [Target's address]:[target's port]
uris:
- /
load_profile:
load_type: rps # schedule load by defining requests per second
schedule: line(1, 10, 10m) # starting from 1rps growing linearly to 10rps during 10 minutes
console:
enabled: true # enable console output
telegraf:
enabled: false # let's disable telegraf monitoring for the first time
然后docker运行,也在这里写入新目录- youPWD / yandex-tank
docker run
-v /youPWD/yandex-tank :/var/loadtest
-v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent
--net host
-it direvius/yandex-tank