1
0
mirror of https://github.com/newnius/YAO-docs.git synced 2024-07-06 05:15:18 +00:00
YAO-docs/sbin/run_agent_mock.sh

22 lines
666 B
Bash
Raw Permalink Normal View History

2020-07-31 09:29:25 +00:00
#!/bin/bash
2020-12-10 10:50:03 +00:00
# Example: NUM=100 bash sbin/run_agent_mock.sh
2020-07-31 09:29:25 +00:00
2020-12-10 10:50:03 +00:00
# docker ps -a | grep yao-agent:mock | awk '{print $1}' | xargs docker rm -f
2020-07-31 09:29:25 +00:00
2020-12-10 10:50:03 +00:00
docker run \
--name yao-agent-mock-$(hostname) \
--network yao-net \
--network-alias node-mock-$(hostname) \
--hostname node-mock-$(hostname) \
-d \
--restart always \
--detach=true \
--env NUMS=${NUM} \
--env ClientHost=node-mock-$(hostname) \
--env ReportAddress='http://yao-scheduler:8080/?action=agent_report' \
--env PYTHONUNBUFFERED=1 \
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
quickdeploy/yao-agent:mock