MailRuChamps / hlcupdocs

High-loaded systems developer contest
https://highloadcup.ru
151 stars 34 forks source link

Нужна инструкция для запуска танка на Windows #59

Closed Lanayx closed 7 years ago

Lanayx commented 7 years ago

Не получается запустить танк на Windows 10.

docker run -v /$(pwd):/var/loadtest --net host -it --rm direvius/yandex-tank -c load/load_1.ini

08:21:44 [WARNING] /etc/yandex-tank is not accessible to get configs list
08:21:44 [INFO] Loading configs...
08:21:44 [INFO] Loading plugins...
08:21:44 [INFO] Performing test
08:21:44 [INFO] Configuring plugins...
08:21:44 [INFO] Resolved 127.0.0.1 into 127.0.0.1:80
08:21:44 [INFO] Configuring StepperWrapper...
08:21:44 [WARNING] Mandatory option config was not found in section telegraf
08:21:44 [WARNING] Mandatory option config was not found in section monitoring
08:21:44 [WARNING] Mandatory option default_target was not found in section telegraf
08:21:44 [WARNING] Mandatory option default_target was not found in section monitoring
08:21:44 [INFO] Preparing test...
08:21:44 [INFO] Exception: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 268, in perform_test
    self.core.plugins_prepare_test()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 274, in plugins_prepare_test
    plugin.prepare_test()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/plugin.py", line 101, in prepare_test
    self.config = self.phantom.compose_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 111, in compose_config
    streams_config += stream.compose_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 288, in compose_config
    self.stepper_wrapper.prepare_stepper()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 204, in prepare_stepper
    self.stpd = self.__get_stpd_filename()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 260, in __get_stpd_filename
    raise RuntimeError("Neither ammofile nor uris specified")
RuntimeError: Neither ammofile nor uris specified

08:21:44 [ERROR] Neither ammofile nor uris specified
08:21:44 [INFO] Trying to shutdown gracefully...
08:21:44 [INFO] Finishing test...
08:21:44 [INFO] Finishing monitoring
08:21:44 [ERROR] Failed finishing plugin <yandextank.plugins.Aggregator.plugin.Plugin object at 0x7fe5238d4090>: 'Plugin' object has no attribute 'drain'
08:21:44 [INFO] Post-processing test...
08:21:44 [INFO] Artifacts dir: /var/loadtest/logs/2017-08-21_08-21-44.h3_rZA
08:21:44 [INFO] Done graceful shutdown
08:21:44 [INFO] Close allocated resources...
08:21:44 [INFO] Done performing test with code 1
dimkk commented 7 years ago

Привет, мне удалось запустить так: 1) В настройках докера -> Shared Drivers - ставь галку у того диска который нужно шарить 2) Когда поставишь галку - снизу докер покажет как правильно ее монтировать в моем случае - docker run --rm -v c:/Users:/data alpine ls /data 3) Я перекинул этот проект в папку c:/Users/%USERNAME%/tank и подмонтировал ее на /var/loadtest 4) после этого запуск танка выглядит так: docker run -v c:/Users/%USERNAME%/tank:/var/loadtest --net host -it --rm direvius/yandex-tank -c load/load_1.ini Вместо единицы можно подставить другой номер файла настроек 5) Ещё момент про ip адрес указанный в ini - Там стоит 127.0.0.1 - у меня с ним не завелось. Зато завелось с Ip адресом в подсети Docker - cmd -> ipconfig -> в моем случае 10.0.75.1 - на этот адресу достучаться удавалось

Lanayx commented 7 years ago

@dimkk Супер, спасибо)