{"action":"closed","number":698,"pull_request":{"url":"https://api.github.com/repos/remind101/empire/pulls/698","id":53646567,"html_url":"https://github.com/remind101/empire/pull/698","diff_url":"https://github.com/remind101/empire/pull/698.diff","patch_url":"https://github.com/remind101/empire/pull/698.patch","issue_url":"https://api.github.com/repos/remind101/empire/issues/698","number":698,"state":"closed","locked":false,"title":"Event stream","user":{"login":"ejholmes","id":95166,"avatar_url":"https://avatars.githubusercontent.com/u/95166?v=3","gravatar_id":"","url":"https://api.github.com/users/ejholmes","html_url":"https://github.com/ejholmes","followers_url":"https://api.github.com/users/ejholmes/followers","following_url":"https://api.github.com/users/ejholmes/following{/other_user}","gists_url":"https://api.github.com/users/ejholmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ejholmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejholmes/subscriptions","organizations_url":"https://api.github.com/users/ejholmes/orgs","repos_url":"https://api.github.com/users/ejholmes/repos","events_url":"https://api.github.com/users/ejholmes/events{/privacy}","received_events_url":"https://api.github.com/users/ejholmes/received_events","type":"User","site_admin":false},"body":"Related https://github.com/remind101/empire/issues/658\r\nCloses https://github.com/remind101/empire/issues/458\r\n\r\nThis is a little spike into an events system, starting with **run**, **scale**, **deploy**, **restart** and **rollback** events. Note that this _doesn't_ attempt to give you any visibility into ECS events, just Empire triggered events for auditing.\r\n\r\nI'm starting with an SNS implementation of the Events interface, which would allow you to write SQS consumers (or just lambda functions) that processes the events in whatever way you want (maybe post to a slack channel, or post to a datadog event stream). Eventually, we may provide other implementations, like webhooks (but that can be done with SNS easily by creating an http subscription).\r\n\r\n**TODO**\r\n\r\n* [ ] Add an `Events` implementation that writes into the apps log stream https://github.com/remind101/empire/issues/658\r\n* [x] Make publishing events happen in a goroutine.\r\n* [x] Update demo CloudFormation to use SNS events backend.\r\n* [x] Docs on configuring SNS event stream","created_at":"2015-12-15T01:05:12Z","updated_at":"2015-12-22T22:50:31Z","closed_at":"2015-12-22T22:50:31Z","merged_at":"2015-12-22T22:50:31Z","merge_commit_sha":"bb42866eb707f1c1c73e1549f166f43ed8a3a61d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/remind101/empire/pulls/698/commits","review_comments_url":"https://api.github.com/repos/remind101/empire/pulls/698/comments","review_comment_url":"https://api.github.com/repos/remind101/empire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/remind101/empire/issues/698/comments","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/890285b21d71d0bd73dffd1627fb02074e7d90a3","head":{"label":"remind101:events","ref":"events","sha":"890285b21d71d0bd73dffd1627fb02074e7d90a3","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":30091667,"name":"empire","full_name":"remind101/empire","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/empire","description":"A PaaS built on top of Amazon EC2 Container Service (ECS)","fork":false,"url":"https://api.github.com/repos/remind101/empire","forks_url":"https://api.github.com/repos/remind101/empire/forks","keys_url":"https://api.github.com/repos/remind101/empire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/empire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/empire/teams","hooks_url":"https://api.github.com/repos/remind101/empire/hooks","issue_events_url":"https://api.github.com/repos/remind101/empire/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/empire/events","assignees_url":"https://api.github.com/repos/remind101/empire/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/empire/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/empire/tags","blobs_url":"https://api.github.com/repos/remind101/empire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/empire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/empire/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/empire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/empire/languages","stargazers_url":"https://api.github.com/repos/remind101/empire/stargazers","contributors_url":"https://api.github.com/repos/remind101/empire/contributors","subscribers_url":"https://api.github.com/repos/remind101/empire/subscribers","subscription_url":"https://api.github.com/repos/remind101/empire/subscription","commits_url":"https://api.github.com/repos/remind101/empire/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/empire/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/empire/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/empire/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/empire/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/empire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/empire/merges","archive_url":"https://api.github.com/repos/remind101/empire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/empire/downloads","issues_url":"https://api.github.com/repos/remind101/empire/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/empire/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/empire/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/empire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/empire/labels{/name}","releases_url":"https://api.github.com/repos/remind101/empire/releases{/id}","created_at":"2015-01-30T21:32:09Z","updated_at":"2015-12-22T18:31:31Z","pushed_at":"2015-12-22T22:50:31Z","git_url":"git://github.com/remind101/empire.git","ssh_url":"git@github.com:remind101/empire.git","clone_url":"https://github.com/remind101/empire.git","svn_url":"https://github.com/remind101/empire","homepage":"","size":20174,"stargazers_count":1520,"watchers_count":1520,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":34,"forks":57,"open_issues":34,"watchers":1520,"default_branch":"master"}},"base":{"label":"remind101:master","ref":"master","sha":"65e0a54209b58d4057e9feda599f438d39352dfd","user":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"repo":{"id":30091667,"name":"empire","full_name":"remind101/empire","owner":{"login":"remind101","id":376343,"avatar_url":"https://avatars.githubusercontent.com/u/376343?v=3","gravatar_id":"","url":"https://api.github.com/users/remind101","html_url":"https://github.com/remind101","followers_url":"https://api.github.com/users/remind101/followers","following_url":"https://api.github.com/users/remind101/following{/other_user}","gists_url":"https://api.github.com/users/remind101/gists{/gist_id}","starred_url":"https://api.github.com/users/remind101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remind101/subscriptions","organizations_url":"https://api.github.com/users/remind101/orgs","repos_url":"https://api.github.com/users/remind101/repos","events_url":"https://api.github.com/users/remind101/events{/privacy}","received_events_url":"https://api.github.com/users/remind101/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/remind101/empire","description":"A PaaS built on top of Amazon EC2 Container Service (ECS)","fork":false,"url":"https://api.github.com/repos/remind101/empire","forks_url":"https://api.github.com/repos/remind101/empire/forks","keys_url":"https://api.github.com/repos/remind101/empire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remind101/empire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remind101/empire/teams","hooks_url":"https://api.github.com/repos/remind101/empire/hooks","issue_events_url":"https://api.github.com/repos/remind101/empire/issues/events{/number}","events_url":"https://api.github.com/repos/remind101/empire/events","assignees_url":"https://api.github.com/repos/remind101/empire/assignees{/user}","branches_url":"https://api.github.com/repos/remind101/empire/branches{/branch}","tags_url":"https://api.github.com/repos/remind101/empire/tags","blobs_url":"https://api.github.com/repos/remind101/empire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remind101/empire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remind101/empire/git/refs{/sha}","trees_url":"https://api.github.com/repos/remind101/empire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remind101/empire/statuses/{sha}","languages_url":"https://api.github.com/repos/remind101/empire/languages","stargazers_url":"https://api.github.com/repos/remind101/empire/stargazers","contributors_url":"https://api.github.com/repos/remind101/empire/contributors","subscribers_url":"https://api.github.com/repos/remind101/empire/subscribers","subscription_url":"https://api.github.com/repos/remind101/empire/subscription","commits_url":"https://api.github.com/repos/remind101/empire/commits{/sha}","git_commits_url":"https://api.github.com/repos/remind101/empire/git/commits{/sha}","comments_url":"https://api.github.com/repos/remind101/empire/comments{/number}","issue_comment_url":"https://api.github.com/repos/remind101/empire/issues/comments{/number}","contents_url":"https://api.github.com/repos/remind101/empire/contents/{+path}","compare_url":"https://api.github.com/repos/remind101/empire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remind101/empire/merges","archive_url":"https://api.github.com/repos/remind101/empire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remind101/empire/downloads","issues_url":"https://api.github.com/repos/remind101/empire/issues{/number}","pulls_url":"https://api.github.com/repos/remind101/empire/pulls{/number}","milestones_url":"https://api.github.com/repos/remind101/empire/milestones{/number}","notifications_url":"https://api.github.com/repos/remind101/empire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remind101/empire/labels{/name}","releases_url":"https://api.github.com/repos/remind101/empire/releases{/id}","created_at":"2015-01-30T21:32:09Z","updated_at":"2015-12-22T18:31:31Z","pushed_at":"2015-12-22T22:50:31Z","git_url":"git://github.com/remind101/empire.git","ssh_url":"git@github.com:remind101/empire.git","clone_url":"https://github.com/remind101/empire.git","svn_url":"https://github.com/remind101/empire","homepage":"","size":20174,"stargazers_count":1520,"watchers_count":1520,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":34,"forks":57,"open_issues":34,"watchers":1520,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/remind101/empire/pulls/698"},"html":{"href":"https://github.com/remind101/empire/pull/698"},"issue":{"href":"https://api.github.com/repos/remind101/empire/issues/698"},"comments":{"href":"https://api.github.com/repos/remind101/empire/issues/698/comments"},"review_comments":{"href":"https://api.github.com/repos/remind101/empire/pulls/698/comments"},"review_comment":{"href":"https://api.github.com/repos/remind101/empire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/remind101/empire/pulls/698/commits"},"statuses":{"href":"https://api.github.com/repos/remind101/empire/statuses/890285b21d71d0bd73dffd1627fb02074e7d90a3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ejholmes","id":95166,"avatar_url":"https://avatars.githubusercontent.com/u/95166?v=3","gravatar_id":"","url":"https://api.github.com/users/ejholmes","html_url":"https://github.com/ejholmes","followers_url":"https://api.github.com/users/ejholmes/followers","following_url":"https://api.github.com/users/ejholmes/following{/other_user}","gists_url":"https://api.github.com/users/ejholmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ejholmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejholmes/subscriptions","organizations_url":"https://api.github.com/users/ejholmes/orgs","repos_url":"https://api.github.com/users/ejholmes/repos","events_url":"https://api.github.com/users/ejholmes/events{/privacy}","received_events_url":"https://api.github.com/users/ejholmes/received_events","type":"User","site_admin":false},"comments":2,"review_comments":7,"commits":1,"additions":3736,"deletions":117,"changed_files":29}}