facebook网络环境模拟工具atc

本来想自己制作一个atc的images,搜了一下docker hub,发现2015.5.15日有人发布了该工具的镜像,这下方便了。

Docker hub地址

Image

启动镜像

docker run -it --privileged --net=host --rm atcd/atc 会自动检查,如果本地存在,会直接启动,如果本地没有就会从云端下载。

58deMacBook-Pro:docker wuxian$ docker run -it --privileged --net=host --rm atcd/atc
Unable to find image 'atcd/atc:latest' locally
latest: Pulling from atcd/atc

64e5325c0d9d: Pulling fs layer 
bf84c1d84a8f: Pulling fs layer 
87de57de6955: Pulling fs layer 
6a974bea7c0d: Pulling fs layer 
4b708e6c0f6c: Pulling fs layer 
12fef6820370: Pulling fs layer 
69ca4f45dafd: Pulling fs layer 
11ea72ec71a1: Pulling fs layer 
4b708e6c0f6c: Downloading 75.68 MB/160.4 MB
a6ea00825040: Download complete 
e1f5c799d062: Downloading 17.34 MB/19.65 MB
5d75f900f6bb: Download complete 
65c00af7c3f9: Download complete 
70af3ebe09c5: Download complete 
8a74fd4e7ccd: Download complete 
b6b63492bda0: Download complete 
2c21e5589565: Download complete 
5dda6f7075ff: Download complete 
2e2bd66e21a9: Download complete 
c9fddf0230c6: Download complete 
e13d2c31ef2d: Download complete 
717ac29f9d1f: Download complete 
ba77ab6d489b: Download complete 
3088a5ade1cc: Download complete 
a3fa37170d8a: Download complete 
66f4143d2d25: Download complete 
b09dbd7b7f31: Download complete 
1f06e98d5008: Download complete 
5964190ee946: Download complete 
b6adef0a30cd: Download complete 
c75be3ba9b59: Download complete 
Status: Downloaded newer image for atcd/atc:latest
/usr/local/lib/python2.7/site-packages/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2015-07-02 04:44:19,269 CRIT Supervisor running as root (no user in config file)
2015-07-02 04:44:19,278 INFO RPC interface 'supervisor' initialized
2015-07-02 04:44:19,279 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-07-02 04:44:19,279 INFO supervisord started with pid 6
2015-07-02 04:44:20,284 INFO spawned: 'stdout' with pid 9
2015-07-02 04:44:20,286 INFO spawned: 'atcui' with pid 10
2015-07-02 04:44:20,288 INFO spawned: 'atcd' with pid 11
2015-07-02 04:44:20,290 INFO spawned: 'rsyslogd' with pid 12
2015-07-02 04:44:21,494 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-02 04:44:21,494 INFO success: atcui entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-02 04:44:21,495 INFO success: atcd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-02 04:44:21,495 INFO success: rsyslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
rsyslogd stderr | rsyslogd: Could not open output pipe '/dev/xconsole': No such file or directory [try http://www.rsyslog.com/e/2039 ]
atcd stderr | INFO:AtcdVService.AtcdNBServerTask:AtcdNBServerTask Server Started on 127.0.0.1:9090
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:Calling initialize_shaping_system
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:Running /sbin/iptables -t mangle -F FORWARD
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:deleting root QDisc on eth1
atcd stderr | WARNING:AtcdVService.AtcdLinuxShaper:could not delete root QDisc. There might have been nothing to delete
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:setting root qdisc on eth1
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:deleting root QDisc on eth0
atcd stderr | WARNING:AtcdVService.AtcdLinuxShaper:could not delete root QDisc. There might have been nothing to delete
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:setting root qdisc on eth0
atcd stderr | INFO:AtcdVService.AtcdLinuxShaper:Restoring shaped connection from DB
atcd stderr | DEBUG:AtcdVService:All tasks started
atcd stderr | DEBUG:AtcdVService:VService Active.  Awaiting graceful shutdown

下载完成后会启动该镜像,这个时候我们可以访问该工具的UI页面了。首先你得知道你的docker ip是多少,这个可以在你的环境变量中查找到,比如我的环境变量文件中的内容如下:

export DOCKER_HOST=tcp://10.59.15.199:2376
export DOCKER_CERT_PATH=/Users/wuxian/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1

那么我们的docker ip地址就是10.59.15.199,那么我们访问atc的UI网址就是http://10.59.15.199:8000

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值