{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/3212","labels_url":"https://api.github.com/repos/elastic/kibana/issues/3212/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/3212/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/3212/events","html_url":"https://github.com/elastic/kibana/pull/3212","id":59330308,"number":3212,"title":"Add distribution package formats & service definitions","user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/kibana/labels/4.1.0","name":"4.1.0","color":"dddddd"},{"url":"https://api.github.com/repos/elastic/kibana/labels/review","name":"review","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"milestone":null,"comments":53,"created_at":"2015-02-28T07:15:02Z","updated_at":"2015-07-30T00:10:58Z","closed_at":"2015-05-18T22:09:02Z","pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/3212","html_url":"https://github.com/elastic/kibana/pull/3212","diff_url":"https://github.com/elastic/kibana/pull/3212.diff","patch_url":"https://github.com/elastic/kibana/pull/3212.patch"},"body":"This is work to solve #1811 \r\n\r\nThis PR adds a new grunt task `create_services`. This task generates service definitions for launchd (osx), upstart (centos 6, ubuntu), systemd (fedora, centos 7), and sysv init (lsb 3.1-flavored, almost all other linuxes).\r\n\r\nAdditionally, the `create_packages` task was extended to create `.rpm` and `.deb` files for both 32bit and 64bit linux targets. It also adds a `.pkg` for OSX users.\r\n\r\nAdditionally, `grunt build` will run `create_services` before packaging and and rpm, deb, and osx packages all include service definitions for running Kibana. The OSX package ships with a launchd configuration and the Linux packages (rpm, deb) ship with a sysv init script.\r\n\r\nThe majority of the functionality is provided by [fpm](https://github.com/jordansissel/fpm) for packaging and by [pleaserun](https://github.com/jordansissel/pleaserun) for generating service definitions. These projects are implemented in Ruby (I think pleaserun requires Ruby 2.0.0 or newer).\r\n\r\n\r\nWork still needing to be done:\r\n* [x] Create a `kibana` user during package installation \r\n* [x] Have the service definitions run as the `kibana` user\r\n* [x] Test it!\r\n* [x] Write logs to /var/log/kibana/\r\n\r\nIt is my intention that this solves nearly all the packaging needs for #1811.\r\n\r\nI have littered the code with some TODO items I'd like guidance on, as well. I've never used the bluebird Promise library, so let me know if there's any style/correctness problems! :)"},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/126133539","html_url":"https://github.com/elastic/kibana/pull/3212#issuecomment-126133539","issue_url":"https://api.github.com/repos/elastic/kibana/issues/3212","id":126133539,"user":{"login":"jordansissel","id":131818,"avatar_url":"https://avatars.githubusercontent.com/u/131818?v=3","gravatar_id":"","url":"https://api.github.com/users/jordansissel","html_url":"https://github.com/jordansissel","followers_url":"https://api.github.com/users/jordansissel/followers","following_url":"https://api.github.com/users/jordansissel/following{/other_user}","gists_url":"https://api.github.com/users/jordansissel/gists{/gist_id}","starred_url":"https://api.github.com/users/jordansissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordansissel/subscriptions","organizations_url":"https://api.github.com/users/jordansissel/orgs","repos_url":"https://api.github.com/users/jordansissel/repos","events_url":"https://api.github.com/users/jordansissel/events{/privacy}","received_events_url":"https://api.github.com/users/jordansissel/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T00:10:58Z","updated_at":"2015-07-30T00:10:58Z","body":"Kibana's build system is capable of producing these packages. For those with urgency or customization needs, you can achieve this with `grunt create_packages`."}}