1
$ docker 运行 direvius/yandex-tank
    回溯(最近一次通话最后):
      文件“/usr/local/bin/yandex-tank”,第 11 行,在
        load_entry_point('yandextank==1.9.13', 'console_scripts', 'yandex-tank')()
      文件“/usr/local/lib/python2.7/dist-packages/yandextank/core/cli.py”,第 91 行,在 main
        worker = ConsoleTank(选项,弹药文件)
      文件“/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py”,第 285 行,在 __init__
        覆盖选项)
      文件“/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py”,第 256 行,在 load_tank_core
        [load_cfg(cfg) 用于 config_files 中的 cfg] + other_opts + parse_options(cmd_options)
      文件“/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py”,第 91 行,在 load_cfg
        使用 open(cfg_filename) 作为 f:
    IOError:[Errno 2] 没有这样的文件或目录:'load.yaml'
4

1 回答 1

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 run,这里也写新目录-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
于 2019-07-05T12:31:53.607 回答