This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 673
awsvpc docs #2338
Merged
Merged
awsvpc docs #2338
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0fc59a8
Initial awsvpc docs
bboreham 6a410a7
Minor improvements
bboreham c41ca70
Add AWS-VPC diagram
bboreham 3c45ba0
A few edits to improve awsvpc docs.
abuehrle 71540e6
Clarify IAM role and policy
bboreham 3494cc3
Expand description surrounding link to awsvpc mode
bboreham 425f17a
Mention that 'weave launch' now waits
bboreham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
title: Using IP Routing on an Amazon Web Services Virtual Private Cloud | ||
menu_order: 110 | ||
--- | ||
|
||
If your container infrastructure is running entirely within Amazon Web Services (AWS) | ||
Elastic Compute Cloud (EC2), then you can enable AWS-VPC mode with Weave Net. In AWS-VPC mode, | ||
containers are networked without using an overlay and allows network speeds | ||
close to that of the underlying network. | ||
|
||
With AWS-VPC enabled, Weave Net manages IP addresses and connects | ||
containers to the network as usual, but instead of wrapping each packet and | ||
sending it to its destination, Weave Net instructs the AWS network | ||
router with the ranges of container IP addresses and the instances | ||
on which they live. | ||
|
||
![Weave Net AWS-VPC Mode](weave-net-awsvpc-1007x438.png) | ||
|
||
###Configuring EC2 Instances to use Weave AWS-VPC Mode | ||
|
||
First, your AWS instances need to be given write access to the route | ||
table via its | ||
[IAM Role](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html). | ||
If you have an existing IAM Role then extend it, otherwise create a | ||
new role. The role must have a | ||
[policy](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-policies-for-amazon-ec2.html) | ||
attached which allows the following | ||
[actions](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Operations.html): | ||
|
||
|
||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:CreateRoute", | ||
"ec2:DeleteRoute", | ||
"ec2:ReplaceRoute", | ||
"ec2:DescribeRouteTables", | ||
"ec2:DescribeInstances" | ||
], | ||
"Resource": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Secondly, your Security Group must allow network traffic between instances. | ||
You must open TCP port 6783 which is the port that Weave Net uses to manage the network and also | ||
allow any ports which your own containers use. | ||
|
||
>>**Remember:** There is no network overlay in this mode, and so, IP packets with container | ||
addresses will flow over the AWS network unmodified. | ||
|
||
Finally, since Weave will be operating with IP addresses outside of the | ||
range allocated by Amazon, you must disable "Source/Destination check" on each machine. | ||
|
||
###Using AWS-VPC Mode | ||
|
||
Launch Weave Net with the `--awsvpc` flag: | ||
|
||
$ weave launch --awsvpc [other hosts] | ||
|
||
>>**Note:** You will still need to supply the names or IP addresses of other hosts in | ||
your cluster. | ||
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong. |
||
|
||
###Present 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 `weave launch` command waits until the | ||
[IP address manager](/site//operational-guide/concepts.md#ip-address-manager-ipam) | ||
is ready, i.e. until after this peer has been able to make contact | ||
with other peers and confirm that it has joined the cluster the | ||
bridge. Without AWS-VPC, `weave launch` returns without waiting. | ||
- 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 limited to 50 entries though you | ||
can request an increase to 100 by contacting Amazon. | ||
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong. |
||
- All of your containers must be on the same network, with no subnet | ||
isolation. (We hope to ease this limitation in future.) | ||
|
||
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
Sorry, something went wrong. |
||
###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. This default works across almost all networks, but for better | ||
performance you can set it to a larger MTU size. | ||
|
||
The AWS network supports packets of up to 9000 bytes. | ||
|
||
In AWS-VPC mode you can run the following: | ||
|
||
$ 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/) | ||
|
||
(that last blog post doesn't exist yet) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as abuse.
Sorry, something went wrong.