diff --git a/site/installing-weave.md b/site/installing-weave.md index 7626f29f..f47c69e4 100644 --- a/site/installing-weave.md +++ b/site/installing-weave.md @@ -32,6 +32,8 @@ With Weave Net downloaded onto your VMs or hosts, you are ready to launch a Weav CoreOS users see [here](/guides/networking-docker-containers-with-weave-on-coreos/) for an example of installing Weave using cloud-config. +Amazon AWS users may want to use AWSVPC? + Amazon ECS users see [here](https://github.com/weaveworks/integrations/blob/master/aws/ecs/README.md) for the latest Weave AMIs and [here](http://weave.works/guides/service-discovery-with-weave-aws-ecs.html) to get started with Weave Net on ECS. diff --git a/site/using-weave/awsvpc.md b/site/using-weave/awsvpc.md new file mode 100644 index 00000000..efcfa3aa --- /dev/null +++ b/site/using-weave/awsvpc.md @@ -0,0 +1,91 @@ +--- +title: Using IP Routing on an Amazon Web Services Virtual Private Cloud +menu_order: 110 +--- + +If you are running your container infrastructure entirely within +Amazon Web Services (AWS) EC2 (Elastic Compute Cloud), then you can +choose AWS-VPC mode to connect your containers without any overlay, so +they can operate very close to the full speed of the underlying +network. + +In this mode, Weave Net still manages IP addresses and connects +containers to the network, but instead of wrapping up each packet and +sending it to its destination, Weave Net instructs the AWS network +router which ranges of container IP addresses live on which instance. + +###Configuring your EC2 instances to use Weave AWS-VPC mode + +First, your AWS instances need to be given access to change the route +table. Give them an IAM Role which has this access; if you have an +existing role then extend it or create a new one with a policy +allowing the necessary actions: + +``` +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "ec2:CreateRoute", + "ec2:DeleteRoute", + "ec2:ReplaceRoute", + "ec2:DescribeRouteTables", + "ec2:DescribeInstances" + ], + "Resource": [ + "*" + ] + } + ] +} +``` + +Your Security Group must allow network traffic between instances: you +must open TCP port 6783 which Weave Net uses to manage the network, +and you must allow any ports which your own containers use. Remember: +there is no network overlay in this mode so IP packets with container +addresses will flow over the AWS network unmodified. + +Also, you must disable the "Source/Destination check" on each machine, +because Weave will be operating with IP addresses outside of the range +allocated by Amazon. + +###Using AWS-VPC mode + +Launch Weave Net, adding the `--awsvpc` flag: + + $ weave launch --awsvpc [other hosts] + +You still need to supply the names or IP addresses of other hosts in +your cluster. + +###Limitations + +- AWS-VPC mode does not inter-operate with other Weave Net modes; it + is all or nothing. In this mode, all hosts in a cluster must be AWS + instances. We hope to ease this limitation in future. +- The AWS network does not support multicast. +- The number of hosts in a cluster is limited by the maximum size of + your AWS route table. This is are limited to 50 entries though you + can request an increase to 100. +- All your containers must be on the same network, with no subnet + isolation. We hope to ease this limitation in future. + +###Packet size (MTU) + +The Maximum Transmission Unit, or MTU, is the technical term for the +limit on how big a single packet can be on the network. Weave Net +defaults to 1410 bytes which works across almost all networks, but you +can set a larger size for better performance. + +The AWS network supports packets of 9000 bytes, so in AWS-VPC mode you +can run: + + $ WEAVE_MTU=9000 weave launch --awsvpc host2 host3 + +**See Also** + + * [Using Weave Net](/site/using-weave.md) + * [Performance measurements](/blog/weave-docker-networking-performance-aws-vpc/)