{"action":"created","issue":{"url":"https://api.github.com/repos/azavea/raster-foundry/issues/231","labels_url":"https://api.github.com/repos/azavea/raster-foundry/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/azavea/raster-foundry/issues/231/comments","events_url":"https://api.github.com/repos/azavea/raster-foundry/issues/231/events","html_url":"https://github.com/azavea/raster-foundry/pull/231","id":112879969,"number":231,"title":"Add support for AMI pruning","user":{"login":"hectcastro","id":43639,"avatar_url":"https://avatars.githubusercontent.com/u/43639?v=3","gravatar_id":"","url":"https://api.github.com/users/hectcastro","html_url":"https://github.com/hectcastro","followers_url":"https://api.github.com/users/hectcastro/followers","following_url":"https://api.github.com/users/hectcastro/following{/other_user}","gists_url":"https://api.github.com/users/hectcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/hectcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectcastro/subscriptions","organizations_url":"https://api.github.com/users/hectcastro/orgs","repos_url":"https://api.github.com/users/hectcastro/repos","events_url":"https://api.github.com/users/hectcastro/events{/privacy}","received_events_url":"https://api.github.com/users/hectcastro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/azavea/raster-foundry/labels/in%20review","name":"in review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T20:02:23Z","updated_at":"2015-10-26T15:37:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/azavea/raster-foundry/pulls/231","html_url":"https://github.com/azavea/raster-foundry/pull/231","diff_url":"https://github.com/azavea/raster-foundry/pull/231.diff","patch_url":"https://github.com/azavea/raster-foundry/pull/231.patch"},"body":"Going through the process of wiring up an AMI builder in Jenkins, which requires support for some level of AMI pruning.\r\n\r\n---\r\n\r\n**Testing**\r\n\r\nCan be tested using the following command, but it'll only work if there are more than one AMIs present:\r\n\r\n```bash\r\n$ ./rf_stack.py prune-ami --aws-profile rf-stg --rf-profile staging --keep 1 --machine-type rf-app rf-worker\r\n```\r\n\r\nHere is an example of it successfully completing from my machine:\r\n\r\n```bash\r\n$ ./rf_stack.py prune-ami --aws-profile rf-stg --rf-profile staging --keep 1 --machine-type rf-app rf-worker\r\nIdentified that [ami-a9085fcc] is eligible to be pruned..\r\nDeregistered [ami-a9085fcc] and snapshot [snap-20dd716a]..\r\nIdentified that [ami-55095a30] is eligible to be pruned..\r\nDeregistered [ami-55095a30] and snapshot [snap-c527a98b]..\r\nIdentified that [ami-d3491ab6] is eligible to be pruned..\r\nDeregistered [ami-d3491ab6] and snapshot [snap-3ca1ef56]..\r\nIdentified that [ami-314e1d54] is eligible to be pruned..\r\nDeregistered [ami-314e1d54] and snapshot [snap-0e47f26f]..\r\nIdentified that [ami-890c5bec] is eligible to be pruned..\r\nDeregistered [ami-890c5bec] and snapshot [snap-171fb770]..\r\nIdentified that [ami-db4e1dbe] is eligible to be pruned..\r\nDeregistered [ami-db4e1dbe] and snapshot [snap-bcb5baf0]..\r\nIdentified that [ami-e970228c] is eligible to be pruned..\r\nDeregistered [ami-e970228c] and snapshot [snap-cf785fb4]..\r\n```"},"comment":{"url":"https://api.github.com/repos/azavea/raster-foundry/issues/comments/151177373","html_url":"https://github.com/azavea/raster-foundry/pull/231#issuecomment-151177373","issue_url":"https://api.github.com/repos/azavea/raster-foundry/issues/231","id":151177373,"user":{"login":"lliss","id":903219,"avatar_url":"https://avatars.githubusercontent.com/u/903219?v=3","gravatar_id":"","url":"https://api.github.com/users/lliss","html_url":"https://github.com/lliss","followers_url":"https://api.github.com/users/lliss/followers","following_url":"https://api.github.com/users/lliss/following{/other_user}","gists_url":"https://api.github.com/users/lliss/gists{/gist_id}","starred_url":"https://api.github.com/users/lliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lliss/subscriptions","organizations_url":"https://api.github.com/users/lliss/orgs","repos_url":"https://api.github.com/users/lliss/repos","events_url":"https://api.github.com/users/lliss/events{/privacy}","received_events_url":"https://api.github.com/users/lliss/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T15:37:41Z","updated_at":"2015-10-26T15:37:41Z","body":"+1. Built new AMIs and then pruned the old ones off."}}