Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for secure AWS Task IAM Roles #2015

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions content/os/v1.x/en/installation/amazon-ecs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ rancher:
ECS_AVAILABLE_LOGGING_DRIVERS: |-
["json-file","awslogs"]
# If you have selected a RancherOS AMI that does not have ECS enabled by default,
# you'll need to enable the system service for the ECS agent.
# you'll need to enable the system service for the ECS agent, and configure the
# iptables rules.
sysctl:
net.ipv4.conf.all.route_localnet: 1
network:
post_cmds:
- iptables -t nat -A PREROUTING -p tcp -d 169.254.170.2 --dport 80 -j DNAT --to-destination 127.0.0.1:51679
- iptables -t nat -A OUTPUT -d 169.254.170.2 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 51679
- iptables --insert DOCKER-USER 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP
- iptables --insert DOCKER-USER 1 --in-interface docker-sys --destination 169.254.169.254/32 --jump ACCEPT
services_include:
amazon-ecs-agent: true
```
Expand All @@ -47,7 +56,16 @@ rancher:
# Note: You will need to make sure to include the colon in front of the version.
ECS_AGENT_VERSION: :v1.9.0
# If you have selected a RancherOS AMI that does not have ECS enabled by default,
# you'll need to enable the system service for the ECS agent.
# you'll need to enable the system service for the ECS agent and configure the
# iptables rules.
sysctl:
net.ipv4.conf.all.route_localnet: 1
network:
post_cmds:
- iptables -t nat -A PREROUTING -p tcp -d 169.254.170.2 --dport 80 -j DNAT --to-destination 127.0.0.1:51679
- iptables -t nat -A OUTPUT -d 169.254.170.2 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 51679
- iptables --insert DOCKER-USER 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP
- iptables --insert DOCKER-USER 1 --in-interface docker-sys --destination 169.254.169.254/32 --jump ACCEPT
services_include:
amazon-ecs-agent: true
```
Expand Down