{"action":"closed","number":23,"pull_request":{"url":"https://api.github.com/repos/guardian/machine-images/pulls/23","id":35771994,"html_url":"https://github.com/guardian/machine-images/pull/23","diff_url":"https://github.com/guardian/machine-images/pull/23.diff","patch_url":"https://github.com/guardian/machine-images/pull/23.patch","issue_url":"https://api.github.com/repos/guardian/machine-images/issues/23","number":23,"state":"closed","locked":false,"title":"Native application feature","user":{"login":"sihil","id":1236466,"avatar_url":"https://avatars.githubusercontent.com/u/1236466?v=3","gravatar_id":"","url":"https://api.github.com/users/sihil","html_url":"https://github.com/sihil","followers_url":"https://api.github.com/users/sihil/followers","following_url":"https://api.github.com/users/sihil/following{/other_user}","gists_url":"https://api.github.com/users/sihil/gists{/gist_id}","starred_url":"https://api.github.com/users/sihil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sihil/subscriptions","organizations_url":"https://api.github.com/users/sihil/orgs","repos_url":"https://api.github.com/users/sihil/repos","events_url":"https://api.github.com/users/sihil/events{/privacy}","received_events_url":"https://api.github.com/users/sihil/received_events","type":"User","site_admin":false},"body":"The native application feature provides an easy way to download, install and start a package that was generated by the sbt-native-packager tool.\r\n\r\nInstead of the large amounts of cfn-init metadata and the many lines of user data, a typical application can now have a single line to do the right thing using convention. For example:\r\n\r\n```\r\n/opt/feature/native-packager/install.sh -b composer-dist -s\r\n```\r\n\r\nHere we are telling it to download from the `composer-dist` bucket and automatically start the application. In order to get to that point the script will:\r\n - Retrieve the tags of the instance\r\n - Create a user (using the value of the Stack tag as the username)\r\n - Download the package (using the bucket and value of the Stack, Stage and App tags to determine the location - assumes that it is a `.tar.gz`)\r\n - Expand the package into the user home directory\r\n - Create an upstart script using a sane template\r\n - Start the upstart service\r\n\r\nIt's not perfect, but I think will save quite a lot of time in a process that is quite error prone. Am interested in feedback from others in the team.","created_at":"2015-05-19T20:36:32Z","updated_at":"2015-06-03T16:25:54Z","closed_at":"2015-06-03T16:25:54Z","merged_at":"2015-06-03T16:25:54Z","merge_commit_sha":"93b72d8478f26fa4e0ed5ebfd9dcca5f158dba7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/machine-images/pulls/23/commits","review_comments_url":"https://api.github.com/repos/guardian/machine-images/pulls/23/comments","review_comment_url":"https://api.github.com/repos/guardian/machine-images/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/machine-images/issues/23/comments","statuses_url":"https://api.github.com/repos/guardian/machine-images/statuses/681d094104e27806de0ad44cf65a73fadb424878","head":{"label":"guardian:sh-add-native-application-feature","ref":"sh-add-native-application-feature","sha":"681d094104e27806de0ad44cf65a73fadb424878","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":31600439,"name":"machine-images","full_name":"guardian/machine-images","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/machine-images","description":"Scripts for building machine images (principally AMIs)","fork":false,"url":"https://api.github.com/repos/guardian/machine-images","forks_url":"https://api.github.com/repos/guardian/machine-images/forks","keys_url":"https://api.github.com/repos/guardian/machine-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/machine-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/machine-images/teams","hooks_url":"https://api.github.com/repos/guardian/machine-images/hooks","issue_events_url":"https://api.github.com/repos/guardian/machine-images/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/machine-images/events","assignees_url":"https://api.github.com/repos/guardian/machine-images/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/machine-images/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/machine-images/tags","blobs_url":"https://api.github.com/repos/guardian/machine-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/machine-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/machine-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/machine-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/machine-images/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/machine-images/languages","stargazers_url":"https://api.github.com/repos/guardian/machine-images/stargazers","contributors_url":"https://api.github.com/repos/guardian/machine-images/contributors","subscribers_url":"https://api.github.com/repos/guardian/machine-images/subscribers","subscription_url":"https://api.github.com/repos/guardian/machine-images/subscription","commits_url":"https://api.github.com/repos/guardian/machine-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/machine-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/machine-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/machine-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/machine-images/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/machine-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/machine-images/merges","archive_url":"https://api.github.com/repos/guardian/machine-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/machine-images/downloads","issues_url":"https://api.github.com/repos/guardian/machine-images/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/machine-images/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/machine-images/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/machine-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/machine-images/labels{/name}","releases_url":"https://api.github.com/repos/guardian/machine-images/releases{/id}","created_at":"2015-03-03T13:46:42Z","updated_at":"2015-05-05T16:29:34Z","pushed_at":"2015-06-03T16:25:54Z","git_url":"git://github.com/guardian/machine-images.git","ssh_url":"git@github.com:guardian/machine-images.git","clone_url":"https://github.com/guardian/machine-images.git","svn_url":"https://github.com/guardian/machine-images","homepage":null,"size":680,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":2,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"69656ea4dd760ee95f0faf94d4aa739517ab8264","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":31600439,"name":"machine-images","full_name":"guardian/machine-images","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/machine-images","description":"Scripts for building machine images (principally AMIs)","fork":false,"url":"https://api.github.com/repos/guardian/machine-images","forks_url":"https://api.github.com/repos/guardian/machine-images/forks","keys_url":"https://api.github.com/repos/guardian/machine-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/machine-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/machine-images/teams","hooks_url":"https://api.github.com/repos/guardian/machine-images/hooks","issue_events_url":"https://api.github.com/repos/guardian/machine-images/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/machine-images/events","assignees_url":"https://api.github.com/repos/guardian/machine-images/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/machine-images/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/machine-images/tags","blobs_url":"https://api.github.com/repos/guardian/machine-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/machine-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/machine-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/machine-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/machine-images/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/machine-images/languages","stargazers_url":"https://api.github.com/repos/guardian/machine-images/stargazers","contributors_url":"https://api.github.com/repos/guardian/machine-images/contributors","subscribers_url":"https://api.github.com/repos/guardian/machine-images/subscribers","subscription_url":"https://api.github.com/repos/guardian/machine-images/subscription","commits_url":"https://api.github.com/repos/guardian/machine-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/machine-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/machine-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/machine-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/machine-images/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/machine-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/machine-images/merges","archive_url":"https://api.github.com/repos/guardian/machine-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/machine-images/downloads","issues_url":"https://api.github.com/repos/guardian/machine-images/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/machine-images/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/machine-images/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/machine-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/machine-images/labels{/name}","releases_url":"https://api.github.com/repos/guardian/machine-images/releases{/id}","created_at":"2015-03-03T13:46:42Z","updated_at":"2015-05-05T16:29:34Z","pushed_at":"2015-06-03T16:25:54Z","git_url":"git://github.com/guardian/machine-images.git","ssh_url":"git@github.com:guardian/machine-images.git","clone_url":"https://github.com/guardian/machine-images.git","svn_url":"https://github.com/guardian/machine-images","homepage":null,"size":680,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/machine-images/pulls/23"},"html":{"href":"https://github.com/guardian/machine-images/pull/23"},"issue":{"href":"https://api.github.com/repos/guardian/machine-images/issues/23"},"comments":{"href":"https://api.github.com/repos/guardian/machine-images/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/machine-images/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/machine-images/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/machine-images/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/machine-images/statuses/681d094104e27806de0ad44cf65a73fadb424878"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"sihil","id":1236466,"avatar_url":"https://avatars.githubusercontent.com/u/1236466?v=3","gravatar_id":"","url":"https://api.github.com/users/sihil","html_url":"https://github.com/sihil","followers_url":"https://api.github.com/users/sihil/followers","following_url":"https://api.github.com/users/sihil/following{/other_user}","gists_url":"https://api.github.com/users/sihil/gists{/gist_id}","starred_url":"https://api.github.com/users/sihil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sihil/subscriptions","organizations_url":"https://api.github.com/users/sihil/orgs","repos_url":"https://api.github.com/users/sihil/repos","events_url":"https://api.github.com/users/sihil/events{/privacy}","received_events_url":"https://api.github.com/users/sihil/received_events","type":"User","site_admin":false},"comments":9,"review_comments":2,"commits":13,"additions":423,"deletions":2,"changed_files":8}}