{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/81","repository_url":"https://api.github.com/repos/aws/amazon-ecs-cli","labels_url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/81/comments","events_url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/81/events","html_url":"https://github.com/aws/amazon-ecs-cli/pull/81","id":133395388,"number":81,"title":"ECS-CLI Amazon ELB Support","user":{"login":"abdollar","id":84642,"avatar_url":"https://avatars.githubusercontent.com/u/84642?v=3","gravatar_id":"","url":"https://api.github.com/users/abdollar","html_url":"https://github.com/abdollar","followers_url":"https://api.github.com/users/abdollar/followers","following_url":"https://api.github.com/users/abdollar/following{/other_user}","gists_url":"https://api.github.com/users/abdollar/gists{/gist_id}","starred_url":"https://api.github.com/users/abdollar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdollar/subscriptions","organizations_url":"https://api.github.com/users/abdollar/orgs","repos_url":"https://api.github.com/users/abdollar/repos","events_url":"https://api.github.com/users/abdollar/events{/privacy}","received_events_url":"https://api.github.com/users/abdollar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-13T04:02:01Z","updated_at":"2016-02-17T19:06:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aws/amazon-ecs-cli/pulls/81","html_url":"https://github.com/aws/amazon-ecs-cli/pull/81","diff_url":"https://github.com/aws/amazon-ecs-cli/pull/81.diff","patch_url":"https://github.com/aws/amazon-ecs-cli/pull/81.patch"},"body":"ECS-CLI Amazon ELB Support\r\n\r\nNot sure why amazon ELB support is not provided by the amazon ecs-cli tool. Added a pull request to provide a simple configuration to get this started using the ecs-cli tool.\r\n\r\n- Uses the cloud formation template to construct an ELB associated with your vpc\r\n- Adds an extra parameter for the SSL certificate called certificate-arn.\r\n```\r\ncertificate-arn = arn:aws:acm:us-east-1:000000000000:certificate/00000000-0000-0000-0000-000000000000\r\n```\r\n- Assumes the ECS instance uses port 80 and the ELB uses 443 and terminates SSL - this should ideally be optional and somehow configured but seems to be a good default.\r\n- Opens Egress to everything for the ELB and only 443 and 80 for the ECS instance as it makes http calls - this again should be configurable.\r\n- Added a cloudformation template that adds extra logging using the fluent logging driver - again should be configurable as not logging your docker container logs seems wrong.Assumes you have added a task called fluentd-task and image for getting docker logs to wherever you need using fluentd\r\n- Assumes you have a role called ecsServiceRole that connects ELB and ECS.\r\n\r\nThe IAM policy for the ecsServiceRole looks like this\r\n```\r\n{\r\n  \"Version\": \"2012-10-17\",\r\n  \"Statement\": [\r\n    {\r\n      \"Effect\": \"Allow\",\r\n      \"Action\": [\r\n        \"elasticloadbalancing:Describe*\",\r\n        \"elasticloadbalancing:DeregisterInstancesFromLoadBalancer\",\r\n        \"elasticloadbalancing:RegisterInstancesWithLoadBalancer\",\r\n        \"ec2:Describe*\",\r\n        \"ec2:AuthorizeSecurityGroupIngress\"\r\n      ],\r\n      \"Resource\": [\r\n        \"*\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nThis tries to provide an out of the box configuration for connecting amazon ELB and Amazon ECS but should be more configurable so that custom configurations can be easily altered.\r\n\r\nThis is something that I created in a short time frame that needs extra work to parameterize more, but the default should ideally work for simple configurations.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/comments/185353446","html_url":"https://github.com/aws/amazon-ecs-cli/pull/81#issuecomment-185353446","issue_url":"https://api.github.com/repos/aws/amazon-ecs-cli/issues/81","id":185353446,"user":{"login":"davemkirk","id":168577,"avatar_url":"https://avatars.githubusercontent.com/u/168577?v=3","gravatar_id":"","url":"https://api.github.com/users/davemkirk","html_url":"https://github.com/davemkirk","followers_url":"https://api.github.com/users/davemkirk/followers","following_url":"https://api.github.com/users/davemkirk/following{/other_user}","gists_url":"https://api.github.com/users/davemkirk/gists{/gist_id}","starred_url":"https://api.github.com/users/davemkirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davemkirk/subscriptions","organizations_url":"https://api.github.com/users/davemkirk/orgs","repos_url":"https://api.github.com/users/davemkirk/repos","events_url":"https://api.github.com/users/davemkirk/events{/privacy}","received_events_url":"https://api.github.com/users/davemkirk/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T19:06:40Z","updated_at":"2016-02-17T19:06:40Z","body":"I'm interested in seeing ELB support added to ecs-cli but I see a potential issue with this implementation. \r\n\r\nThe launch configuration user data now assumes the cluster host will come with `yum`. Line 529 in the change to `ecs-cli/modules/aws/clients/cloudformation/template.go`\r\n\r\n+`\"yum install -y aws-cli jq\\n\",`\r\n\r\nWon't this be a problem where an ami without yum is passed in from the `--image-id` flag?\r\n"}}