{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/3404","labels_url":"https://api.github.com/repos/elastic/logstash/issues/3404/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/3404/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/3404/events","html_url":"https://github.com/elastic/logstash/pull/3404","id":86642218,"number":3404,"title":"Manage plugins to be installed offline","user":{"login":"purbon","id":68540,"avatar_url":"https://avatars.githubusercontent.com/u/68540?v=3","gravatar_id":"","url":"https://api.github.com/users/purbon","html_url":"https://github.com/purbon","followers_url":"https://api.github.com/users/purbon/followers","following_url":"https://api.github.com/users/purbon/following{/other_user}","gists_url":"https://api.github.com/users/purbon/gists{/gist_id}","starred_url":"https://api.github.com/users/purbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purbon/subscriptions","organizations_url":"https://api.github.com/users/purbon/orgs","repos_url":"https://api.github.com/users/purbon/repos","events_url":"https://api.github.com/users/purbon/events{/privacy}","received_events_url":"https://api.github.com/users/purbon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/logstash/labels/bundler","name":"bundler","color":"c7def8"},{"url":"https://api.github.com/repos/elastic/logstash/labels/enhancement","name":"enhancement","color":"009800"},{"url":"https://api.github.com/repos/elastic/logstash/labels/needs%20reviewing","name":"needs reviewing","color":"cc317c"},{"url":"https://api.github.com/repos/elastic/logstash/labels/v1.5.2","name":"v1.5.2","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"colinsurprenant","id":2010,"avatar_url":"https://avatars.githubusercontent.com/u/2010?v=3","gravatar_id":"","url":"https://api.github.com/users/colinsurprenant","html_url":"https://github.com/colinsurprenant","followers_url":"https://api.github.com/users/colinsurprenant/followers","following_url":"https://api.github.com/users/colinsurprenant/following{/other_user}","gists_url":"https://api.github.com/users/colinsurprenant/gists{/gist_id}","starred_url":"https://api.github.com/users/colinsurprenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinsurprenant/subscriptions","organizations_url":"https://api.github.com/users/colinsurprenant/orgs","repos_url":"https://api.github.com/users/colinsurprenant/repos","events_url":"https://api.github.com/users/colinsurprenant/events{/privacy}","received_events_url":"https://api.github.com/users/colinsurprenant/received_events","type":"User","site_admin":false},"milestone":null,"comments":77,"created_at":"2015-06-09T15:41:31Z","updated_at":"2015-06-23T14:29:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/logstash/pulls/3404","html_url":"https://github.com/elastic/logstash/pull/3404","diff_url":"https://github.com/elastic/logstash/pull/3404.diff","patch_url":"https://github.com/elastic/logstash/pull/3404.patch"},"body":"The motivation of this PR is to enable users to dump a set of plugins, to later be managed in machines that have no internet connection.\r\n\r\nDesired features:\r\n- [x] enable the option to create a bundler of dependencies, aka cache that could be used in offline machines.\r\n- [x] enable the option to compress as ```zip``` or ```tar.gz``` the generated dump of plugins.\r\n- [x] enable ```bin/plugin update``` task to update plugins from the local cache under ```vendor/cache```\r\n- [x] enable ```bin/plugin install``` task to install plugins from the local cache (from default place).\r\n- [x] enable ```bin/plugin unpack [path] ``` task to unpack and install a packaged set of plugins.\r\n\r\nImportant checks:\r\n- [x] a plugin is being updated from the cache.\r\n- [x] a plugin is installed from the cache.\r\n- [x] are the plugins with jar dependencies working properly, specially check up on ```logstash-*-kafka```.\r\n\r\nRelates/Fixes to #2376\r\n\r\n# Notes:\r\n\r\nTask added:\r\n\r\n* ```bin/plugin package``` to build the cache of current installed plugins.\r\n* ```bin/plugin package --zip``` to compress the dump as a zip file.\r\n* ```bin/plugin package --tgz``` to compress the dump as tar.gz file.\r\n* ```bin/plugin package --clean``` to cleanup the raw, not compressed dump.    \r\n* ```bin/plugin unpack [file]``` to unpack a package file. \r\n* ```rake package:build-cache``` build a cache with the current installed plugins.\r\n* ```rake package:plugins-default``` build a cache with default plugins on it, installing them if not there.\r\n* ```rake package:plugins-all``` build a cache with all plugins on it, installing them if not there.\r\n\r\nnew functionality:\r\n\r\n* Add a flag in ```bin/plugin update``` named  ```--local``` that point bundler to use the local cache of gems.\r\n* Add a flag in ```bin/plugin install``` named ```--local``` that point bundler to use the local cache of gems.\r\n\r\nThis is actually an example of usage from the user perspective: \r\n```\r\n╰─$ bin/plugin update --local logstash-input-stdin\r\n\r\nUpdate is not supported for manually defined plugins or local .gem plugin installations, skipping: \r\nUpdating logstash-input-stdin\r\nUpdated logstash-input-stdin 0.1.5 to 0.1.6\r\n```"},"comment":{"url":"https://api.github.com/repos/elastic/logstash/issues/comments/114524900","html_url":"https://github.com/elastic/logstash/pull/3404#issuecomment-114524900","issue_url":"https://api.github.com/repos/elastic/logstash/issues/3404","id":114524900,"user":{"login":"purbon","id":68540,"avatar_url":"https://avatars.githubusercontent.com/u/68540?v=3","gravatar_id":"","url":"https://api.github.com/users/purbon","html_url":"https://github.com/purbon","followers_url":"https://api.github.com/users/purbon/followers","following_url":"https://api.github.com/users/purbon/following{/other_user}","gists_url":"https://api.github.com/users/purbon/gists{/gist_id}","starred_url":"https://api.github.com/users/purbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purbon/subscriptions","organizations_url":"https://api.github.com/users/purbon/orgs","repos_url":"https://api.github.com/users/purbon/repos","events_url":"https://api.github.com/users/purbon/events{/privacy}","received_events_url":"https://api.github.com/users/purbon/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T14:29:47Z","updated_at":"2015-06-23T14:29:47Z","body":"I tried this and I confirm the error, I'm going to work on fixing this. Thanks for your time find it, what is interesting, is install works as expected when there is no internet.\r\n\r\n```\r\n╭─purbon@purbon-elastic  ~/work/logstash  ‹feature/plugins_offline*› \r\n╰─$ bin/plugin install --local logstash-filter-clone\r\nInstalling logstash-filter-clone\r\nInstallation successful\r\n╭─purbon@purbon-elastic  ~/work/logstash  ‹feature/plugins_offline*› \r\n╰─$ ls vendor/cache/logstash-filter-clone-0.1.5.gem \r\nvendor/cache/logstash-filter-clone-0.1.5.gem\r\n```\r\n"}}