I've tested Weave overlay network for Docker on CentOS 7, after that I had to try deploy this system in AWS environment. There is a difference. When Docker launches on EC2 instances, weaveplugin container also starts. That makes impossible to launch Weave before stopping plugin. So I can't launch Weave network on statup. On CentOS I added those commands in /etc/rc.d/rc.local:
rm -f /opt/wenv
/usr/local/bin/weave launch $host1
touch /opt/wenv
echo $(weave env) > /opt/wenv
"weave env" - for export environments on logon. But on EC2 after boot I see via "docker ps" only weaveplugin container stated. And "weave launch" does not work before I'll do "weave stop-plugin". If I add this command in rc.local on EC2, "weave env" does not works, file /opt/wenv is empty. Maybe last command runs to early, but it must to wait successful starting of previous command I guess because it works on CentOS. Any suggestions please.
Oh! I just forgot to add full path to weave env:) So, in /etc/rc.local:
rm -f /opt/wenv
/usr/local/bin/weave launch $host1
touch /opt/wenv
echo $(/usr/local/bin/weave env) > /opt/wenv
Why in Centos environment it works without full path - I don't know.