Skip to content

Commit

Permalink
Add Amazon's TaskIAM configuration to ecs image
Browse files Browse the repository at this point in the history
  - Implements the instructions in rancher/docs#2015, directly in the
ecs-optimized image.
  - Depends on rancher/os-release#217
  • Loading branch information
sodre committed Nov 21, 2019
1 parent d6571c5 commit 831c4ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/install2disk
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ EOF
cat >cloud-config.yml<<EOF
#cloud-config
rancher:
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
sysctl:
net.ipv4.conf.all.route_localnet: 1
services_include:
amazon-ecs-agent: true
modules: [ena]
Expand Down

0 comments on commit 831c4ba

Please sign in to comment.